Re: Datasource problems on Tomcat 5.5.4
On Mon, 8 Nov 2004 16:07:26 -0800, Mark Fleischman [EMAIL PROTECTED] wrote: Hello, After upgrading from Tomcat 5.0.27 to Tomcat 5.5.4 my JNDI datasources are not resolving in 5.5.4 The configuration of the datasources was too verbose, and has been changed in this release. Look in the JNDI page in the documentation for the details. -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Datasource problems on Tomcat 5.5.4
Hi, The ResourceParams nested elements are history, it's all in the Resource element now. See the new configuration page at http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples -howto.html. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Mark Fleischman [mailto:[EMAIL PROTECTED] Sent: Monday, November 08, 2004 7:07 PM To: [EMAIL PROTECTED] Subject: Datasource problems on Tomcat 5.5.4 Hello, After upgrading from Tomcat 5.0.27 to Tomcat 5.5.4 my JNDI datasources are not resolving in 5.5.4 I tried 2 approaches which both work in Tomcat 5.0.27. I am using the same configuration on the 5.5.4 version (that is my libraries and context files have not changed) 1) DBCP with MySql 2) c3p0 with MySql With DBCP I get: JDBC driver of class '' for connect URL 'null' With c3p0 I get: javax.naming.NamingException: Cannot create resource instance I am more interested in resolving the c3p0 JNDI datasource setup. So let me share that setup: Here are the details of what I am running: c3p0-0.8.5pre4 mysql-connector-java-3.0.15-ga-bin JDK 1.5.0 Tomcat 5.5.4 On Windows Inside of common/lib I have placed the above JDBC related libraries. Here is my context file (which is placed in the conf\Catalina\localhost directory): Context path=/myapp docBase=myapp.war debug=5 reloadable=true override=true crossContext=true Resource name=jdbc/DCCDS auth=Container type=com.mchange.v2.c3p0.ComboPooledDataSource/ ResourceParams name=jdbc/DCCDS parameter namefactory/name valueorg.apache.naming.factory.BeanFactory/value /parameter parameter namedriverClass/name valuecom.mysql.jdbc.Driver/value /parameter parameter namejdbcUrl/name valuejdbc:mysql://192.168.1.60:3306/dcc_dev?autoReconnect=true;/valu e /parameter parameter nameuser/name valuemark/value /parameter parameter namepassword/name valuexxx/value /parameter parameter nameminPoolSize/name value5/value /parameter parameter namemaxPoolSize/name value15/value /parameter parameter nameacquireIncrement/name value5/value /parameter /ResourceParams /Context Here the relevant part of the web.xml file: resource-ref descriptionDB Connection On My Sql/description res-ref-namejdbc/DCCDS/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref When I make the following call in java: envCtx.lookup(jdbc/DCCDS); I get the exception: javax.naming.NamingException: Cannot create resource instance org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFac tory . java:132) javax.naming.spi.NamingManager.getObjectInstance(Unknown Source) Any help would be greatly appreciated. Thanks, Mark This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Datasource problems on Tomcat 5.5.4
Thanks Rémy Yoav! Mark Quoting Shapira, Yoav [EMAIL PROTECTED]: Hi, The ResourceParams nested elements are history, it's all in the Resource element now. See the new configuration page at http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples -howto.html. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Mark Fleischman [mailto:[EMAIL PROTECTED] Sent: Monday, November 08, 2004 7:07 PM To: [EMAIL PROTECTED] Subject: Datasource problems on Tomcat 5.5.4 Hello, After upgrading from Tomcat 5.0.27 to Tomcat 5.5.4 my JNDI datasources are not resolving in 5.5.4 I tried 2 approaches which both work in Tomcat 5.0.27. I am using the same configuration on the 5.5.4 version (that is my libraries and context files have not changed) 1) DBCP with MySql 2) c3p0 with MySql With DBCP I get: JDBC driver of class '' for connect URL 'null' With c3p0 I get: javax.naming.NamingException: Cannot create resource instance I am more interested in resolving the c3p0 JNDI datasource setup. So let me share that setup: Here are the details of what I am running: c3p0-0.8.5pre4 mysql-connector-java-3.0.15-ga-bin JDK 1.5.0 Tomcat 5.5.4 On Windows Inside of common/lib I have placed the above JDBC related libraries. Here is my context file (which is placed in the conf\Catalina\localhost directory): Context path=/myapp docBase=myapp.war debug=5 reloadable=true override=true crossContext=true Resource name=jdbc/DCCDS auth=Container type=com.mchange.v2.c3p0.ComboPooledDataSource/ ResourceParams name=jdbc/DCCDS parameter namefactory/name valueorg.apache.naming.factory.BeanFactory/value /parameter parameter namedriverClass/name valuecom.mysql.jdbc.Driver/value /parameter parameter namejdbcUrl/name valuejdbc:mysql://192.168.1.60:3306/dcc_dev?autoReconnect=true;/valu e /parameter parameter nameuser/name valuemark/value /parameter parameter namepassword/name valuexxx/value /parameter parameter nameminPoolSize/name value5/value /parameter parameter namemaxPoolSize/name value15/value /parameter parameter nameacquireIncrement/name value5/value /parameter /ResourceParams /Context Here the relevant part of the web.xml file: resource-ref descriptionDB Connection On My Sql/description res-ref-namejdbc/DCCDS/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref When I make the following call in java: envCtx.lookup(jdbc/DCCDS); I get the exception: javax.naming.NamingException: Cannot create resource instance org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFac tory . java:132) javax.naming.spi.NamingManager.getObjectInstance(Unknown Source) Any help would be greatly appreciated. Thanks, Mark This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Datasource problems on Tomcat 5.5.4
Hello, After upgrading from Tomcat 5.0.27 to Tomcat 5.5.4 my JNDI datasources are not resolving in 5.5.4 I tried 2 approaches which both work in Tomcat 5.0.27. I am using the same configuration on the 5.5.4 version (that is my libraries and context files have not changed) 1) DBCP with MySql 2) c3p0 with MySql With DBCP I get: JDBC driver of class '' for connect URL 'null' With c3p0 I get: javax.naming.NamingException: Cannot create resource instance I am more interested in resolving the c3p0 JNDI datasource setup. So let me share that setup: Here are the details of what I am running: c3p0-0.8.5pre4 mysql-connector-java-3.0.15-ga-bin JDK 1.5.0 Tomcat 5.5.4 On Windows Inside of common/lib I have placed the above JDBC related libraries. Here is my context file (which is placed in the conf\Catalina\localhost directory): Context path=/myapp docBase=myapp.war debug=5 reloadable=true override=true crossContext=true Resource name=jdbc/DCCDS auth=Container type=com.mchange.v2.c3p0.ComboPooledDataSource/ ResourceParams name=jdbc/DCCDS parameter namefactory/name valueorg.apache.naming.factory.BeanFactory/value /parameter parameter namedriverClass/name valuecom.mysql.jdbc.Driver/value /parameter parameter namejdbcUrl/name valuejdbc:mysql://192.168.1.60:3306/dcc_dev?autoReconnect=true;/value /parameter parameter nameuser/name valuemark/value /parameter parameter namepassword/name valuexxx/value /parameter parameter nameminPoolSize/name value5/value /parameter parameter namemaxPoolSize/name value15/value /parameter parameter nameacquireIncrement/name value5/value /parameter /ResourceParams /Context Here the relevant part of the web.xml file: resource-ref descriptionDB Connection On My Sql/description res-ref-namejdbc/DCCDS/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref When I make the following call in java: envCtx.lookup(jdbc/DCCDS); I get the exception: javax.naming.NamingException: Cannot create resource instance org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory. java:132) javax.naming.spi.NamingManager.getObjectInstance(Unknown Source) Any help would be greatly appreciated. Thanks, Mark