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> > > > > <name>factory</name> > > > > <value>org.apache.naming.factory.BeanFactory</value> > > > > </parameter> > > > > <parameter> > > > > <name>driverClass</name> > > > > <value>com.mysql.jdbc.Driver</value> > > > > </parameter> > > > > <parameter> > > > > <name>jdbcUrl</name> > > > > > ><value>jdbc:mysql://192.168.1.60:3306/dcc_dev?autoReconnect=true;</valu > e> > > > > </parameter> > > > > <parameter> > > > > <name>user</name> > > > > <value>mark</value> > > > > </parameter> > > > > <parameter> > > > > <name>password</name> > > > > <value>xxxxxxx</value> > > > > </parameter> > > > > <parameter> > > > > <name>minPoolSize</name> > > > > <value>5</value> > > > > </parameter> > > > > <parameter> > > > > <name>maxPoolSize</name> > > > > <value>15</value> > > > > </parameter> > > > > <parameter> > > > > <name>acquireIncrement</name> > > > > <value>5</value> > > > > </parameter> > > > > </ResourceParams> > > > > > > > > > > > ></Context> > > > > > > > >Here the relevant part of the web.xml file: > > > > > > > > <resource-ref> > > > > <description>DB Connection On My Sql</description> > > > > <res-ref-name>jdbc/DCCDS</res-ref-name> > > > > <res-type>javax.sql.DataSource</res-type> > > > > <res-auth>Container</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]