Quantcast

grails can't connect with JNDI datasource

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

grails can't connect with JNDI datasource

Chata
This post has NOT been accepted by the mailing list yet.
Hi, I can't connect to JNDI datasource, what i do wrong? I use tomcat 7 and grails 2
1) I change my DataSource.groovy and put there
production {
dataSource {
                                pooled = false
                                dbCreate = "update"
                                jndiName = "jdbc/updateServerDS"
                        }
}

4) in ...tomcat/conf/server.xml

<Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
        <Resource auth="Container" driverClassName="com.mysql.jdbc.Driver"
                        logAbandoned="true" maxActive="-1" maxIdle="200" maxWait="20000"
                        name="jdbc/UPDATE_SERVER_DS" password="" removeAbandoned="true"
                        removeAbandonedTimeout="1800" type="javax.sql.DataSource"
                        url="jdbc:mysql://localhost:3306/update_server?useUnicode=true&amp;characterEncoding=UTF-8&amp;characterSetResults=UTF-8&amp;autoReconnect=true&amp;CLIENT_MULTI_STATEMENTS=true&amp;CLIENT_MULTI_RESULTS=true"
                        username="root" validationQuery="select 1" />
Loading...