JNDI on 2.3.4+ run-app not working

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

JNDI on 2.3.4+ run-app not working

mastadon6
Ever since I upgraded to 2.3.4 I am unable to get JNDI working with run-app. I am upgrading from 2.2.3 where it worked great. I am using the code below. Anyone else have insights or issues with this?

In Config.groovy
grails.naming.entries = [
        "jdbc/datasourceName": [
                type: "javax.sql.DataSource",
                auth: "Container",
                description: "My data source",
                driverClassName: "com.ibm.as400.access.AS400JDBCDriver",
                url: "jdbc:as400://SCHEMA/TABLE",
                username: "username",
                password: "password",
                maxActive: "100",
                maxIdle: "30",
                maxWait: "10000"
        ]
]

In DataSource.groovy
development {
    dataSource {
        dbCreate  = "update"
        jndiName = "java:comp/env/jdbc/datasourceName"
    }
}

Error message Is
"Caused by ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"

And
"Could not create resource factory instance [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
Reply | Threaded
Open this post in threaded view
|

Re: JNDI on 2.3.4+ run-app not working

Graeme Rocher-2


On Fri, Jan 17, 2014 at 9:37 PM, mastadon6 <[hidden email]> wrote:
Ever since I upgraded to 2.3.4 I am unable to get JNDI working with run-app.
I am upgrading from 2.2.3 where it worked great. I am using the code below.
Anyone else have insights or issues with this?

*In Config.groovy*
grails.naming.entries = [
        "jdbc/datasourceName": [
                type: "javax.sql.DataSource",
                auth: "Container",
                description: "My data source",
                driverClassName: "com.ibm.as400.access.AS400JDBCDriver",
                url: "jdbc:as400://SCHEMA/TABLE",
                username: "username",
                password: "password",
                maxActive: "100",
                maxIdle: "30",
                maxWait: "10000"
        ]
]

*In DataSource.groovy*
development {
    dataSource {
        dbCreate  = "update"
        jndiName = "java:comp/env/jdbc/datasourceName"
    }
}

*Error message Is *
"Caused by ClassNotFoundException:
org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"

And
"Could not create resource factory instance [Root exception is
java.lang.ClassNotFoundException:
org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"



--
View this message in context: http://grails.1312388.n4.nabble.com/JNDI-on-2-3-4-run-app-not-working-tp4653438.html
Sent from the Grails - dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Graeme Rocher
Grails Project Lead
SpringSource