RE: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
Hi, I´ve seen tomcat 5.0.28 has different *.xml files for each context in catalina/localhost, then I´ve modified ROOT.xml instead server.xml here it is: - ROOT.xml - url jdbc:oracle:thin:@10.0.100.6:1521:bddesa validationQuery select * FROM componentes_correos maxIdle 30 maxActive 10 driverClassName com.mysql.jdbc.Driver maxWait 1 factory org.apache.commons.dbcp.BasicDataSourceFactory username password -- web.xml -- http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; version="2.4"> Welcome to Tomcat Welcome to Tomcat org.apache.jsp.index_jsp org.apache.jsp.index_jsp org.apache.jsp.index_jsp /index.jsp Oracle Datasource example jdbc/bbdesa javax.sql.DataSource Container test2.jsp out.print("1"); Context initContext = new InitialContext(); out.print("2"); Context envContext = (Context)initContext.lookup("java:/comp/env"); out.print("3"); DataSource ds = (DataSource)envContext.lookup("jdbc/bbdesa"); out.print("4"); conn = ds.getConnection(); out.print("5"); Anyway, it gives me the same error: 1234org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' any help? thanks. -Mensaje original- De: Licinio Gomez Delgado [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 13 de abril de 2005 9:49 Para: tomcat-user@jakarta.apache.org Asunto: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' Hi, I´m a newbie with problems configurating Tomcat, I´ve been reading examples and the mailing list, but I can´t configure correctly Tomcat 5.0.28 with Oracle 9, I´m a bit desperate it´s what I got: in my Tomcat 5.0\common\lib folder I´ve got ojdbc14.jar --- Tomcat 5.0\conf\server.xml: --- factory org.apache.catalina.users.MemoryUserDatabaseFactory pathname conf/tomcat-users.xml factory org.apache.commons.dbcp.BasicDataSourceFactory driverClassName oracle.jdbc.driver.OracleDriver url jdbc:oracle:thin:@10.0.100.6:1521:bddesa username * password * maxActive 20 maxIdle 10 maxWait -1 --- Tomcat 5.0\webapps\ROOT\WEB-INF\web.xml --- http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; version="2.4"> Welcome to Tomcat Welcome to Tomcat org.apache.jsp.index_jsp org.apache.jsp.index_jsp
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
Hi, I´m a newbie with problems configurating Tomcat, I´ve been reading examples and the mailing list, but I can´t configure correctly Tomcat 5.0.28 with Oracle 9, I´m a bit desperate it´s what I got: in my Tomcat 5.0\common\lib folder I´ve got ojdbc14.jar --- Tomcat 5.0\conf\server.xml: --- factory org.apache.catalina.users.MemoryUserDatabaseFactory pathname conf/tomcat-users.xml factory org.apache.commons.dbcp.BasicDataSourceFactory driverClassName oracle.jdbc.driver.OracleDriver url jdbc:oracle:thin:@10.0.100.6:1521:bddesa username * password * maxActive 20 maxIdle 10 maxWait -1 --- Tomcat 5.0\webapps\ROOT\WEB-INF\web.xml --- http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; version="2.4"> Welcome to Tomcat Welcome to Tomcat org.apache.jsp.index_jsp org.apache.jsp.index_jsp org.apache.jsp.index_jsp /index.jsp Oracle Datasource example jdbc/myoracle javax.sql.DataSource Container --- and in Tomcat 5.0\webapps\ROOT\test2.jsp: --- ... out.print("1"); Context initContext = new InitialContext(); out.print("2"); Context envContext = (Context)initContext.lookup("java:/comp/env"); out.print("3"); DataSource ds = (DataSource)envContext.lookup("jdbc/myoracle"); out.print("4"); conn = ds.getConnection(); out.print("5"); ... the output I´ve got is: 1234org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' When I connect directly, it works correctly: DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); conn = DriverManager.getConnection("jdbc:oracle:thin:@10.0.100.6:1521:bddesa"," *",""); any help, please? thanks very much - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot create JDBC driver of class '' for connect URL 'null'
My url is jdbc:oracle:thin:@ora.mydomain.com:1521:SID -Original Message- From: g k [mailto:[EMAIL PROTECTED] Sent: February 15, 2005 5:15 PM To: tomcat-user@jakarta.apache.org Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' yes have defined that factory org.apache.catalina.users.MemoryUserDatabaseFactory pathname conf/tomcat-users.xml factory org.apache.commons.dbcp.BasicDataSourceFactory driverClassName oracle.jdbc.driver.OracleDriver url jdbc:oracle:thin:[EMAIL PROTECTED]:1521:mysid username ** password ** maxActive 20 maxIdle 10 maxWait -1 >From: Phillip Qin <[EMAIL PROTECTED]> >Reply-To: "Tomcat Users List" >To: 'Tomcat Users List' >Subject: RE: Cannot create JDBC driver of class '' for connect URL >'null' >Date: Tue, 15 Feb 2005 13:32:59 -0500 > >Didn't you define url, password etc. in your server.xml >? > >-Original Message- >From: g k [mailto:[EMAIL PROTECTED] >Sent: February 15, 2005 12:49 PM >To: tomcat-user@jakarta.apache.org >Subject: RE: Cannot create JDBC driver of class '' for connect URL >'null' > > >Server.xml contains : > >type="javax.sql.DataSource"/> No context tag is in server.xml > >Context.xml file contains > >type="javax.sql.DataSource"/> > > > >From: Phillip Qin <[EMAIL PROTECTED]> > >Reply-To: "Tomcat Users List" > >To: 'Tomcat Users List' > >Subject: RE: Cannot create JDBC driver of class '' for connect URL > >'null' > >Date: Tue, 15 Feb 2005 11:33:35 -0500 > > > >In your context.xml or server.xml, you would define your jdbc > >resource. Find out that url and post it here. Jdbc driver and > >location are correct. > > > >-Original Message- > >From: g k [mailto:[EMAIL PROTECTED] > >Sent: February 15, 2005 11:25 AM > >To: [EMAIL PROTECTED]; tomcat-user@jakarta.apache.org > >Subject: RE: Cannot create JDBC driver of class '' for connect URL > >'null' > > > > > > > >Hi > > > > > >ojdbc14.jar - is in the tomcat/common/lib directory > > > >post jdc url? - not to clear on what this is? > > > >do i need to create a context.xml? > > > >regards > > > >Gurpreet > > > > >From: "David Short" <[EMAIL PROTECTED]> > > >Reply-To: <[EMAIL PROTECTED]> > > >To: "'Tomcat Users List'" > > >Subject: RE: Cannot create JDBC driver of class '' for connect URL > > >'null' > > >Date: Tue, 15 Feb 2005 07:18:58 -0800 > > > > > >Rename the Oracle classes12.zip file to classes12.jar and move to > > >the tomcat\common\lib directory. > > > > > >-Original Message- > > >From: Phillip Qin [mailto:[EMAIL PROTECTED] > > >Sent: Tuesday, February 15, 2005 6:39 AM > > >To: 'Tomcat Users List' > > >Subject: RE: Cannot create JDBC driver of class '' for connect URL > > >'null' > > > > > > > > >Post your jdbc url. > > > > > >-Original Message- > > >From: g k [mailto:[EMAIL PROTECTED] > > >Sent: February 15, 2005 6:44 AM > > >To: tomcat-user@jakarta.apache.org > > >Subject: Cannot create JDBC driver of class '' for connect URL > > >'null' > > > > > > > > >Hi > > > > > >I have added Oracle resource params to the server.xml file and > > >reference parameters to oracle in the web.xml > > > > > >When i startup tomcat - i get the following error: > > > > > >11:20:38,385 [ConnectDB.java] [ConnectDB] > > >[getConnectionPoolForOracle:101] > > >- > > > > > >ERR > > >OR - failed to get the connection: > > >org.apache.commons.dbcp.SQLNestedException: C > > >annot create JDBC driver of class '' for connect URL 'null', cause: > > >No suitable driver 11:20:38,385 [SendMessageAction.java] > > >[SendMessageAction] [Send:227] - DEBUG > > > > > >- C
RE: Cannot create JDBC driver of class '' for connect URL 'null'
yes have defined that factory org.apache.catalina.users.MemoryUserDatabaseFactory pathname conf/tomcat-users.xml factory org.apache.commons.dbcp.BasicDataSourceFactory driverClassName oracle.jdbc.driver.OracleDriver url jdbc:oracle:thin:[EMAIL PROTECTED]:1521:mysid username ** password ** maxActive 20 maxIdle 10 maxWait -1 From: Phillip Qin <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" To: 'Tomcat Users List' Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' Date: Tue, 15 Feb 2005 13:32:59 -0500 Didn't you define url, password etc. in your server.xml ? -Original Message- From: g k [mailto:[EMAIL PROTECTED] Sent: February 15, 2005 12:49 PM To: tomcat-user@jakarta.apache.org Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' Server.xml contains : No context tag is in server.xml Context.xml file contains >From: Phillip Qin <[EMAIL PROTECTED]> >Reply-To: "Tomcat Users List" >To: 'Tomcat Users List' >Subject: RE: Cannot create JDBC driver of class '' for connect URL >'null' >Date: Tue, 15 Feb 2005 11:33:35 -0500 > >In your context.xml or server.xml, you would define your jdbc resource. >Find >out that url and post it here. Jdbc driver and location are correct. > >-Original Message- >From: g k [mailto:[EMAIL PROTECTED] >Sent: February 15, 2005 11:25 AM >To: [EMAIL PROTECTED]; tomcat-user@jakarta.apache.org >Subject: RE: Cannot create JDBC driver of class '' for connect URL >'null' > > > >Hi > > >ojdbc14.jar - is in the tomcat/common/lib directory > >post jdc url? - not to clear on what this is? > >do i need to create a context.xml? > >regards > >Gurpreet > > >From: "David Short" <[EMAIL PROTECTED]> > >Reply-To: <[EMAIL PROTECTED]> > >To: "'Tomcat Users List'" > >Subject: RE: Cannot create JDBC driver of class '' for connect URL > >'null' > >Date: Tue, 15 Feb 2005 07:18:58 -0800 > > > >Rename the Oracle classes12.zip file to classes12.jar and move to the > >tomcat\common\lib directory. > > > >-Original Message- > >From: Phillip Qin [mailto:[EMAIL PROTECTED] > >Sent: Tuesday, February 15, 2005 6:39 AM > >To: 'Tomcat Users List' > >Subject: RE: Cannot create JDBC driver of class '' for connect URL > >'null' > > > > > >Post your jdbc url. > > > >-Original Message- > >From: g k [mailto:[EMAIL PROTECTED] > >Sent: February 15, 2005 6:44 AM > >To: tomcat-user@jakarta.apache.org > >Subject: Cannot create JDBC driver of class '' for connect URL 'null' > > > > > >Hi > > > >I have added Oracle resource params to the server.xml file and > >reference parameters to oracle in the web.xml > > > >When i startup tomcat - i get the following error: > > > >11:20:38,385 [ConnectDB.java] [ConnectDB] > >[getConnectionPoolForOracle:101] > >- > > > >ERR > >OR - failed to get the connection: > >org.apache.commons.dbcp.SQLNestedException: C > >annot create JDBC driver of class '' for connect URL 'null', cause: > >No suitable driver 11:20:38,385 [SendMessageAction.java] > >[SendMessageAction] [Send:227] - DEBUG > > > >- C > >onnection after: > >null > >java.net.MalformedURLException: no protocol: > > at java.net.URL.(URL.java:537) > > at java.net.URL.(URL.java:434) > > at java.net.URL.(URL.java:383) > > at > >com.csc.nhs.web.legacypas.struts.action.SendMessageAction.Send(SendMe > >ssageAction.java:231) > > > >any thoughts? > > > >regards > > > >Gurpreet > > > > > > > >- > >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] > > > > > >- >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] !DSPAM:42123612105131331513667! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot create JDBC driver of class '' for connect URL 'null'
Laba diena. Dėkojame, kad mums parašėte. Jūsų atsiųsta žinutė išsaugota mūsų duomenų bazėje. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot create JDBC driver of class '' for connect URL 'null'
Didn't you define url, password etc. in your server.xml ? -Original Message- From: g k [mailto:[EMAIL PROTECTED] Sent: February 15, 2005 12:49 PM To: tomcat-user@jakarta.apache.org Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' Server.xml contains : No context tag is in server.xml Context.xml file contains >From: Phillip Qin <[EMAIL PROTECTED]> >Reply-To: "Tomcat Users List" >To: 'Tomcat Users List' >Subject: RE: Cannot create JDBC driver of class '' for connect URL >'null' >Date: Tue, 15 Feb 2005 11:33:35 -0500 > >In your context.xml or server.xml, you would define your jdbc resource. >Find >out that url and post it here. Jdbc driver and location are correct. > >-Original Message- >From: g k [mailto:[EMAIL PROTECTED] >Sent: February 15, 2005 11:25 AM >To: [EMAIL PROTECTED]; tomcat-user@jakarta.apache.org >Subject: RE: Cannot create JDBC driver of class '' for connect URL >'null' > > > >Hi > > >ojdbc14.jar - is in the tomcat/common/lib directory > >post jdc url? - not to clear on what this is? > >do i need to create a context.xml? > >regards > >Gurpreet > > >From: "David Short" <[EMAIL PROTECTED]> > >Reply-To: <[EMAIL PROTECTED]> > >To: "'Tomcat Users List'" > >Subject: RE: Cannot create JDBC driver of class '' for connect URL > >'null' > >Date: Tue, 15 Feb 2005 07:18:58 -0800 > > > >Rename the Oracle classes12.zip file to classes12.jar and move to the > >tomcat\common\lib directory. > > > >-Original Message- > >From: Phillip Qin [mailto:[EMAIL PROTECTED] > >Sent: Tuesday, February 15, 2005 6:39 AM > >To: 'Tomcat Users List' > >Subject: RE: Cannot create JDBC driver of class '' for connect URL > >'null' > > > > > >Post your jdbc url. > > > >-Original Message- > >From: g k [mailto:[EMAIL PROTECTED] > >Sent: February 15, 2005 6:44 AM > >To: tomcat-user@jakarta.apache.org > >Subject: Cannot create JDBC driver of class '' for connect URL 'null' > > > > > >Hi > > > >I have added Oracle resource params to the server.xml file and > >reference parameters to oracle in the web.xml > > > >When i startup tomcat - i get the following error: > > > >11:20:38,385 [ConnectDB.java] [ConnectDB] > >[getConnectionPoolForOracle:101] > >- > > > >ERR > >OR - failed to get the connection: > >org.apache.commons.dbcp.SQLNestedException: C > >annot create JDBC driver of class '' for connect URL 'null', cause: > >No suitable driver 11:20:38,385 [SendMessageAction.java] > >[SendMessageAction] [Send:227] - DEBUG > > > >- C > >onnection after: > >null > >java.net.MalformedURLException: no protocol: > > at java.net.URL.(URL.java:537) > > at java.net.URL.(URL.java:434) > > at java.net.URL.(URL.java:383) > > at > >com.csc.nhs.web.legacypas.struts.action.SendMessageAction.Send(SendMe > >ssageAction.java:231) > > > >any thoughts? > > > >regards > > > >Gurpreet > > > > > > > >- > >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] > > > > > >- >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] !DSPAM:42123612105131331513667!
RE: Cannot create JDBC driver of class '' for connect URL 'null'
Server.xml contains : No context tag is in server.xml Context.xml file contains From: Phillip Qin <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" To: 'Tomcat Users List' Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' Date: Tue, 15 Feb 2005 11:33:35 -0500 In your context.xml or server.xml, you would define your jdbc resource. Find out that url and post it here. Jdbc driver and location are correct. -Original Message- From: g k [mailto:[EMAIL PROTECTED] Sent: February 15, 2005 11:25 AM To: [EMAIL PROTECTED]; tomcat-user@jakarta.apache.org Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' Hi ojdbc14.jar - is in the tomcat/common/lib directory post jdc url? - not to clear on what this is? do i need to create a context.xml? regards Gurpreet >From: "David Short" <[EMAIL PROTECTED]> >Reply-To: <[EMAIL PROTECTED]> >To: "'Tomcat Users List'" >Subject: RE: Cannot create JDBC driver of class '' for connect URL >'null' >Date: Tue, 15 Feb 2005 07:18:58 -0800 > >Rename the Oracle classes12.zip file to classes12.jar and move to the >tomcat\common\lib directory. > >-Original Message- >From: Phillip Qin [mailto:[EMAIL PROTECTED] >Sent: Tuesday, February 15, 2005 6:39 AM >To: 'Tomcat Users List' >Subject: RE: Cannot create JDBC driver of class '' for connect URL >'null' > > >Post your jdbc url. > >-Original Message- >From: g k [mailto:[EMAIL PROTECTED] >Sent: February 15, 2005 6:44 AM >To: tomcat-user@jakarta.apache.org >Subject: Cannot create JDBC driver of class '' for connect URL 'null' > > >Hi > >I have added Oracle resource params to the server.xml file and >reference parameters to oracle in the web.xml > >When i startup tomcat - i get the following error: > >11:20:38,385 [ConnectDB.java] [ConnectDB] >[getConnectionPoolForOracle:101] >- > >ERR >OR - failed to get the connection: >org.apache.commons.dbcp.SQLNestedException: C >annot create JDBC driver of class '' for connect URL 'null', cause: No >suitable driver >11:20:38,385 [SendMessageAction.java] [SendMessageAction] [Send:227] - >DEBUG > >- C >onnection after: >null >java.net.MalformedURLException: no protocol: > at java.net.URL.(URL.java:537) > at java.net.URL.(URL.java:434) > at java.net.URL.(URL.java:383) > at >com.csc.nhs.web.legacypas.struts.action.SendMessageAction.Send(SendMe >ssageAction.java:231) > >any thoughts? > >regards > >Gurpreet > > > >- >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] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:4212229798071307422972! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot create JDBC driver of class '' for connect URL 'null'
In your context.xml or server.xml, you would define your jdbc resource. Find out that url and post it here. Jdbc driver and location are correct. -Original Message- From: g k [mailto:[EMAIL PROTECTED] Sent: February 15, 2005 11:25 AM To: [EMAIL PROTECTED]; tomcat-user@jakarta.apache.org Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' Hi ojdbc14.jar - is in the tomcat/common/lib directory post jdc url? - not to clear on what this is? do i need to create a context.xml? regards Gurpreet >From: "David Short" <[EMAIL PROTECTED]> >Reply-To: <[EMAIL PROTECTED]> >To: "'Tomcat Users List'" >Subject: RE: Cannot create JDBC driver of class '' for connect URL >'null' >Date: Tue, 15 Feb 2005 07:18:58 -0800 > >Rename the Oracle classes12.zip file to classes12.jar and move to the >tomcat\common\lib directory. > >-Original Message- >From: Phillip Qin [mailto:[EMAIL PROTECTED] >Sent: Tuesday, February 15, 2005 6:39 AM >To: 'Tomcat Users List' >Subject: RE: Cannot create JDBC driver of class '' for connect URL >'null' > > >Post your jdbc url. > >-----Original Message----- >From: g k [mailto:[EMAIL PROTECTED] >Sent: February 15, 2005 6:44 AM >To: tomcat-user@jakarta.apache.org >Subject: Cannot create JDBC driver of class '' for connect URL 'null' > > >Hi > >I have added Oracle resource params to the server.xml file and >reference parameters to oracle in the web.xml > >When i startup tomcat - i get the following error: > >11:20:38,385 [ConnectDB.java] [ConnectDB] >[getConnectionPoolForOracle:101] >- > >ERR >OR - failed to get the connection: >org.apache.commons.dbcp.SQLNestedException: C >annot create JDBC driver of class '' for connect URL 'null', cause: No >suitable driver >11:20:38,385 [SendMessageAction.java] [SendMessageAction] [Send:227] - >DEBUG > >- C >onnection after: >null >java.net.MalformedURLException: no protocol: > at java.net.URL.(URL.java:537) > at java.net.URL.(URL.java:434) > at java.net.URL.(URL.java:383) > at >com.csc.nhs.web.legacypas.struts.action.SendMessageAction.Send(SendMe >ssageAction.java:231) > >any thoughts? > >regards > >Gurpreet > > > >- >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] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:4212229798071307422972!
RE: Cannot create JDBC driver of class '' for connect URL 'null'
Hi ojdbc14.jar - is in the tomcat/common/lib directory post jdc url? - not to clear on what this is? do i need to create a context.xml? regards Gurpreet From: "David Short" <[EMAIL PROTECTED]> Reply-To: <[EMAIL PROTECTED]> To: "'Tomcat Users List'" Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' Date: Tue, 15 Feb 2005 07:18:58 -0800 Rename the Oracle classes12.zip file to classes12.jar and move to the tomcat\common\lib directory. -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 6:39 AM To: 'Tomcat Users List' Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' Post your jdbc url. -Original Message- From: g k [mailto:[EMAIL PROTECTED] Sent: February 15, 2005 6:44 AM To: tomcat-user@jakarta.apache.org Subject: Cannot create JDBC driver of class '' for connect URL 'null' Hi I have added Oracle resource params to the server.xml file and reference parameters to oracle in the web.xml When i startup tomcat - i get the following error: 11:20:38,385 [ConnectDB.java] [ConnectDB] [getConnectionPoolForOracle:101] - ERR OR - failed to get the connection: org.apache.commons.dbcp.SQLNestedException: C annot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver 11:20:38,385 [SendMessageAction.java] [SendMessageAction] [Send:227] - DEBUG - C onnection after: null java.net.MalformedURLException: no protocol: at java.net.URL.(URL.java:537) at java.net.URL.(URL.java:434) at java.net.URL.(URL.java:383) at com.csc.nhs.web.legacypas.struts.action.SendMessageAction.Send(SendMe ssageAction.java:231) any thoughts? regards Gurpreet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:4211e08b66521973816187! - 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]
RE: Cannot create JDBC driver of class '' for connect URL 'null'
Rename the Oracle classes12.zip file to classes12.jar and move to the tomcat\common\lib directory. -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 6:39 AM To: 'Tomcat Users List' Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' Post your jdbc url. -Original Message- From: g k [mailto:[EMAIL PROTECTED] Sent: February 15, 2005 6:44 AM To: tomcat-user@jakarta.apache.org Subject: Cannot create JDBC driver of class '' for connect URL 'null' Hi I have added Oracle resource params to the server.xml file and reference parameters to oracle in the web.xml When i startup tomcat - i get the following error: 11:20:38,385 [ConnectDB.java] [ConnectDB] [getConnectionPoolForOracle:101] - ERR OR - failed to get the connection: org.apache.commons.dbcp.SQLNestedException: C annot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver 11:20:38,385 [SendMessageAction.java] [SendMessageAction] [Send:227] - DEBUG - C onnection after: null java.net.MalformedURLException: no protocol: at java.net.URL.(URL.java:537) at java.net.URL.(URL.java:434) at java.net.URL.(URL.java:383) at com.csc.nhs.web.legacypas.struts.action.SendMessageAction.Send(SendMe ssageAction.java:231) any thoughts? regards Gurpreet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:4211e08b66521973816187! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot create JDBC driver of class '' for connect URL 'null'
Post your jdbc url. -Original Message- From: g k [mailto:[EMAIL PROTECTED] Sent: February 15, 2005 6:44 AM To: tomcat-user@jakarta.apache.org Subject: Cannot create JDBC driver of class '' for connect URL 'null' Hi I have added Oracle resource params to the server.xml file and reference parameters to oracle in the web.xml When i startup tomcat - i get the following error: 11:20:38,385 [ConnectDB.java] [ConnectDB] [getConnectionPoolForOracle:101] - ERR OR - failed to get the connection: org.apache.commons.dbcp.SQLNestedException: C annot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver 11:20:38,385 [SendMessageAction.java] [SendMessageAction] [Send:227] - DEBUG - C onnection after: null java.net.MalformedURLException: no protocol: at java.net.URL.(URL.java:537) at java.net.URL.(URL.java:434) at java.net.URL.(URL.java:383) at com.csc.nhs.web.legacypas.struts.action.SendMessageAction.Send(SendMe ssageAction.java:231) any thoughts? regards Gurpreet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:4211e08b66521973816187!
Cannot create JDBC driver of class '' for connect URL 'null'
Hi I have added Oracle resource params to the server.xml file and reference parameters to oracle in the web.xml When i startup tomcat - i get the following error: 11:20:38,385 [ConnectDB.java] [ConnectDB] [getConnectionPoolForOracle:101] - ERR OR - failed to get the connection: org.apache.commons.dbcp.SQLNestedException: C annot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver 11:20:38,385 [SendMessageAction.java] [SendMessageAction] [Send:227] - DEBUG - C onnection after: null java.net.MalformedURLException: no protocol: at java.net.URL.(URL.java:537) at java.net.URL.(URL.java:434) at java.net.URL.(URL.java:383) at com.csc.nhs.web.legacypas.struts.action.SendMessageAction.Send(SendMe ssageAction.java:231) any thoughts? regards Gurpreet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Chirag: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
I did changed the code I changed the server.xml file and changed as this But again the same Exception Still could not try our JDBC-ODBC thing in Microsoft Access Thanks in advance CSJakharia Subscribe to bermudaEmail: [input] [input] Browse Archives at groups-beta.google.com - Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term'
Re: Chirag: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
Check the configuration: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations 5.5 has a different set up than 5.0 . You also need a resource link. See: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/globalresources.html at the bottom of the page. It has also be noted on the list that the odbc drivers are not suited for production. But this will not cause your problem. Doug - Original Message - From: "Chirag" <[EMAIL PROTECTED]> To: Sent: Thursday, January 27, 2005 1:15 AM Subject: Chirag: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' Software jakarta-tomcat-5.5.2 JDK 1.5 MS Access 2000 Requirements Connection Pooling in Tomcat Problem I inserted a resource Tag in server.xml file maxWait 5000 maxActive 4 password password url jdbc:odbc:aaa driverClassName sun.jdbc.odbc.JdbcOdbcDriver maxIdle 2 username username I also inserted the following line in web.xml. aaa javax.sql.DataSource Container After that I tried to access the java.sql.Connection Object by the following code in JSP javax.naming.Context initContext = new javax.naming.InitialContext();javax.naming.Context envContext = (javax.naming.Context)initContext.lookup("java:/comp/env");javax.sql.DataSource ds = (javax.sql.DataSource)envContext.lookup("aaa");java.sql.Connection conn = ds.getConnection();System.out.println(conn);conn.close(); The following Exception occured HTTP Status 00 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) org.apache.jsp.B2bSite.test_jsp._jspService(org.apache.jsp.B2bSite.test_jsp:105) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:296) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:246) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) temp.loginServlet.doFilter(loginServlet.java:34) root cause org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780) org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) org.apache.jsp.B2bSite.test_jsp._jspService(org.apache.jsp.B2bSite.test_jsp:88) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:296) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:246) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) temp.loginServlet.doFilter(loginServlet.java:34) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.2 ogs. Apache Tomcat/5.5.2 Thanks in advance CSJakharia Subscribe to bermudaEmail: [input] [input] Browse Archives at groups-beta.google.com - Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Chirag: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
Software jakarta-tomcat-5.5.2 JDK 1.5 MS Access 2000 Requirements Connection Pooling in Tomcat Problem I inserted a resource Tag in server.xml file maxWait 5000 maxActive 4 password password url jdbc:odbc:aaa driverClassName sun.jdbc.odbc.JdbcOdbcDriver maxIdle 2 username username I also inserted the following line in web.xml. aaa javax.sql.DataSource Container After that I tried to access the java.sql.Connection Object by the following code in JSP javax.naming.Context initContext = new javax.naming.InitialContext();javax.naming.Context envContext = (javax.naming.Context)initContext.lookup("java:/comp/env");javax.sql.DataSource ds = (javax.sql.DataSource)envContext.lookup("aaa");java.sql.Connection conn = ds.getConnection();System.out.println(conn);conn.close(); The following Exception occured HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) org.apache.jsp.B2bSite.test_jsp._jspService(org.apache.jsp.B2bSite.test_jsp:105) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:296) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:246) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) temp.loginServlet.doFilter(loginServlet.java:34) root cause org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780) org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) org.apache.jsp.B2bSite.test_jsp._jspService(org.apache.jsp.B2bSite.test_jsp:88) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:296) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:246) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) temp.loginServlet.doFilter(loginServlet.java:34) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.2 logs. Apache Tomcat/5.5.2 Thanks in advance CSJakharia Subscribe to bermudaEmail: [input] [input] Browse Archives at groups-beta.google.com - Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term'
Re: Cannot create JDBC driver of class '' for connect URL 'null'
Hi, does anyone have any other suggestions that I should try? should i try an earlier version of Tomcat? thanks, Ed Sykes - Original Message - From: "Allistair Crossley" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, November 15, 2004 1:28 PM Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' actually that may also be the jdbc connectivity ;) you are sure your database listener is operational? -Original Message- From: Ed Sykes [mailto:[EMAIL PROTECTED] Sent: Mon 15/11/2004 18:04 To: Tomcat Users List Cc: Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null' Hi Allistair, Thank you very much for helping. Here's my revised server.xml : type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" username="jits" password="testing" maxActive="20" maxIdle="10" maxWait="-1"/> it is located inside the tag Unfortunately, Tomcat responds with: SEVERE: Catalina.stop: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) etc. and doesn't start. Just to make things clear here is the location of the important stuff: my JDBC files: C:\jakarta-tomcat-5.5.4\common\lib my server.xml: C:\jakarta-tomcat-5.5.4\conf my web app: C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\classes\JITS the web app web.xml file: C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF Thanks, Ed Sykes - Original Message - From: "Allistair Crossley" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, November 15, 2004 12:25 PM Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' your docBase should be /ROOT which should in turn contain WEB-INF/web.xml and path can be scrapped ADC > -Original Message- > From: Ed Sykes [mailto:[EMAIL PROTECTED] > Sent: 15 November 2004 17:24 > To: Tomcat Users List > Subject: Re: Cannot create JDBC driver of class '' for connect URL > 'null' > > > Hi Yoav Shapira, > > Thank you for your help. > > I've corrected my server.xml file. the first line now looks like: > > Tomcat starts up properly. > > The Oracle JDBC driver (classes12.jar, classes12dms.jar, and > nls_charset12.jar) are in: > > C:\jakarta-tomcat-5.5.4\common\lib > > > One thing I am worried about is, during Tomcat startup, the > log produces: > INFO: Missing application web.xml, using defaults only > StandardEngine[Catalina].StandardHost[localhost].StandardContext[ROOT] > > do you think this is related to the problem? > it is curious because Tomcat can find and serve up the > Servlet which is > defined in the web.xml file... > > Thanks > -Ed Sykes > > > > > - Original Message - > From: "Shapira, Yoav" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Monday, November 15, 2004 11:59 AM > Subject: RE: Cannot create JDBC driver of class '' for > connect URL 'null' > > > > Hi, > > > docBase="ROOT/WEB-INF/classes/JITS" > > I really doubt you mean these. The context path attribute is the URL > path used by browsers to retrieve your web pages, i.e. > http://yourhost:yourport/path. It's not a filesystem path. > > The context docBase is the root of your webapp. It should point to a > directory which has a WEB-INF subdirectory containing web.xml. > Therefore, I'm guessting your docBase is just "ROOT" and your path is > "". Drop the Web-INF/classes part from both. > > > > > > type="javax.sql.DataSource" > >driverClassName="oracle.jdbc.driver.OracleDriver" > > > > url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" > > > > username="jits" password="mypassword" maxActive="20" > >maxIdle="10" > > > > maxWait="-1"/> > > This looks reasonable. > > > > > As Allistair pointed out and the docs explain, this is no > longer needed > in Tomcat 5.5, and should be removed. > > >org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC > driver > >of class '' for connect URL 'null' > > Where is your JDBC driver file? In common/lib or WEB-INF/lib? It > should be the former if you'
Re: Cannot create JDBC driver of class '' for connect URL 'null'
Hi, I have not changed the server.xml yet. Here's the stacktrace (it dissappears in an instant) and tomcat fails to start. Thanks, -Ed Sykes SEVERE: createMBeans: Throwable java.lang.NullPointerException at org.apache.catalina.mbeans.MBeanUtils.createObjectName(MBeanUtils.java:1221) at org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:533) at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:569) at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:365) at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:534) at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:497) at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:659) at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:627) at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:277) at org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(ServerLifecycleListener.java:128) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2003) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) - Original Message - From: "Allistair Crossley" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, November 15, 2004 1:27 PM Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' it's looking better but this error is interesting. Are you using an API like validator that tries to connect out of an internal corporate network? have you got any more stack trace that what you provided? -Original Message- From: Ed Sykes [mailto:[EMAIL PROTECTED] Sent: Mon 15/11/2004 18:04 To: Tomcat Users List Cc: Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null' Hi Allistair, Thank you very much for helping. Here's my revised server.xml : type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" username="jits" password="testing" maxActive="20" maxIdle="10" maxWait="-1"/> it is located inside the tag Unfortunately, Tomcat responds with: SEVERE: Catalina.stop: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) etc. and doesn't start. Just to make things clear here is the location of the important stuff: my JDBC files: C:\jakarta-tomcat-5.5.4\common\lib my server.xml: C:\jakarta-tomcat-5.5.4\conf my web app: C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\classes\JITS the web app web.xml file: C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF Thanks, Ed Sykes - Original Message ----- From: "Allistair Crossley" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, November 15, 2004 12:25 PM Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' your docBase should be /ROOT which should in turn contain WEB-INF/web.xml and path can be scrapped ADC > -Original Message- > From: Ed Sykes [mailto:[EMAIL PROTECTED] > Sent: 15 November 2004 17:24 > To: Tomcat Users List > Subject: Re: Cannot create JDBC driver of class '' for connect URL > 'null' > > > Hi Yoav Shapira, > > Thank you for your help. > > I've corrected my server.xml file. the first line now looks like: > > Tomcat starts up properly. > > The Oracle JDBC driver (classes12.jar, classes12dms.jar, and > nls_charset12.jar) are in: > > C:\jakarta-tomcat-5.5.4\common\lib > > > One thing I am worried about is, during Tomcat startup, the > log produces: > INFO: Missing application web.xml, using defaults only > StandardEngine[Catalina].StandardHost[localhost].StandardContext[ROOT] > > do you think this is related to the problem? > it is curious because Tomcat
Re: Cannot create JDBC driver of class '' for connect URL 'null'
Hi ! i'm sure everything on the database end is fine. All i'm doing in the Java file ( located in C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\classes\JITS ) is making a database connection at this time. if I use: Class.forName("oracle.jdbc.driver.OracleDriver"); conn = DriverManager.getConnection("jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2", "jits", "pass"); stmt = conn.createStatement(); works fine. So, Tomcat finds the Oracle JDBC driver fine and the version of the JDBC driver is fine. I think it must be something in the server.xml or web.xml or another xml file where Tomcat is expecting to see the parameters for the jdbc driver classname, and the connectionURL.. Thanks, Ed Sykes - Original Message - From: "Allistair Crossley" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, November 15, 2004 1:28 PM Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' actually that may also be the jdbc connectivity ;) you are sure your database listener is operational? -Original Message- From: Ed Sykes [mailto:[EMAIL PROTECTED] Sent: Mon 15/11/2004 18:04 To: Tomcat Users List Cc: Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null' Hi Allistair, Thank you very much for helping. Here's my revised server.xml : type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" username="jits" password="testing" maxActive="20" maxIdle="10" maxWait="-1"/> it is located inside the tag Unfortunately, Tomcat responds with: SEVERE: Catalina.stop: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) etc. and doesn't start. Just to make things clear here is the location of the important stuff: my JDBC files: C:\jakarta-tomcat-5.5.4\common\lib my server.xml: C:\jakarta-tomcat-5.5.4\conf my web app: C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\classes\JITS the web app web.xml file: C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF Thanks, Ed Sykes - Original Message - From: "Allistair Crossley" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, November 15, 2004 12:25 PM Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' your docBase should be /ROOT which should in turn contain WEB-INF/web.xml and path can be scrapped ADC > -Original Message- > From: Ed Sykes [mailto:[EMAIL PROTECTED] > Sent: 15 November 2004 17:24 > To: Tomcat Users List > Subject: Re: Cannot create JDBC driver of class '' for connect URL > 'null' > > > Hi Yoav Shapira, > > Thank you for your help. > > I've corrected my server.xml file. the first line now looks like: > > Tomcat starts up properly. > > The Oracle JDBC driver (classes12.jar, classes12dms.jar, and > nls_charset12.jar) are in: > > C:\jakarta-tomcat-5.5.4\common\lib > > > One thing I am worried about is, during Tomcat startup, the > log produces: > INFO: Missing application web.xml, using defaults only > StandardEngine[Catalina].StandardHost[localhost].StandardContext[ROOT] > > do you think this is related to the problem? > it is curious because Tomcat can find and serve up the > Servlet which is > defined in the web.xml file... > > Thanks > -Ed Sykes > > > > > - Original Message - > From: "Shapira, Yoav" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Monday, November 15, 2004 11:59 AM > Subject: RE: Cannot create JDBC driver of class '' for > connect URL 'null' > > > > Hi, > > > docBase="ROOT/WEB-INF/classes/JITS" > > I really doubt you mean these. The context path attribute is the URL > path used by browsers to retrieve your web pages, i.e. > http://yourhost:yourport/path. It's not a filesystem path. > > The context docBase is the root of your webapp. It should point to a > directory which has a WEB-INF subdirectory containing web.xml. > Therefore, I'm guessting your docBase is just "ROOT" and your path is > "". Drop the Web-INF/classes part from both. > > > > > > type="javax.sql.DataSource" > >driverClassName="oracle.jdbc.driver.OracleDriver" > > > > url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" > > > >
RE: Cannot create JDBC driver of class '' for connect URL 'null'
actually that may also be the jdbc connectivity ;) you are sure your database listener is operational? -Original Message- From: Ed Sykes [mailto:[EMAIL PROTECTED] Sent: Mon 15/11/2004 18:04 To: Tomcat Users List Cc: Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null' Hi Allistair, Thank you very much for helping. Here's my revised server.xml : it is located inside the tag Unfortunately, Tomcat responds with: SEVERE: Catalina.stop: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) etc. and doesn't start. Just to make things clear here is the location of the important stuff: my JDBC files: C:\jakarta-tomcat-5.5.4\common\lib my server.xml: C:\jakarta-tomcat-5.5.4\conf my web app: C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\classes\JITS the web app web.xml file: C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF Thanks, Ed Sykes - Original Message - From: "Allistair Crossley" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, November 15, 2004 12:25 PM Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' your docBase should be /ROOT which should in turn contain WEB-INF/web.xml and path can be scrapped ADC > -Original Message- > From: Ed Sykes [mailto:[EMAIL PROTECTED] > Sent: 15 November 2004 17:24 > To: Tomcat Users List > Subject: Re: Cannot create JDBC driver of class '' for connect URL > 'null' > > > Hi Yoav Shapira, > > Thank you for your help. > > I've corrected my server.xml file. the first line now looks like: > > Tomcat starts up properly. > > The Oracle JDBC driver (classes12.jar, classes12dms.jar, and > nls_charset12.jar) are in: > > C:\jakarta-tomcat-5.5.4\common\lib > > > One thing I am worried about is, during Tomcat startup, the > log produces: > INFO: Missing application web.xml, using defaults only > StandardEngine[Catalina].StandardHost[localhost].StandardContext[ROOT] > > do you think this is related to the problem? > it is curious because Tomcat can find and serve up the > Servlet which is > defined in the web.xml file... > > Thanks > -Ed Sykes > > > > > ----- Original Message ----- > From: "Shapira, Yoav" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Monday, November 15, 2004 11:59 AM > Subject: RE: Cannot create JDBC driver of class '' for > connect URL 'null' > > > > Hi, > > > docBase="ROOT/WEB-INF/classes/JITS" > > I really doubt you mean these. The context path attribute is the URL > path used by browsers to retrieve your web pages, i.e. > http://yourhost:yourport/path. It's not a filesystem path. > > The context docBase is the root of your webapp. It should point to a > directory which has a WEB-INF subdirectory containing web.xml. > Therefore, I'm guessting your docBase is just "ROOT" and your path is > "". Drop the Web-INF/classes part from both. > > >> > > type="javax.sql.DataSource" > >driverClassName="oracle.jdbc.driver.OracleDriver" > > > > url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" > > > > username="jits" password="mypassword" maxActive="20" > >maxIdle="10" > > > > maxWait="-1"/> > > This looks reasonable. > &
RE: Cannot create JDBC driver of class '' for connect URL 'null'
it's looking better but this error is interesting. Are you using an API like validator that tries to connect out of an internal corporate network? have you got any more stack trace that what you provided? -Original Message- From: Ed Sykes [mailto:[EMAIL PROTECTED] Sent: Mon 15/11/2004 18:04 To: Tomcat Users List Cc: Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null' Hi Allistair, Thank you very much for helping. Here's my revised server.xml : it is located inside the tag Unfortunately, Tomcat responds with: SEVERE: Catalina.stop: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) etc. and doesn't start. Just to make things clear here is the location of the important stuff: my JDBC files: C:\jakarta-tomcat-5.5.4\common\lib my server.xml: C:\jakarta-tomcat-5.5.4\conf my web app: C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\classes\JITS the web app web.xml file: C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF Thanks, Ed Sykes - Original Message - From: "Allistair Crossley" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, November 15, 2004 12:25 PM Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' your docBase should be /ROOT which should in turn contain WEB-INF/web.xml and path can be scrapped ADC > -Original Message- > From: Ed Sykes [mailto:[EMAIL PROTECTED] > Sent: 15 November 2004 17:24 > To: Tomcat Users List > Subject: Re: Cannot create JDBC driver of class '' for connect URL > 'null' > > > Hi Yoav Shapira, > > Thank you for your help. > > I've corrected my server.xml file. the first line now looks like: > > Tomcat starts up properly. > > The Oracle JDBC driver (classes12.jar, classes12dms.jar, and > nls_charset12.jar) are in: > > C:\jakarta-tomcat-5.5.4\common\lib > > > One thing I am worried about is, during Tomcat startup, the > log produces: > INFO: Missing application web.xml, using defaults only > StandardEngine[Catalina].StandardHost[localhost].StandardContext[ROOT] > > do you think this is related to the problem? > it is curious because Tomcat can find and serve up the > Servlet which is > defined in the web.xml file... > > Thanks > -Ed Sykes > > > > > - Original Message - > From: "Shapira, Yoav" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Monday, November 15, 2004 11:59 AM > Subject: RE: Cannot create JDBC driver of class '' for > connect URL 'null' > > > > Hi, > > > docBase="ROOT/WEB-INF/classes/JITS" > > I really doubt you mean these. The context path attribute is the URL > path used by browsers to retrieve your web pages, i.e. > http://yourhost:yourport/path. It's not a filesystem path. > > The context docBase is the root of your webapp. It should point to a > directory which has a WEB-INF subdirectory containing web.xml. > Therefore, I'm guessting your docBase is just "ROOT" and your path is > "". Drop the Web-INF/classes part from both. > > >> > > type="javax.sql.DataSource" > >driverClassName="oracle.jdbc.driver.OracleDriver" > > > > url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" > > > > username="jits" password="mypassword" maxActive="20" > >maxIdle="10" > > > >
Re: Cannot create JDBC driver of class '' for connect URL 'null'
Hi Allistair, Thank you very much for helping. Here's my revised server.xml : type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" username="jits" password="testing" maxActive="20" maxIdle="10" maxWait="-1"/> it is located inside the tag Unfortunately, Tomcat responds with: SEVERE: Catalina.stop: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) etc. and doesn't start. Just to make things clear here is the location of the important stuff: my JDBC files: C:\jakarta-tomcat-5.5.4\common\lib my server.xml: C:\jakarta-tomcat-5.5.4\conf my web app: C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\classes\JITS the web app web.xml file: C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF Thanks, Ed Sykes - Original Message - From: "Allistair Crossley" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, November 15, 2004 12:25 PM Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' your docBase should be /ROOT which should in turn contain WEB-INF/web.xml and path can be scrapped ADC -Original Message- From: Ed Sykes [mailto:[EMAIL PROTECTED] Sent: 15 November 2004 17:24 To: Tomcat Users List Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null' Hi Yoav Shapira, Thank you for your help. I've corrected my server.xml file. the first line now looks like: Tomcat starts up properly. The Oracle JDBC driver (classes12.jar, classes12dms.jar, and nls_charset12.jar) are in: C:\jakarta-tomcat-5.5.4\common\lib One thing I am worried about is, during Tomcat startup, the log produces: INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[ROOT] do you think this is related to the problem? it is curious because Tomcat can find and serve up the Servlet which is defined in the web.xml file... Thanks -Ed Sykes - Original Message ----- From: "Shapira, Yoav" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, November 15, 2004 11:59 AM Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' Hi, > I really doubt you mean these. The context path attribute is the URL path used by browsers to retrieve your web pages, i.e. http://yourhost:yourport/path. It's not a filesystem path. The context docBase is the root of your webapp. It should point to a directory which has a WEB-INF subdirectory containing web.xml. Therefore, I'm guessting your docBase is just "ROOT" and your path is "". Drop the Web-INF/classes part from both. > > type="javax.sql.DataSource" >driverClassName="oracle.jdbc.driver.OracleDriver" > > url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" > > username="jits" password="mypassword" maxActive="20" >maxIdle="10" > > maxWait="-1"/> This looks reasonable. > As Allistair pointed out and the docs explain, this is no longer needed in Tomcat 5.5, and should be removed. >org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver >of class '' for connect URL 'null' Where is your JDBC driver file? In common/lib or WEB-INF/lib? It should be the former if you're using DBCP this way. The latter would work using the primitive DriverManager approach and fail with DBCP. Yoav Shapira http://www.yoavshapira.com 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] --- QAS Ltd. Developers of QuickAddress Software http://www.qas.com";>www.qas.com Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- - 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]
RE: Cannot create JDBC driver of class '' for connect URL 'null'
your docBase should be /ROOT which should in turn contain WEB-INF/web.xml and path can be scrapped ADC > -Original Message- > From: Ed Sykes [mailto:[EMAIL PROTECTED] > Sent: 15 November 2004 17:24 > To: Tomcat Users List > Subject: Re: Cannot create JDBC driver of class '' for connect URL > 'null' > > > Hi Yoav Shapira, > > Thank you for your help. > > I've corrected my server.xml file. the first line now looks like: > > Tomcat starts up properly. > > The Oracle JDBC driver (classes12.jar, classes12dms.jar, and > nls_charset12.jar) are in: > > C:\jakarta-tomcat-5.5.4\common\lib > > > One thing I am worried about is, during Tomcat startup, the > log produces: > INFO: Missing application web.xml, using defaults only > StandardEngine[Catalina].StandardHost[localhost].StandardContext[ROOT] > > do you think this is related to the problem? > it is curious because Tomcat can find and serve up the > Servlet which is > defined in the web.xml file... > > Thanks > -Ed Sykes > > > > > - Original Message - > From: "Shapira, Yoav" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Monday, November 15, 2004 11:59 AM > Subject: RE: Cannot create JDBC driver of class '' for > connect URL 'null' > > > > Hi, > > > docBase="ROOT/WEB-INF/classes/JITS" > > I really doubt you mean these. The context path attribute is the URL > path used by browsers to retrieve your web pages, i.e. > http://yourhost:yourport/path. It's not a filesystem path. > > The context docBase is the root of your webapp. It should point to a > directory which has a WEB-INF subdirectory containing web.xml. > Therefore, I'm guessting your docBase is just "ROOT" and your path is > "". Drop the Web-INF/classes part from both. > > >> > > type="javax.sql.DataSource" > >driverClassName="oracle.jdbc.driver.OracleDriver" > > > > url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" > > > > username="jits" password="mypassword" maxActive="20" > >maxIdle="10" > > > > maxWait="-1"/> > > This looks reasonable. > > > > > As Allistair pointed out and the docs explain, this is no > longer needed > in Tomcat 5.5, and should be removed. > > >org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC > driver > >of class '' for connect URL 'null' > > Where is your JDBC driver file? In common/lib or WEB-INF/lib? It > should be the former if you're using DBCP this way. The latter would > work using the primitive DriverManager approach and fail with DBCP. > > Yoav Shapira http://www.yoavshapira.com > > > > 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] > > --- QAS Ltd. Developers of QuickAddress Software http://www.qas.com";>www.qas.com Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot create JDBC driver of class '' for connect URL 'null'
Hi Yoav Shapira, Thank you for your help. I've corrected my server.xml file. the first line now looks like: Tomcat starts up properly. The Oracle JDBC driver (classes12.jar, classes12dms.jar, and nls_charset12.jar) are in: C:\jakarta-tomcat-5.5.4\common\lib One thing I am worried about is, during Tomcat startup, the log produces: INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[ROOT] do you think this is related to the problem? it is curious because Tomcat can find and serve up the Servlet which is defined in the web.xml file... Thanks -Ed Sykes - Original Message - From: "Shapira, Yoav" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, November 15, 2004 11:59 AM Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' Hi, docBase="ROOT/WEB-INF/classes/JITS" I really doubt you mean these. The context path attribute is the URL path used by browsers to retrieve your web pages, i.e. http://yourhost:yourport/path. It's not a filesystem path. The context docBase is the root of your webapp. It should point to a directory which has a WEB-INF subdirectory containing web.xml. Therefore, I'm guessting your docBase is just "ROOT" and your path is "". Drop the Web-INF/classes part from both. type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" username="jits" password="mypassword" maxActive="20" maxIdle="10" maxWait="-1"/> This looks reasonable. As Allistair pointed out and the docs explain, this is no longer needed in Tomcat 5.5, and should be removed. org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' Where is your JDBC driver file? In common/lib or WEB-INF/lib? It should be the former if you're using DBCP this way. The latter would work using the primitive DriverManager approach and fail with DBCP. Yoav Shapira http://www.yoavshapira.com 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]
RE: Cannot create JDBC driver of class '' for connect URL 'null'
i've never seen a path attribute with a value of /ROOT/WEB-INF/classes ... why have you chosen this? > -Original Message- > From: Ed Sykes [mailto:[EMAIL PROTECTED] > Sent: 15 November 2004 16:58 > To: Tomcat Users List > Subject: Re: Cannot create JDBC driver of class '' for connect URL > 'null' > > > Hi Allistair, > > Thanks for your quick response. > I just removed all the ResourceParam elements and it has no effect. > > -Ed > - Original Message - > From: "Allistair Crossley" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Monday, November 15, 2004 11:51 AM > Subject: RE: Cannot create JDBC driver of class '' for > connect URL 'null' > > > Ed, > > Not sure if it will _cause_ it, but you need to remove ResourceParam > elements, as it's all covered in Resource. > > ADC > > > -----Original Message----- > > From: Ed Sykes [mailto:[EMAIL PROTECTED] > > Sent: 15 November 2004 16:49 > > To: [EMAIL PROTECTED] > > Subject: Cannot create JDBC driver of class '' for connect > URL 'null' > > > > > > Hi, > > > > > > > > I'm trying to setup DBCP with Tomcat 5.5.4 with Oracle 8.1.6 > > using Java 1.5.0 > > > > > > > > I've read FAQ, and the Jakarta How-To Docs: > > > > http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasourc > > e-examples-howto.html > > > > > > > > Everything works fine if I don't use connection pooling or > > JNDI lookups. > > > > i.e., > > > > > > > > Class.forName(Connection_Info.JDBC_DRIVER); > > > > conn = DriverManager.getConnection(URL, USERNAME, PASSWORD); > > > > stmt = conn.createStatement(); > > > > > > > > works fine. So, Tomcat finds the Oracle JDBC driver fine. > > > > > > > > I'm getting the following error: > > > > > > > > Cannot create JDBC driver of class '' for connect URL 'null' > > > > > > > > Here's is the section I've added to > > C:\jakarta-tomcat-5.5.4\conf\server.xml > > > > > > > > > docBase="ROOT/WEB-INF/classes/JITS" > > > > debug="5" reloadable="true" crossContext="true"> > > > > > > > > > > > type="javax.sql.DataSource" > > driverClassName="oracle.jdbc.driver.OracleDriver" > > > > > url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" > > > > username="jits" password="mypassword" > > maxActive="20" maxIdle="10" > > > > maxWait="-1"/> > > > > > > > > > > > > > > > > factory > > > > org.apache.commons.dbcp.BasicDataSourceFactory > > > > > > > > > > > > driverClassName > > > > oracle.jdbc.driver.OracleDriver > > > > > > > > > > > > url > > > > jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2 > > > > > > > > > > > > username > > > > jits > > > > > > > > > > > > password > > > > mypassword > > > > > > > > > > > > maxActive > > > > 20 > > > > > > > > > > > > maxIdle > > > > 10 > > > > > > > > > > > > maxWait > > > > -1 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Here's the contents of > > C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\web.xml > > > > > > > > > > > > > > > > JITS.ImageServer > > > > JITS.ImageServer > > > > > > > > > > > > > > > > JITS.ImageServer > > > > /servlet/JITS.ImageServer > > > > > > > > > > > > > > > > Oracle Datasource example > > > > jdbc/myoracle > > > > javax.sql.DataSource > > > > Container &g
RE: Cannot create JDBC driver of class '' for connect URL 'null'
Hi, >http://yourhost:yourport/path. It's not a filesystem path. The context docBase is the root of your webapp. It should point to a directory which has a WEB-INF subdirectory containing web.xml. Therefore, I'm guessting your docBase is just "ROOT" and your path is "". Drop the Web-INF/classes part from both. > > type="javax.sql.DataSource" >driverClassName="oracle.jdbc.driver.OracleDriver" > > url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" > > username="jits" password="mypassword" maxActive="20" >maxIdle="10" > > maxWait="-1"/> This looks reasonable. > As Allistair pointed out and the docs explain, this is no longer needed in Tomcat 5.5, and should be removed. >org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver >of class '' for connect URL 'null' Where is your JDBC driver file? In common/lib or WEB-INF/lib? It should be the former if you're using DBCP this way. The latter would work using the primitive DriverManager approach and fail with DBCP. Yoav Shapira http://www.yoavshapira.com 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: Cannot create JDBC driver of class '' for connect URL 'null'
Hi Allistair, I'll read through it and report back. Thanks !! -Ed - Original Message - From: "Allistair Crossley" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, November 15, 2004 11:53 AM Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' Also, you may want to look at configuring your webapp outside of server.xml using the tomcat/Catalina/localhost/ROOT.xml method I recently discussed this here http://www.adcworks.com/blog/index.php/archives/2004/11/14/getting-up-and-running-with-tomcat-55 Hope it helps, ADC. -Original Message- From: Ed Sykes [mailto:[EMAIL PROTECTED] Sent: 15 November 2004 16:49 To: [EMAIL PROTECTED] Subject: Cannot create JDBC driver of class '' for connect URL 'null' Hi, I'm trying to setup DBCP with Tomcat 5.5.4 with Oracle 8.1.6 using Java 1.5.0 I've read FAQ, and the Jakarta How-To Docs: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasourc e-examples-howto.html Everything works fine if I don't use connection pooling or JNDI lookups. i.e., Class.forName(Connection_Info.JDBC_DRIVER); conn = DriverManager.getConnection(URL, USERNAME, PASSWORD); stmt = conn.createStatement(); works fine. So, Tomcat finds the Oracle JDBC driver fine. I'm getting the following error: Cannot create JDBC driver of class '' for connect URL 'null' Here's is the section I've added to C:\jakarta-tomcat-5.5.4\conf\server.xml debug="5" reloadable="true" crossContext="true"> type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" username="jits" password="mypassword" maxActive="20" maxIdle="10" maxWait="-1"/> factory org.apache.commons.dbcp.BasicDataSourceFactory driverClassName oracle.jdbc.driver.OracleDriver url jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2 username jits password mypassword maxActive 20 maxIdle 10 maxWait -1 Here's the contents of C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\web.xml JITS.ImageServer JITS.ImageServer JITS.ImageServer /servlet/JITS.ImageServer Oracle Datasource example jdbc/myoracle javax.sql.DataSource Container In my java file ( ImageServer.java ) : Context initContext = new InitialContext(); System.out.println("1 got an initial context from JNDI"); Context envContext = (Context)initContext.lookup("java:/comp/env"); System.out.println("2 got a context from JNDI"); DataSource ds = (DataSource)envContext.lookup("jdbc/myoracle"); System.out.println("3 got a datasource from JNDI"); Connection conn = ds.getConnection(); System.out.println("4 got a connection from the pool"); OUTPUT: 1 got an initial context from JNDI 2 got a context from JNDI 3 got a datasource from JNDI org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(B asicDataSource.java:780) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(Basi cDataSource.java:554) at JITS.ImageServer.getImage(ImageServer.java:48) Any suggestions would be gratefully appreciated ! Sincerely, Ed Sykes --- QAS Ltd. Developers of QuickAddress Software http://www.qas.com";>www.qas.com Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- - 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]
Re: Cannot create JDBC driver of class '' for connect URL 'null'
Hi Allistair, Thanks for your quick response. I just removed all the ResourceParam elements and it has no effect. -Ed - Original Message - From: "Allistair Crossley" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, November 15, 2004 11:51 AM Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' Ed, Not sure if it will _cause_ it, but you need to remove ResourceParam elements, as it's all covered in Resource. ADC -Original Message- From: Ed Sykes [mailto:[EMAIL PROTECTED] Sent: 15 November 2004 16:49 To: [EMAIL PROTECTED] Subject: Cannot create JDBC driver of class '' for connect URL 'null' Hi, I'm trying to setup DBCP with Tomcat 5.5.4 with Oracle 8.1.6 using Java 1.5.0 I've read FAQ, and the Jakarta How-To Docs: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasourc e-examples-howto.html Everything works fine if I don't use connection pooling or JNDI lookups. i.e., Class.forName(Connection_Info.JDBC_DRIVER); conn = DriverManager.getConnection(URL, USERNAME, PASSWORD); stmt = conn.createStatement(); works fine. So, Tomcat finds the Oracle JDBC driver fine. I'm getting the following error: Cannot create JDBC driver of class '' for connect URL 'null' Here's is the section I've added to C:\jakarta-tomcat-5.5.4\conf\server.xml debug="5" reloadable="true" crossContext="true"> type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" username="jits" password="mypassword" maxActive="20" maxIdle="10" maxWait="-1"/> factory org.apache.commons.dbcp.BasicDataSourceFactory driverClassName oracle.jdbc.driver.OracleDriver url jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2 username jits password mypassword maxActive 20 maxIdle 10 maxWait -1 Here's the contents of C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\web.xml JITS.ImageServer JITS.ImageServer JITS.ImageServer /servlet/JITS.ImageServer Oracle Datasource example jdbc/myoracle javax.sql.DataSource Container In my java file ( ImageServer.java ) : Context initContext = new InitialContext(); System.out.println("1 got an initial context from JNDI"); Context envContext = (Context)initContext.lookup("java:/comp/env"); System.out.println("2 got a context from JNDI"); DataSource ds = (DataSource)envContext.lookup("jdbc/myoracle"); System.out.println("3 got a datasource from JNDI"); Connection conn = ds.getConnection(); System.out.println("4 got a connection from the pool"); OUTPUT: 1 got an initial context from JNDI 2 got a context from JNDI 3 got a datasource from JNDI org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(B asicDataSource.java:780) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(Basi cDataSource.java:554) at JITS.ImageServer.getImage(ImageServer.java:48) Any suggestions would be gratefully appreciated ! Sincerely, Ed Sykes --- QAS Ltd. Developers of QuickAddress Software http://www.qas.com";>www.qas.com Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- - 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]
RE: Cannot create JDBC driver of class '' for connect URL 'null'
Also, you may want to look at configuring your webapp outside of server.xml using the tomcat/Catalina/localhost/ROOT.xml method I recently discussed this here http://www.adcworks.com/blog/index.php/archives/2004/11/14/getting-up-and-running-with-tomcat-55 Hope it helps, ADC. > -Original Message- > From: Ed Sykes [mailto:[EMAIL PROTECTED] > Sent: 15 November 2004 16:49 > To: [EMAIL PROTECTED] > Subject: Cannot create JDBC driver of class '' for connect URL 'null' > > > Hi, > > > > I'm trying to setup DBCP with Tomcat 5.5.4 with Oracle 8.1.6 > using Java 1.5.0 > > > > I've read FAQ, and the Jakarta How-To Docs: > > http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasourc > e-examples-howto.html > > > > Everything works fine if I don't use connection pooling or > JNDI lookups. > > i.e., > > > > Class.forName(Connection_Info.JDBC_DRIVER); > > conn = DriverManager.getConnection(URL, USERNAME, PASSWORD); > > stmt = conn.createStatement(); > > > > works fine. So, Tomcat finds the Oracle JDBC driver fine. > > > > I'm getting the following error: > > > > Cannot create JDBC driver of class '' for connect URL 'null' > > > > Here's is the section I've added to > C:\jakarta-tomcat-5.5.4\conf\server.xml > > > > docBase="ROOT/WEB-INF/classes/JITS" > > debug="5" reloadable="true" crossContext="true"> > > > > > type="javax.sql.DataSource" > driverClassName="oracle.jdbc.driver.OracleDriver" > > url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" > > username="jits" password="mypassword" > maxActive="20" maxIdle="10" > > maxWait="-1"/> > > > > > > > > factory > > org.apache.commons.dbcp.BasicDataSourceFactory > > > > > > driverClassName > > oracle.jdbc.driver.OracleDriver > > > > > > url > > jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2 > > > > > > username > > jits > > > > > > password > > mypassword > > > > > > maxActive > > 20 > > > > > > maxIdle > > 10 > > > > > > maxWait > > -1 > > > > > > > > > > > > > > > > > > > > Here's the contents of > C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\web.xml > > > > > > > > JITS.ImageServer > > JITS.ImageServer > > > > > > > > JITS.ImageServer > > /servlet/JITS.ImageServer > > > > > > > > Oracle Datasource example > > jdbc/myoracle > > javax.sql.DataSource > > Container > > > > > > > > > > In my java file ( ImageServer.java ) : > > > > > > Context initContext = new InitialContext(); > > System.out.println("1 got an initial context from JNDI"); > > > > Context envContext = > (Context)initContext.lookup("java:/comp/env"); > > System.out.println("2 got a context from JNDI"); > > > > DataSource ds = > (DataSource)envContext.lookup("jdbc/myoracle"); > > System.out.println("3 got a datasource from JNDI"); > > > > > > Connection conn = ds.getConnection(); > > System.out.println("4 got a connection from the pool"); > > > > > > > > OUTPUT: > > 1 got an initial context from JNDI > > 2 got a context from JNDI > > 3 got a datasource from JNDI > > org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create > JDBC driver of class '' for connect URL 'null' > > at > org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(B > asicDataSource.java:780) > > at > org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(Basi > cDataSource.java:554) > > at JITS.ImageServer.getImage(ImageServer.java:48) > > > > > > Any suggestions would be gratefully appreciated ! > > > > Sincerely, > > Ed Sykes > > > > > --- QAS Ltd. Developers of QuickAddress Software http://www.qas.com";>www.qas.com Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot create JDBC driver of class '' for connect URL 'null'
Ed, Not sure if it will _cause_ it, but you need to remove ResourceParam elements, as it's all covered in Resource. ADC > -Original Message- > From: Ed Sykes [mailto:[EMAIL PROTECTED] > Sent: 15 November 2004 16:49 > To: [EMAIL PROTECTED] > Subject: Cannot create JDBC driver of class '' for connect URL 'null' > > > Hi, > > > > I'm trying to setup DBCP with Tomcat 5.5.4 with Oracle 8.1.6 > using Java 1.5.0 > > > > I've read FAQ, and the Jakarta How-To Docs: > > http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasourc > e-examples-howto.html > > > > Everything works fine if I don't use connection pooling or > JNDI lookups. > > i.e., > > > > Class.forName(Connection_Info.JDBC_DRIVER); > > conn = DriverManager.getConnection(URL, USERNAME, PASSWORD); > > stmt = conn.createStatement(); > > > > works fine. So, Tomcat finds the Oracle JDBC driver fine. > > > > I'm getting the following error: > > > > Cannot create JDBC driver of class '' for connect URL 'null' > > > > Here's is the section I've added to > C:\jakarta-tomcat-5.5.4\conf\server.xml > > > > docBase="ROOT/WEB-INF/classes/JITS" > > debug="5" reloadable="true" crossContext="true"> > > > > > type="javax.sql.DataSource" > driverClassName="oracle.jdbc.driver.OracleDriver" > > url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2" > > username="jits" password="mypassword" > maxActive="20" maxIdle="10" > > maxWait="-1"/> > > > > > > > > factory > > org.apache.commons.dbcp.BasicDataSourceFactory > > > > > > driverClassName > > oracle.jdbc.driver.OracleDriver > > > > > > url > > jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2 > > > > > > username > > jits > > > > > > password > > mypassword > > > > > > maxActive > > 20 > > > > > > maxIdle > > 10 > > > > > > maxWait > > -1 > > > > > > > > > > > > > > > > > > > > Here's the contents of > C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\web.xml > > > > > > > > JITS.ImageServer > > JITS.ImageServer > > > > > > > > JITS.ImageServer > > /servlet/JITS.ImageServer > > > > > > > > Oracle Datasource example > > jdbc/myoracle > > javax.sql.DataSource > > Container > > > > > > > > > > In my java file ( ImageServer.java ) : > > > > > > Context initContext = new InitialContext(); > > System.out.println("1 got an initial context from JNDI"); > > > > Context envContext = > (Context)initContext.lookup("java:/comp/env"); > > System.out.println("2 got a context from JNDI"); > > > > DataSource ds = > (DataSource)envContext.lookup("jdbc/myoracle"); > > System.out.println("3 got a datasource from JNDI"); > > > > > > Connection conn = ds.getConnection(); > > System.out.println("4 got a connection from the pool"); > > > > > > > > OUTPUT: > > 1 got an initial context from JNDI > > 2 got a context from JNDI > > 3 got a datasource from JNDI > > org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create > JDBC driver of class '' for connect URL 'null' > > at > org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(B > asicDataSource.java:780) > > at > org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(Basi > cDataSource.java:554) > > at JITS.ImageServer.getImage(ImageServer.java:48) > > > > > > Any suggestions would be gratefully appreciated ! > > > > Sincerely, > > Ed Sykes > > > > > --- QAS Ltd. Developers of QuickAddress Software http://www.qas.com";>www.qas.com Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cannot create JDBC driver of class '' for connect URL 'null'
Hi, I'm trying to setup DBCP with Tomcat 5.5.4 with Oracle 8.1.6 using Java 1.5.0 I've read FAQ, and the Jakarta How-To Docs: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html Everything works fine if I don't use connection pooling or JNDI lookups. i.e., Class.forName(Connection_Info.JDBC_DRIVER); conn = DriverManager.getConnection(URL, USERNAME, PASSWORD); stmt = conn.createStatement(); works fine. So, Tomcat finds the Oracle JDBC driver fine. I'm getting the following error: Cannot create JDBC driver of class '' for connect URL 'null' Here's is the section I've added to C:\jakarta-tomcat-5.5.4\conf\server.xml factory org.apache.commons.dbcp.BasicDataSourceFactory driverClassName oracle.jdbc.driver.OracleDriver url jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2 username jits password mypassword maxActive 20 maxIdle 10 maxWait -1 Here's the contents of C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\web.xml JITS.ImageServer JITS.ImageServer JITS.ImageServer /servlet/JITS.ImageServer Oracle Datasource example jdbc/myoracle javax.sql.DataSource Container In my java file ( ImageServer.java ) : Context initContext = new InitialContext(); System.out.println("1 got an initial context from JNDI"); Context envContext = (Context)initContext.lookup("java:/comp/env"); System.out.println("2 got a context from JNDI"); DataSource ds = (DataSource)envContext.lookup("jdbc/myoracle"); System.out.println("3 got a datasource from JNDI"); Connection conn = ds.getConnection(); System.out.println("4 got a connection from the pool"); OUTPUT: 1 got an initial context from JNDI 2 got a context from JNDI 3 got a datasource from JNDI org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:554) at JITS.ImageServer.getImage(ImageServer.java:48) Any suggestions would be gratefully appreciated ! Sincerely, Ed Sykes
Re: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver
Thanks a lot!!! cheers, Isen Shapira, Yoav wrote: Hi, If it's inside GlobalNamingResources, you need a to it in your Context. You should also place a in your web.xml, but you may have done that already (you didn't post web.xml). Yoav Shapira Millennium Research Informatics -Original Message- From: Isen,Ciji [mailto:[EMAIL PROTECTED] Sent: Monday, August 02, 2004 3:49 PM To: Tomcat Users List Subject: Re: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver I wanted to tinker around hence i decide to just test using a jsp. The jsp code is pasted below. <[EMAIL PROTECTED] contentType="text/html"%> <%@ page import="java.util.*" %> JSP Page <% Connection conn = null; DBManager dbMan = null; Context ctx = new InitialContext(); if(ctx == null ) throw new DBLibraryBaseException("Boom - No Context"); Context envContext=(Context)ctx.lookup("java:comp/env"); if(envContext == null ) throw new DBLibraryBaseException("Boom - java:comp/env - No Context"); DataSource myDataSource =(DataSource)envContext.lookup("jdbc/EconDollarsDB"); if (myDataSource != null) { conn = myDataSource.getConnection(); }else{ System.out.println("jdbc/EconDollarsDB' is an unknown DataSource"); } %> Pasted below is the server.xml files part that i added. url jdbc:mysql://localhost:3306/EconDollars?autoReconnect=true e> validationQuery select * from major maxIdle 5 maxActive 20 driverClassName com.mysql.jdbc.Driver maxWait 1 username asdf factory org.apache.commons.dbcp.BasicDataSourceFactory password asdf This is placed inside GlobalNamingResources. Robert Bateman wrote: Please show us the source that is causing this error... On Monday 02 August 2004 02:44 pm, Isen,Ciji wrote: Hi, I am using tomcat-5. I was trying out the connection pooling in it. I did things as per their documentation but ended up with this error. javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver Does anyone have any idea what and what this is. I am at loss why after finding the JDNI resource its not able to pick up its parameters. regards, Isen - 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] 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]
Re: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver
Oh ya. That was the problem. :-)) It was searching for the resource in the context. But i am surprised that its not able to access a Global resource. Logically the top level resource ought to be available at the lower levels too. regards, Isen Shapira, Yoav wrote: Hi, If it's inside GlobalNamingResources, you need a to it in your Context. You should also place a in your web.xml, but you may have done that already (you didn't post web.xml). Yoav Shapira Millennium Research Informatics -Original Message- From: Isen,Ciji [mailto:[EMAIL PROTECTED] Sent: Monday, August 02, 2004 3:49 PM To: Tomcat Users List Subject: Re: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver I wanted to tinker around hence i decide to just test using a jsp. The jsp code is pasted below. <[EMAIL PROTECTED] contentType="text/html"%> <%@ page import="java.util.*" %> JSP Page <% Connection conn = null; DBManager dbMan = null; Context ctx = new InitialContext(); if(ctx == null ) throw new DBLibraryBaseException("Boom - No Context"); Context envContext=(Context)ctx.lookup("java:comp/env"); if(envContext == null ) throw new DBLibraryBaseException("Boom - java:comp/env - No Context"); DataSource myDataSource =(DataSource)envContext.lookup("jdbc/EconDollarsDB"); if (myDataSource != null) { conn = myDataSource.getConnection(); }else{ System.out.println("jdbc/EconDollarsDB' is an unknown DataSource"); } %> Pasted below is the server.xml files part that i added. url jdbc:mysql://localhost:3306/EconDollars?autoReconnect=true e> validationQuery select * from major maxIdle 5 maxActive 20 driverClassName com.mysql.jdbc.Driver maxWait 1 username asdf factory org.apache.commons.dbcp.BasicDataSourceFactory password asdf This is placed inside GlobalNamingResources. Robert Bateman wrote: Please show us the source that is causing this error... On Monday 02 August 2004 02:44 pm, Isen,Ciji wrote: Hi, I am using tomcat-5. I was trying out the connection pooling in it. I did things as per their documentation but ended up with this error. javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver Does anyone have any idea what and what this is. I am at loss why after finding the JDNI resource its not able to pick up its parameters. regards, Isen - 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] 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]
RE: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver
Hi, If it's inside GlobalNamingResources, you need a to it in your Context. You should also place a in your web.xml, but you may have done that already (you didn't post web.xml). Yoav Shapira Millennium Research Informatics >-Original Message- >From: Isen,Ciji [mailto:[EMAIL PROTECTED] >Sent: Monday, August 02, 2004 3:49 PM >To: Tomcat Users List >Subject: Re: javax.servlet.ServletException: Cannot create JDBC driver of >class '' for connect URL 'null', cause: No suitable driver > >I wanted to tinker around hence i decide to just test using a jsp. The >jsp code is pasted below. > ><[EMAIL PROTECTED] contentType="text/html"%> > ><%@ page import="java.util.*" %> > > >JSP Page > > ><% >Connection conn = null; >DBManager dbMan = null; >Context ctx = new InitialContext(); >if(ctx == null ) > throw new DBLibraryBaseException("Boom - No Context"); >Context envContext=(Context)ctx.lookup("java:comp/env"); >if(envContext == null ) > throw new DBLibraryBaseException("Boom - >java:comp/env - No Context"); > >DataSource myDataSource >=(DataSource)envContext.lookup("jdbc/EconDollarsDB"); >if (myDataSource != null) { > conn = myDataSource.getConnection(); >}else{ >System.out.println("jdbc/EconDollarsDB' is >an unknown DataSource"); >} >%> > > > >Pasted below is the server.xml files part that i added. > type="javax.sql.DataSource"/> > > >url > >jdbc:mysql://localhost:3306/EconDollars?autoReconnect=true > > >validationQuery >select * from major > > >maxIdle >5 > > >maxActive >20 > > >driverClassName >com.mysql.jdbc.Driver > > >maxWait >1 > > >username >asdf > > >factory >org.apache.commons.dbcp.BasicDataSourceFactory > > >password >asdf > > > >This is placed inside GlobalNamingResources. > > > > >Robert Bateman wrote: > >>Please show us the source that is causing this error... >> >> >>On Monday 02 August 2004 02:44 pm, Isen,Ciji wrote: >> >> >>>Hi, >>>I am using tomcat-5. I was trying out the connection pooling in it. I did >>>things as per their documentation but ended up with this error. >>>javax.servlet.ServletException: Cannot create JDBC driver of class '' for >>>connect URL 'null', cause: No suitable driver Does anyone have any idea >>>what and what this is. I am at loss why after finding the JDNI resource >its >>>not able to pick up its parameters. >>> >>>regards, >>>Isen >>> >>> >>> >>> >> >> >>- >>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] 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: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver
I had tried that. It used to be in commons but felt may be its not able to find the driver and so tried to move it to common.lib. But that too didnt help!! :-((( Isen Shapira, Yoav wrote: Hi, Is the driver in the common/lib directory? Yoav Shapira Millennium Research Informatics -Original Message- From: Robert Bateman [mailto:[EMAIL PROTECTED] Sent: Monday, August 02, 2004 3:02 PM To: Tomcat Users List Subject: Re: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver Please show us the source that is causing this error... On Monday 02 August 2004 02:44 pm, Isen,Ciji wrote: Hi, I am using tomcat-5. I was trying out the connection pooling in it. I did things as per their documentation but ended up with this error. javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver Does anyone have any idea what and what this is. I am at loss why after finding the JDNI resource its not able to pick up its parameters. regards, Isen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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]
Re: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver
I wanted to tinker around hence i decide to just test using a jsp. The jsp code is pasted below. <[EMAIL PROTECTED] contentType="text/html"%> <%@ page import="java.util.*" %> JSP Page <% Connection conn = null; DBManager dbMan = null; Context ctx = new InitialContext(); if(ctx == null ) throw new DBLibraryBaseException("Boom - No Context"); Context envContext=(Context)ctx.lookup("java:comp/env"); if(envContext == null ) throw new DBLibraryBaseException("Boom - java:comp/env - No Context"); DataSource myDataSource =(DataSource)envContext.lookup("jdbc/EconDollarsDB"); if (myDataSource != null) { conn = myDataSource.getConnection(); }else{ System.out.println("jdbc/EconDollarsDB' is an unknown DataSource"); } %> Pasted below is the server.xml files part that i added. url jdbc:mysql://localhost:3306/EconDollars?autoReconnect=true validationQuery select * from major maxIdle 5 maxActive 20 driverClassName com.mysql.jdbc.Driver maxWait 1 username asdf factory org.apache.commons.dbcp.BasicDataSourceFactory password asdf This is placed inside GlobalNamingResources. Robert Bateman wrote: Please show us the source that is causing this error... On Monday 02 August 2004 02:44 pm, Isen,Ciji wrote: Hi, I am using tomcat-5. I was trying out the connection pooling in it. I did things as per their documentation but ended up with this error. javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver Does anyone have any idea what and what this is. I am at loss why after finding the JDNI resource its not able to pick up its parameters. regards, Isen - 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]
Re: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver
Hi Isen. This is a common problem and usually means your JNDI naming is inconsistent or your missing config info in one or more of the following files: server.xml ( if you defined your JDBC resource here ) [context].xml web.xml Java code Essentially make sure there are no spelling/capitalization mistakes and all the necessary parts are there, including the JDBC driver jar file in the common/lib directory. The JNDI howtos on the Jakarta site is a good place to look: (these are for tomcat 5, there should be equivalents for tomcat 4) http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html If you're still running into brick walls, post appropriate sections of all the above files replacing security sensitive sections (database username, password) with *'s or something. --David Isen,Ciji wrote: Hi, I am using tomcat-5. I was trying out the connection pooling in it. I did things as per their documentation but ended up with this error. javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver Does anyone have any idea what and what this is. I am at loss why after finding the JDNI resource its not able to pick up its parameters. regards, Isen - 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]
RE: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver
Hi, Is the driver in the common/lib directory? Yoav Shapira Millennium Research Informatics >-Original Message- >From: Robert Bateman [mailto:[EMAIL PROTECTED] >Sent: Monday, August 02, 2004 3:02 PM >To: Tomcat Users List >Subject: Re: javax.servlet.ServletException: Cannot create JDBC driver of >class '' for connect URL 'null', cause: No suitable driver > >Please show us the source that is causing this error... > > >On Monday 02 August 2004 02:44 pm, Isen,Ciji wrote: >> Hi, >> I am using tomcat-5. I was trying out the connection pooling in it. I did >> things as per their documentation but ended up with this error. >> javax.servlet.ServletException: Cannot create JDBC driver of class '' for >> connect URL 'null', cause: No suitable driver Does anyone have any idea >> what and what this is. I am at loss why after finding the JDNI resource >its >> not able to pick up its parameters. >> >> regards, >> Isen >> >> > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] 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: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver
Please show us the source that is causing this error... On Monday 02 August 2004 02:44 pm, Isen,Ciji wrote: > Hi, > I am using tomcat-5. I was trying out the connection pooling in it. I did > things as per their documentation but ended up with this error. > javax.servlet.ServletException: Cannot create JDBC driver of class '' for > connect URL 'null', cause: No suitable driver Does anyone have any idea > what and what this is. I am at loss why after finding the JDNI resource its > not able to pick up its parameters. > > regards, > Isen > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver
Hi, I am using tomcat-5. I was trying out the connection pooling in it. I did things as per their documentation but ended up with this error. javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver Does anyone have any idea what and what this is. I am at loss why after finding the JDNI resource its not able to pick up its parameters. regards, Isen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
Hmm I have fixed the problem, but in a weird way. Instead of using host "resk", which I specified inside my /etc/hosts: # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost 127.0.0.1 localhost.localdomain resk And I had no problem retrieveing my JSPs under that hostâ Everything seemed to be just fine, but for some reason the JDBC resources coulndât be foundâ I wonderâ I didnât change anything at all, except for moving my ROOT.xml into /conf/Catalina/localhost and changing the docBase=ââ directory. So, Looks like it wasnât Tomcatâs fault after all. â or was it? :-) However, if any of you know what the problem was, Iâd be glad to find out, so if I face this kind of stuff in the future, Iâd know what to doâ > -Original Message- > From: Ivan Jouikov [mailto:[EMAIL PROTECTED] > Sent: Sunday, July 11, 2004 10:04 PM > To: 'Tomcat Users List' > Subject: RE: org.apache.commons.dbcp.SQLNestedException: Cannot create > JDBC driver of class '' for connect URL 'null' > > Just to make sure that thereâs no problems with my code, I wrote the > following page and tried it. TADA! I get the same goddamn error: > > <%@ page language="java" import="javax.naming.*, javax.sql.*, java.sql.*" > %> > > Hello! Running DB test... > > <% > DataSource ds = (DataSource)new > InitialContext().lookup("java:comp/env/jdbc/RESK"); > %> > > DS looked up! > > <%-- IT EXECUTED UP TO HERE. EVRYTHING WAS FINE. THEN I ADDED THE BOTTOM > PART AND GOT THE âcannot create ââ ERROR! --%> > > Now trying to execute a query... > > <% > Connection con = ds.getConnection(); > PreparedStatement st = con.prepareStatement("SELECT CURTIME()"); > ResultSet rs = st.executeQuery(); > rs.next(); > String time = rs.getString(1); > rs.close(); > st.close(); > con.close(); > %> > > Time is: <%=time%> !!! > > I just wish tomcat developers actually tested their shit before putting > it out. > > >_ > > From: Ivan Jouikov [mailto:[EMAIL PROTECTED] > Sent: Sunday, July 11, 2004 9:28 PM > To: 'Tomcat Users List' > Subject: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC > driver of class '' for connect URL 'null' > > > > When they compiled the latest âstableâ Tomcat, did they bother to test it > before putting it out? > > I looke through the entire google, and through this entire list, and I > found lots of people having this problem. Yet, I didnât find any > solutions (that worked for me that is). > > Basically, hereâs what I have: > > Iâm running Tomcat 5.0.27 on Java 1.5 beta 2; I am using MySQL 4.1.2 > > Inside /common/lib/ I have mysql-connector.jar which is 3.0.14 â > production version. > > Inside my server.xml I have (relevant stuff): > >unpackWARs="true" liveDeploy="true"> > > > > Inside my /conf/Catalina/resk I have resk.xml: > > > tried /home/resk/web/ROOT > path="/" reloadable="false"> > value="java:comp/env/jdbc/RESK"/> // BTW I tried without this line >type="javax.sql.DataSource"/> > > > url > > jdbc:mysql://127.0.0.1:3306/resk?autoReconnect=true > > > maxIdle > 2 > > > maxActive > 10 > > > driverClassName > com.mysql.jdbc.Driver > > > maxWait > 1 > > > removeAbandoned > true > > > username > resk > > > factory > org.apache.commons.dbcp.BasicDataSourceFactory > > > removeAbandonedTimeout > 60 > > > password > RESK > > > > > Inside my /home/resk/web/ROOT/WEB-INF/ I have web.xml (relevant stuff): > >xmlns="http://java.sun.com/xml/ns/j2ee"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; > > > > DB Connection > jdbc/RESK > javax.sql.DataSource > Container > > > > >
RE: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
Just to make sure that thereâs no problems with my code, I wrote the following page and tried it. TADA! I get the same goddamn error: <%@ page language="java" import="javax.naming.*, javax.sql.*, java.sql.*" %> Hello! Running DB test... <% DataSource ds = (DataSource)new InitialContext().lookup("java:comp/env/jdbc/RESK"); %> DS looked up! <%-- IT EXECUTED UP TO HERE. EVRYTHING WAS FINE. THEN I ADDED THE BOTTOM PART AND GOT THE âcannot create ââ ERROR! --%> Now trying to execute a query... <% Connection con = ds.getConnection(); PreparedStatement st = con.prepareStatement("SELECT CURTIME()"); ResultSet rs = st.executeQuery(); rs.next(); String time = rs.getString(1); rs.close(); st.close(); con.close(); %> Time is: <%=time%> !!! I just wish tomcat developers actually tested their shit before putting it out. _ From: Ivan Jouikov [mailto:[EMAIL PROTECTED] Sent: Sunday, July 11, 2004 9:28 PM To: 'Tomcat Users List' Subject: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' When they compiled the latest âstableâ Tomcat, did they bother to test it before putting it out? I looke through the entire google, and through this entire list, and I found lots of people having this problem. Yet, I didnât find any solutions (that worked for me that is). Basically, hereâs what I have: Iâm running Tomcat 5.0.27 on Java 1.5 beta 2; I am using MySQL 4.1.2 Inside /common/lib/ I have mysql-connector.jar which is 3.0.14 â production version. Inside my server.xml I have (relevant stuff): Inside my /conf/Catalina/resk I have resk.xml: // BTW I tried without this line url jdbc:mysql://127.0.0.1:3306/resk?autoReconnect=true maxIdle 2 maxActive 10 driverClassName com.mysql.jdbc.Driver maxWait 1 removeAbandoned true username resk factory org.apache.commons.dbcp.BasicDataSourceFactory removeAbandonedTimeout 60 password RESK Inside my /home/resk/web/ROOT/WEB-INF/ I have web.xml (relevant stuff): http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; > DB Connection jdbc/RESK javax.sql.DataSource Container data.source.name java.lang.String java:comp/env/jdbc/RESK Now, hereâs how I load the data source (relevant part of the class): public class Manager { DataSource ds; static Manager instance; private Manager() { try { // This is all the web.xml properties InitialContext context = new InitialContext(); dbDataSource = (String)context.lookup("java:comp/env/data.source.name"); ds = (DataSource) new InitialContext().lookup(dbDataSource); } catch ( NamingException e ) { Logger.getLogger("problem").fatal("Unable to load database data source!",e); ds = null; // This will throw enough exceptions to notice the problem :) } } /** * @return instance of the Manager. */ public static Manager getInstance() { if (instance == null) instance = new Manager(); return instance; } /** * @return Connection from the pool. Make sure to close it when done. */ public synchronized Connection getConnection() throws SQLException { return ds.getConnection(); } â } Now, interesting thing to note. If I look at my catalina_log.2004-07-11.txt, I will find the following: 2004-07-11 20:47:47 NamingContextListener[/Catalina/resk/]: Resource parameters for jdbc/RESK = ResourceParams[name=jdbc/RESK, parameters={url=jdbc:mysql://127.0.0.1:3306/resk?autoReconnect=true, maxIdle=2, maxActive=10, driverClassName=com.mysql.jdbc.Driver, maxWait=1,
RE: Cannot create JDBC driver of class '' for connect URL 'null' -- RESOLVED
Hi All, Wanna share the solution, If you look the error Error Caught while creating a connection in EPP dB: = org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, cause: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135290880)(ERR=12505)(ERROR_STACK=( ERROR=(CODE=12505)(EMFI=4 ORA Error Code "12505" means "TNS:listener could not resolve SID given in connect descriptor" After correcting every thing is woking fine .. Thanks ABhay -Original Message- From: Harry Mantheakis [mailto:[EMAIL PROTECTED] Sent: Monday, April 05, 2004 1:56 PM To: Tomcat Users List Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null' Importance: High Hello > What is postgresql JAR? It is the JDBC driver for the PostgreSQL database. You do not need it if you are connecting to an Oracle database - but, of course, you need the Oracle equivalent, which I am sure you already have if you have managed to make 'single' connections, as you say. I cannot help you with your problem, but the key words in the error output would seem to be: 'Connection refused'. Make sure that *all* your connection details are specified correctly. HTH Harry > Hi, > > This is my server.xml code: > > > driverClassName > oracle.jdbc.driver.OracleDriver > > > url > jdbc:oracle:thin:@servername.mot.com:1521:dev > > > What is postgresql JAR? > Do I need this ? > I am using Oracle 8.x and T5. > I am able to connect thru driverManager code .. Single connection > > Best Regards > Abhay Kumar > > -Original Message- > From: Paul Mansfield [mailto:[EMAIL PROTECTED] > Sent: Monday, April 05, 2004 12:29 PM > To: Tomcat Users List > Subject: RE: Cannot create JDBC driver of class '' for connect URL > 'null' > > > On Mon, 2004-04-05 at 18:35, Kumar Abhay-CAK203C wrote: >> Hi, >> >> I am getting following error while creating Connection Pool using >> above code: >> >> Error Caught while creating a connection in EPP dB: = >> org.apache.commons.dbcp.SQLNestedException: Cannot create >> PoolableConnectionFactory, cause: Io exception: Connection >> refused(DESCRIPTION=(TMP=)(VSNNUM=135290880)(ERR=12505)(ERROR_STACK=( >> E >> RROR=(CODE=12505)(EMFI=4 > > sounds like either firewall blocking conn's, or bad username/password > in your config > > try an manual "telnet dbserver portnum" to verify the former - 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]
Re: Cannot create JDBC driver of class '' for connect URL 'null'
Hello > What is postgresql JAR? It is the JDBC driver for the PostgreSQL database. You do not need it if you are connecting to an Oracle database - but, of course, you need the Oracle equivalent, which I am sure you already have if you have managed to make 'single' connections, as you say. I cannot help you with your problem, but the key words in the error output would seem to be: 'Connection refused'. Make sure that *all* your connection details are specified correctly. HTH Harry > Hi, > > This is my server.xml code: > > > driverClassName > oracle.jdbc.driver.OracleDriver > > > url > jdbc:oracle:thin:@servername.mot.com:1521:dev > > > What is postgresql JAR? > Do I need this ? > I am using Oracle 8.x and T5. > I am able to connect thru driverManager code .. Single connection > > Best Regards > Abhay Kumar > > -Original Message- > From: Paul Mansfield [mailto:[EMAIL PROTECTED] > Sent: Monday, April 05, 2004 12:29 PM > To: Tomcat Users List > Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' > > > On Mon, 2004-04-05 at 18:35, Kumar Abhay-CAK203C wrote: >> Hi, >> >> I am getting following error while creating Connection Pool using >> above code: >> >> Error Caught while creating a connection in EPP dB: = >> org.apache.commons.dbcp.SQLNestedException: Cannot create >> PoolableConnectionFactory, cause: Io exception: Connection >> refused(DESCRIPTION=(TMP=)(VSNNUM=135290880)(ERR=12505)(ERROR_STACK=(E >> RROR=(CODE=12505)(EMFI=4 > > sounds like either firewall blocking conn's, or bad username/password in your > config > > try an manual "telnet dbserver portnum" to verify the former - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot create JDBC driver of class '' for connect URL 'null'
Hi, This is my server.xml code: driverClassName oracle.jdbc.driver.OracleDriver url jdbc:oracle:thin:@servername.mot.com:1521:dev What is postgresql JAR? Do I need this ? I am using Oracle 8.x and T5. I am able to connect thru driverManager code .. Single connection Best Regards Abhay Kumar -Original Message- From: Paul Mansfield [mailto:[EMAIL PROTECTED] Sent: Monday, April 05, 2004 12:29 PM To: Tomcat Users List Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null' On Mon, 2004-04-05 at 18:35, Kumar Abhay-CAK203C wrote: > Hi, > > I am getting following error while creating Connection Pool using > above code: > > Error Caught while creating a connection in EPP dB: = > org.apache.commons.dbcp.SQLNestedException: Cannot create > PoolableConnectionFactory, cause: Io exception: Connection > refused(DESCRIPTION=(TMP=)(VSNNUM=135290880)(ERR=12505)(ERROR_STACK=(E > RROR=(CODE=12505)(EMFI=4 sounds like either firewall blocking conn's, or bad username/password in your config try an manual "telnet dbserver portnum" to verify the former - 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]
RE: Cannot create JDBC driver of class '' for connect URL 'null'
On Mon, 2004-04-05 at 18:35, Kumar Abhay-CAK203C wrote: > Hi, > > I am getting following error while creating Connection Pool using above code: > > Error Caught while creating a connection in EPP dB: = > org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, > cause: Io exception: Connection > refused(DESCRIPTION=(TMP=)(VSNNUM=135290880)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4 sounds like either firewall blocking conn's, or bad username/password in your config try an manual "telnet dbserver portnum" to verify the former - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot create JDBC driver of class '' for connect URL 'null'
Hi, I am getting following error while creating Connection Pool using above code: Error Caught while creating a connection in EPP dB: = org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, cause: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135290880)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4 Please Help !! Regards Abhay -Original Message- From: Andy Grove [mailto:[EMAIL PROTECTED] Sent: Monday, April 05, 2004 9:22 AM To: Tomcat Users List Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null' I found the problem. To get it working I needed to have the and in the Global section and then add a in the context for my webapp. This enabled Tomcat to resolve the parameters. I've posted my config files here for anyone interested: http://www.codefutures.com/weblog/openknowledge/archives/77.html On Mon, 2004-04-05 at 15:08, Andy Grove wrote: > Thanks Harry but the problem is that it is not even trying to load the > Postgres driver - it is not getting that far. It is trying to load > JDBC driver class '' (empty string) and is trying to access JDBC URL > of 'null'. It seems that the ResourceParams section is not being used. > > I do have the postgres jar deployed to common/lib. > > Thanks. > > On Mon, 2004-04-05 at 14:52, Harry Mantheakis wrote: > > > Hello > > > > > > > My web.xml contains: > > > > > > That looks the same as mine (which works) so no problem there. You > > do not actually *need* this element in the deployment descriptor if > > you are using Tomcat 5, but it makes your code portable, should you > > ever (God forbid!) switch to another servlet container. > > > > > > > My $TOMCAT_HOME/conf/server.xml contains the following... > > > > > > BTW, it is $CATALINA_HOME that matters - $TOMCAT_HOME is not used. > > > > Looking at your resource definitions, this sub-element: > > > > > > > > url > > > > jdbc:postgresql://localhost/mydb > > > > > > > > > > Maybe should read: > > > > > > > > url > > > > jdbc:postgresql://localhost:5432/mydb > > > > > > > > > > Mine, at least, needs a port number to be specified. > > > > The rest of the resource element looks okay to me. Also, your > > look-up code looks good too, so my only guess is that you have > > forgotten to put the PostgreSQL JDBC driver under the container's > > classpath. > > > > You probably have the driver located under your application's > > 'WEB-INF/lib' directory. > > > > Try placing the driver in the '$CATALINA_HOME/common/lib' directory, > > but do not have it both places! (Remove it from the 'WEB-INF/lib' > > directory.) > > > > Also, make sure you have a driver named 'pg74.1jdbc3.jar'. The one > > that comes bundled with the PostgreSQL 7.4 RPM is out of date. You > > can download the 7.4 driver from PG's JDBC site. > > > > Good luck. > > > > Harry Mantheakis > > London, UK > > > > > > > > > > > Hi, > > > > > > I am trying to convert my Tomcat web application to use JNDI to > > > lookup a DataSource rather than using DriverManager directly. My > > > application works fine using DriverManager so I know I have my > > > classpath set up correctly. > > > > > > The problem I have seems to be a very common one yet I cannot find > > > a solution to it using Google. I am getting the following error > > > message when I attempt to look up a DataSource: > > > > > > Cannot create JDBC driver of class '' for connect URL 'null' > > > > > > This implies to me that Tomcat is recognizing my > > > declaration in my conf/server.xml but is not loading the > > > associated . I get this problem with Tomcat 4.1 > > > and 5.0 on Red Hat 9 with Sun JDK 1.4.2. > > > > > > My web.xml contains: > > > > > > > > > DB Connection > > > jdbc/mydb > > > javax.sql.DataSource > > > Container > > > > > > > > > My $TOMCAT_HOME/conf/server.xml contains the following (I have > > > tried defining this within the context of my webapp and also in > > > the GlobalNamingResources section). > > > > > > > > type="javax.sql.
Re: Cannot create JDBC driver of class '' for connect URL 'null'
I'm glad you sorted yourself out Andy. Just for the record, you *can* define the resource (and its parameters) within the context of an application - as opposed to making it a global resource that requires a resource link. I have it working that way, and I suspect so do many others because this is the way the Tomcat documents indicate things should be done. See, for example: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how to.html In that document the resource element is defined as part of a context. I'm tempted to think that you had something broken in your code, before, and when you rehashed everything the other way it worked because you got it right. IOW it's another way to skin this particular cat (oops!) but not the only way. All the best Harry > I found the problem. > > To get it working I needed to have the and > in the Global section and then add a in the context for > my webapp. This enabled Tomcat to resolve the parameters. > > I've posted my config files here for anyone interested: > > http://www.codefutures.com/weblog/openknowledge/archives/77.html > > On Mon, 2004-04-05 at 15:08, Andy Grove wrote: > >> Thanks Harry but the problem is that it is not even trying to load the >> Postgres driver - it is not getting that far. It is trying to load JDBC >> driver class '' (empty string) and is trying to access JDBC URL of >> 'null'. It seems that the ResourceParams section is not being used. >> >> I do have the postgres jar deployed to common/lib. >> >> Thanks. >> >> On Mon, 2004-04-05 at 14:52, Harry Mantheakis wrote: >> >>> Hello >>> >>> >>>> My web.xml contains: >>> >>> >>> That looks the same as mine (which works) so no problem there. You do not >>> actually *need* this element in the deployment descriptor if you are using >>> Tomcat 5, but it makes your code portable, should you ever (God forbid!) >>> switch to another servlet container. >>> >>> >>>> My $TOMCAT_HOME/conf/server.xml contains the following... >>> >>> >>> BTW, it is $CATALINA_HOME that matters - $TOMCAT_HOME is not used. >>> >>> Looking at your resource definitions, this sub-element: >>> >>> >>> >>> url >>> >>> jdbc:postgresql://localhost/mydb >>> >>> >>> >>> >>> Maybe should read: >>> >>> >>> >>> url >>> >>> jdbc:postgresql://localhost:5432/mydb >>> >>> >>> >>> >>> Mine, at least, needs a port number to be specified. >>> >>> The rest of the resource element looks okay to me. Also, your look-up code >>> looks good too, so my only guess is that you have forgotten to put the >>> PostgreSQL JDBC driver under the container's classpath. >>> >>> You probably have the driver located under your application's 'WEB-INF/lib' >>> directory. >>> >>> Try placing the driver in the '$CATALINA_HOME/common/lib' directory, but do >>> not have it both places! (Remove it from the 'WEB-INF/lib' directory.) >>> >>> Also, make sure you have a driver named 'pg74.1jdbc3.jar'. The one that >>> comes bundled with the PostgreSQL 7.4 RPM is out of date. You can download >>> the 7.4 driver from PG's JDBC site. >>> >>> Good luck. >>> >>> Harry Mantheakis >>> London, UK >>> >>> >>> >>> >>>> Hi, >>>> >>>> I am trying to convert my Tomcat web application to use JNDI to lookup a >>>> DataSource rather than using DriverManager directly. My application >>>> works fine using DriverManager so I know I have my classpath set up >>>> correctly. >>>> >>>> The problem I have seems to be a very common one yet I cannot find a >>>> solution to it using Google. I am getting the following error message >>>> when I attempt to look up a DataSource: >>>> >>>> Cannot create JDBC driver of class '' for connect URL 'null' >>>> >>>> This implies to me that Tomcat is recognizing my declaration >>>> in my conf/server.xml but is not loading the associated >>>> . I get this problem with Tomcat 4.1 and 5.0 on Red Hat >>>> 9 with Sun JDK 1.4.2. >>>> >
Re: Cannot create JDBC driver of class '' for connect URL 'null'
I found the problem. To get it working I needed to have the and in the Global section and then add a in the context for my webapp. This enabled Tomcat to resolve the parameters. I've posted my config files here for anyone interested: http://www.codefutures.com/weblog/openknowledge/archives/77.html On Mon, 2004-04-05 at 15:08, Andy Grove wrote: > Thanks Harry but the problem is that it is not even trying to load the > Postgres driver - it is not getting that far. It is trying to load JDBC > driver class '' (empty string) and is trying to access JDBC URL of > 'null'. It seems that the ResourceParams section is not being used. > > I do have the postgres jar deployed to common/lib. > > Thanks. > > On Mon, 2004-04-05 at 14:52, Harry Mantheakis wrote: > > > Hello > > > > > > > My web.xml contains: > > > > > > That looks the same as mine (which works) so no problem there. You do not > > actually *need* this element in the deployment descriptor if you are using > > Tomcat 5, but it makes your code portable, should you ever (God forbid!) > > switch to another servlet container. > > > > > > > My $TOMCAT_HOME/conf/server.xml contains the following... > > > > > > BTW, it is $CATALINA_HOME that matters - $TOMCAT_HOME is not used. > > > > Looking at your resource definitions, this sub-element: > > > > > > > > url > > > > jdbc:postgresql://localhost/mydb > > > > > > > > > > Maybe should read: > > > > > > > > url > > > > jdbc:postgresql://localhost:5432/mydb > > > > > > > > > > Mine, at least, needs a port number to be specified. > > > > The rest of the resource element looks okay to me. Also, your look-up code > > looks good too, so my only guess is that you have forgotten to put the > > PostgreSQL JDBC driver under the container's classpath. > > > > You probably have the driver located under your application's 'WEB-INF/lib' > > directory. > > > > Try placing the driver in the '$CATALINA_HOME/common/lib' directory, but do > > not have it both places! (Remove it from the 'WEB-INF/lib' directory.) > > > > Also, make sure you have a driver named 'pg74.1jdbc3.jar'. The one that > > comes bundled with the PostgreSQL 7.4 RPM is out of date. You can download > > the 7.4 driver from PG's JDBC site. > > > > Good luck. > > > > Harry Mantheakis > > London, UK > > > > > > > > > > > Hi, > > > > > > I am trying to convert my Tomcat web application to use JNDI to lookup a > > > DataSource rather than using DriverManager directly. My application > > > works fine using DriverManager so I know I have my classpath set up > > > correctly. > > > > > > The problem I have seems to be a very common one yet I cannot find a > > > solution to it using Google. I am getting the following error message > > > when I attempt to look up a DataSource: > > > > > > Cannot create JDBC driver of class '' for connect URL 'null' > > > > > > This implies to me that Tomcat is recognizing my declaration > > > in my conf/server.xml but is not loading the associated > > > . I get this problem with Tomcat 4.1 and 5.0 on Red Hat > > > 9 with Sun JDK 1.4.2. > > > > > > My web.xml contains: > > > > > > > > > DB Connection > > > jdbc/mydb > > > javax.sql.DataSource > > > Container > > > > > > > > > My $TOMCAT_HOME/conf/server.xml contains the following (I have tried > > > defining this within the context of my webapp and also in the > > > GlobalNamingResources section). > > > > > > > > /> > > > > > > > > > > > > factory > > > org.apache.commons.dbcp.BasicDataSourceFactory > > > > > > > > > maxActive > > > 100 > > > > > > > > > maxIdle > > > 30 > > > > > > > > > maxWait > > > 1 > > > > > > > > >username > > >ebay > > > > > > > > >password > > > > > > > > > > > > driverClassName > > > org.postgresql.Driver > > > > > > > > > url > > > jdbc:postgresql://localhost/mydb > > > > > > > > > > > > Lastly, my Java code is as follows: > > > > > > InitialContext initCtx = new InitialContext(); > > > Object obj = initCtx.lookup( "java:comp/env/jdbc/mydb" ); > > > DataSource ds = (DataSource) obj; > > > return ds.getConnection(); > > > > > > Does anyone have JNDI working with Tomcat? Any help would be much > > > appreciated! > > > > > > Thanks, > > > > > > Andy Grove. > > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Cannot create JDBC driver of class '' for connect URL 'null'
Thanks Harry but the problem is that it is not even trying to load the Postgres driver - it is not getting that far. It is trying to load JDBC driver class '' (empty string) and is trying to access JDBC URL of 'null'. It seems that the ResourceParams section is not being used. I do have the postgres jar deployed to common/lib. Thanks. On Mon, 2004-04-05 at 14:52, Harry Mantheakis wrote: > Hello > > > > My web.xml contains: > > > That looks the same as mine (which works) so no problem there. You do not > actually *need* this element in the deployment descriptor if you are using > Tomcat 5, but it makes your code portable, should you ever (God forbid!) > switch to another servlet container. > > > > My $TOMCAT_HOME/conf/server.xml contains the following... > > > BTW, it is $CATALINA_HOME that matters - $TOMCAT_HOME is not used. > > Looking at your resource definitions, this sub-element: > > > > url > > jdbc:postgresql://localhost/mydb > > > > > Maybe should read: > > > > url > > jdbc:postgresql://localhost:5432/mydb > > > > > Mine, at least, needs a port number to be specified. > > The rest of the resource element looks okay to me. Also, your look-up code > looks good too, so my only guess is that you have forgotten to put the > PostgreSQL JDBC driver under the container's classpath. > > You probably have the driver located under your application's 'WEB-INF/lib' > directory. > > Try placing the driver in the '$CATALINA_HOME/common/lib' directory, but do > not have it both places! (Remove it from the 'WEB-INF/lib' directory.) > > Also, make sure you have a driver named 'pg74.1jdbc3.jar'. The one that > comes bundled with the PostgreSQL 7.4 RPM is out of date. You can download > the 7.4 driver from PG's JDBC site. > > Good luck. > > Harry Mantheakis > London, UK > > > > > > Hi, > > > > I am trying to convert my Tomcat web application to use JNDI to lookup a > > DataSource rather than using DriverManager directly. My application > > works fine using DriverManager so I know I have my classpath set up > > correctly. > > > > The problem I have seems to be a very common one yet I cannot find a > > solution to it using Google. I am getting the following error message > > when I attempt to look up a DataSource: > > > > Cannot create JDBC driver of class '' for connect URL 'null' > > > > This implies to me that Tomcat is recognizing my declaration > > in my conf/server.xml but is not loading the associated > > . I get this problem with Tomcat 4.1 and 5.0 on Red Hat > > 9 with Sun JDK 1.4.2. > > > > My web.xml contains: > > > > > > DB Connection > > jdbc/mydb > > javax.sql.DataSource > > Container > > > > > > My $TOMCAT_HOME/conf/server.xml contains the following (I have tried > > defining this within the context of my webapp and also in the > > GlobalNamingResources section). > > > > > /> > > > > > > > > factory > > org.apache.commons.dbcp.BasicDataSourceFactory > > > > > > maxActive > > 100 > > > > > > maxIdle > > 30 > > > > > > maxWait > > 1 > > > > > >username > >ebay > > > > > >password > > > > > > > > driverClassName > > org.postgresql.Driver > > > > > > url > > jdbc:postgresql://localhost/mydb > > > > > > > > Lastly, my Java code is as follows: > > > > InitialContext initCtx = new InitialContext(); > > Object obj = initCtx.lookup( "java:comp/env/jdbc/mydb" ); > > DataSource ds = (DataSource) obj; > > return ds.getConnection(); > > > > Does anyone have JNDI working with Tomcat? Any help would be much > > appreciated! > > > > Thanks, > > > > Andy Grove. > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
Re: Cannot create JDBC driver of class '' for connect URL 'null'
Hello > My web.xml contains: That looks the same as mine (which works) so no problem there. You do not actually *need* this element in the deployment descriptor if you are using Tomcat 5, but it makes your code portable, should you ever (God forbid!) switch to another servlet container. > My $TOMCAT_HOME/conf/server.xml contains the following... BTW, it is $CATALINA_HOME that matters - $TOMCAT_HOME is not used. Looking at your resource definitions, this sub-element: url jdbc:postgresql://localhost/mydb Maybe should read: url jdbc:postgresql://localhost:5432/mydb Mine, at least, needs a port number to be specified. The rest of the resource element looks okay to me. Also, your look-up code looks good too, so my only guess is that you have forgotten to put the PostgreSQL JDBC driver under the container's classpath. You probably have the driver located under your application's 'WEB-INF/lib' directory. Try placing the driver in the '$CATALINA_HOME/common/lib' directory, but do not have it both places! (Remove it from the 'WEB-INF/lib' directory.) Also, make sure you have a driver named 'pg74.1jdbc3.jar'. The one that comes bundled with the PostgreSQL 7.4 RPM is out of date. You can download the 7.4 driver from PG's JDBC site. Good luck. Harry Mantheakis London, UK > Hi, > > I am trying to convert my Tomcat web application to use JNDI to lookup a > DataSource rather than using DriverManager directly. My application > works fine using DriverManager so I know I have my classpath set up > correctly. > > The problem I have seems to be a very common one yet I cannot find a > solution to it using Google. I am getting the following error message > when I attempt to look up a DataSource: > > Cannot create JDBC driver of class '' for connect URL 'null' > > This implies to me that Tomcat is recognizing my declaration > in my conf/server.xml but is not loading the associated > . I get this problem with Tomcat 4.1 and 5.0 on Red Hat > 9 with Sun JDK 1.4.2. > > My web.xml contains: > > > DB Connection > jdbc/mydb > javax.sql.DataSource > Container > > > My $TOMCAT_HOME/conf/server.xml contains the following (I have tried > defining this within the context of my webapp and also in the > GlobalNamingResources section). > > /> > > > > factory > org.apache.commons.dbcp.BasicDataSourceFactory > > > maxActive > 100 > > > maxIdle > 30 > > > maxWait > 1 > > >username >ebay > > >password > > > > driverClassName > org.postgresql.Driver > > > url > jdbc:postgresql://localhost/mydb > > > > Lastly, my Java code is as follows: > > InitialContext initCtx = new InitialContext(); > Object obj = initCtx.lookup( "java:comp/env/jdbc/mydb" ); > DataSource ds = (DataSource) obj; > return ds.getConnection(); > > Does anyone have JNDI working with Tomcat? Any help would be much > appreciated! > > Thanks, > > Andy Grove. > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: Cannot create JDBC driver of class '' for connect URL 'null'
I had your same problem. I couldn't find any solution but I solved the problem in this way: I have set the URL string and the driver name in server.xml as Strings: and then I use JNDI lookups for them and I create a connection with: Class.forName(driverName); conn=DriverManager.getConnection(connectionString); -- Ivan -Messaggio originale- Da: Andy Grove [mailto:[EMAIL PROTECTED] Inviato: lunedì 5 aprile 2004 12.03 A: [EMAIL PROTECTED] Oggetto: Cannot create JDBC driver of class '' for connect URL 'null' Hi, I am trying to convert my Tomcat web application to use JNDI to lookup a DataSource rather than using DriverManager directly. My application works fine using DriverManager so I know I have my classpath set up correctly. The problem I have seems to be a very common one yet I cannot find a solution to it using Google. I am getting the following error message when I attempt to look up a DataSource: Cannot create JDBC driver of class '' for connect URL 'null' This implies to me that Tomcat is recognizing my declaration in my conf/server.xml but is not loading the associated . I get this problem with Tomcat 4.1 and 5.0 on Red Hat 9 with Sun JDK 1.4.2. My web.xml contains: DB Connection jdbc/mydb javax.sql.DataSource Container My $TOMCAT_HOME/conf/server.xml contains the following (I have tried defining this within the context of my webapp and also in the GlobalNamingResources section). factory org.apache.commons.dbcp.BasicDataSourceFactory maxActive 100 maxIdle 30 maxWait 1 username ebay password driverClassName org.postgresql.Driver url jdbc:postgresql://localhost/mydb Lastly, my Java code is as follows: InitialContext initCtx = new InitialContext(); Object obj = initCtx.lookup( "java:comp/env/jdbc/mydb" ); DataSource ds = (DataSource) obj; return ds.getConnection(); Does anyone have JNDI working with Tomcat? Any help would be much appreciated! Thanks, Andy Grove. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cannot create JDBC driver of class '' for connect URL 'null'
Hi, I am trying to convert my Tomcat web application to use JNDI to lookup a DataSource rather than using DriverManager directly. My application works fine using DriverManager so I know I have my classpath set up correctly. The problem I have seems to be a very common one yet I cannot find a solution to it using Google. I am getting the following error message when I attempt to look up a DataSource: Cannot create JDBC driver of class '' for connect URL 'null' This implies to me that Tomcat is recognizing my declaration in my conf/server.xml but is not loading the associated . I get this problem with Tomcat 4.1 and 5.0 on Red Hat 9 with Sun JDK 1.4.2. My web.xml contains: DB Connection jdbc/mydb javax.sql.DataSource Container My $TOMCAT_HOME/conf/server.xml contains the following (I have tried defining this within the context of my webapp and also in the GlobalNamingResources section). factory org.apache.commons.dbcp.BasicDataSourceFactory maxActive 100 maxIdle 30 maxWait 1 username ebay password driverClassName org.postgresql.Driver url jdbc:postgresql://localhost/mydb Lastly, my Java code is as follows: InitialContext initCtx = new InitialContext(); Object obj = initCtx.lookup( "java:comp/env/jdbc/mydb" ); DataSource ds = (DataSource) obj; return ds.getConnection(); Does anyone have JNDI working with Tomcat? Any help would be much appreciated! Thanks, Andy Grove.
Re: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver
Hello Dan, I finally got it to work. The problem is that for directories in "webapps" a Context is automatically created, even if it is already declared in server.xml. The automatically created Contexts do NOT contain the context specific configuration of server.xml. The outcome is that a) a context is created twice and b) for the second instance the resources are not found. The addition of deployOnStartup="false" on all of my Host elements solved my problem. Thanks for your help. Regards, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver
Andreas, Not sure if you got a response yet. Generally, when I have seen the error above, it seemed to be coming from the web app saying that it didn't get the parameters. I am fighting this same error. Strange enough, though, I had it working as you have yours setup. Another thing is that the order that the XML elements are in is critical...i.e. it needs to follow the dtd. This means that elements need to be in the right order relative to the other elements(like and ). Anyway, if it was a driver problem like the jar was in the wrong place, the log would have told you it can't find the class. If you have figured out how to get this working or if you have gotten it to work with the gloabal jndi resource context, please let me know. I will check back later and I will help you figure it out as I will be working on it too. Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver
[EMAIL PROTECTED] wrote: where did u put the jar? thats what got me. it needs to go in common\lib in your tomcat dir Here is the content of common/lib xxx:/opt/tomcat5# ls -la common/lib total 3376 drwxr-xr-x2 tomcat5 nogroup 4096 Feb 11 17:07 . drwxr-xr-x5 tomcat5 nogroup 4096 Jan 15 18:24 .. -rw-r--r--1 tomcat5 nogroup 54665 Feb 11 10:24 activation.jar -rw-r--r--1 tomcat5 nogroup952104 Jan 15 18:24 ant.jar -rw-r--r--1 tomcat5 nogroup165119 Jan 15 18:24 commons-collections.jar -rw-r--r--1 tomcat5 nogroup100776 Jan 15 18:24 commons-dbcp-1.1.jar -rw-r--r--1 tomcat5 nogroup112341 Jan 15 18:24 commons-el.jar -rw-r--r--1 tomcat5 nogroup 39523 Jan 15 18:24 commons-pool-1.1.jar -rw-r--r--1 tomcat5 nogroup342455 Jan 15 18:24 jasper-compiler.jar -rw-r--r--1 tomcat5 nogroup100925 Jan 15 18:24 jasper-runtime.jar -rw-r--r--1 tomcat5 nogroup188231 Jan 15 18:24 jmx-remote-tools.jar -rw-r--r--1 tomcat5 nogroup168008 Jan 15 18:24 jmx-remote.jar -rw-r--r--1 tomcat5 nogroup365858 Jan 15 18:24 jmx.jar -rw-r--r--1 tomcat5 nogroup 48725 Jan 15 18:24 jsp-api.jar -rw-r--r--1 tomcat5 nogroup327603 Feb 11 10:24 mail.jar -rw-r--r--1 tomcat5 nogroup215441 Feb 11 17:07 mysql-connector-java-3.0.10-stable-bin.jar -rw-r--r--1 tomcat5 nogroup 28015 Jan 15 18:24 naming-common.jar -rw-r--r--1 tomcat5 nogroup 14862 Jan 15 18:24 naming-factory.jar -rw-r--r--1 tomcat5 nogroup 2068 Jan 15 18:24 naming-java.jar -rw-r--r--1 tomcat5 nogroup 41669 Jan 15 18:24 naming-resources.jar -rw-r--r--1 tomcat5 nogroup 91627 Jan 15 18:24 servlet-api.jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver
where did u put the jar? thats what got me. it needs to go in common\lib in your tomcat dir Daniel Schulken - Original Message - From: "Andreas Schildbach" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 11, 2004 2:51 PM Subject: Re: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver > Andreas Schildbach wrote: > > > I get this error using Tomcat 5.0.18 under Debian/Linux. Using the same > > configuration under Windows XP, there is no problem. Using the same > > application under Tomcat 4.1.27, there is no problem (either Linux or > > Windows). > > > > auth="Container" type="javax.sql.DataSource"/> > > > name="jdbc/schildbach"> > ^^ > > of course, this is also jdbc/xxx (changed it for the post) > > Regards, > > Andreas > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.581 / Virus Database: 368 - Release Date: 2/9/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver
Andreas Schildbach wrote: I get this error using Tomcat 5.0.18 under Debian/Linux. Using the same configuration under Windows XP, there is no problem. Using the same application under Tomcat 4.1.27, there is no problem (either Linux or Windows). ^^ of course, this is also jdbc/xxx (changed it for the post) Regards, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver
I get this error using Tomcat 5.0.18 under Debian/Linux. Using the same configuration under Windows XP, there is no problem. Using the same application under Tomcat 4.1.27, there is no problem (either Linux or Windows). As you can see from the included stack trace, I am using Hibernate which is accessing the configured DataSource in a Servlet Filter at application startup. I have searched for this problem on this Mailing List, but got no clue. I am using a Context local DataSource (no Global), and have everything strictly setup as described in the JNDI HowTo. Given the number of people that could not solve the problem, maybe there is a bug in Tomcat5? Regards, Andreas org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:243) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518) at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59) at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72) at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1119) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:748) at de.schildbach.integration.HibernatePersistance.init(HibernatePersistance.java:41) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:272) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:355) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:126) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3646) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4275) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:320) at org.apache.catalina.core.StandardHost.install(StandardHost.java:875) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:727) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133) at org.apache.catalina.core.StandardHost.start(StandardHost.java:832) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2345) at org.apache.catalina.startup.Catalina.start(Catalina.java:598) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398) My server.xml: factoryorg.apache.commons.dbcp.BasicDataSourceFactory maxActive5 maxIdle0 maxWait1 usernamexxx passwordxxx driverClassNamecom.mysql.jdbc.Driver urljdbc:mysql://localhost/xxx?autoReconnect=true&relaxAutoCommit=true My web.xml: jdbc/xxx javax.sql.DataSource Container - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JNDI Resource: Cannot create JDBC driver of class '' for connect URL 'null'
It's working. Sorry. It was simply a typing error. On Thursday 06 November 2003 18:52, Bruno Costacurta wrote: > Hi All, > > I simply followed the sample provided by Tomcat documentation (4.1.29) about > JNDI Resource (DBCP) and MySQL but received the following error: > > Cannot create JDBC driver of class '' for connect URL 'null', cause: > No suitable driver > > However MySQL and JDBC driver settings seems correct as a connection like: > (...) >var="conn" > dataSource="jdbc:mysql://localhost/test,com.mysql.jdbc.Driver,bruno,password" > /> > (...) works very fine. > > Thanks for any clue, explanation or working configuration files. > > My config is: > > Tomcat 4.1.29 > MySQL v4.0.14 > JDBC driver: mysql-connector-java-3.0.9-stable: > > > Thanks. > Bruno > > > - > 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]
JNDI Resource: Cannot create JDBC driver of class '' for connect URL 'null'
Hi All, I simply followed the sample provided by Tomcat documentation (4.1.29) about JNDI Resource (DBCP) and MySQL but received the following error: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver However MySQL and JDBC driver settings seems correct as a connection like: (...) (...) works very fine. Thanks for any clue, explanation or working configuration files. My config is: Tomcat 4.1.29 MySQL v4.0.14 JDBC driver: mysql-connector-java-3.0.9-stable: Thanks. Bruno - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cannot create JDBC driver of class '' for connect URL 'null'
Hi, Am arunning application on tomcat 4.1.24 I want to use DBCP for my connection with oracle. I have created a .xml file for the application in weapps folder. the code for the file is. displayName="NIMS"> type="javax.sql.DataSource"/> factory org.apache.commons.dbcp.BasicDataSourceFactory driverClassName oracle.jdbc.driver.OracleDriver url jdbc:oracle:thin:@172.16.16.22:1521:nims username nimsuser password nimsdata123 maxActive 20 maxIdle 10 maxWait -1 validationQuery select 1 from dual testOnBorrow true timeBetweenEvictionRunsMillis 30 numTestsPerEvictionRun 3 minEvictableIdleTimeMillis 180 testWhileIdle true The entry in web.xml file is as follows, resource-ref> Oracle Datasource example jdbc/nims javax.sql.DataSource Container but when i call this connection in my jsp page <%@ page import="java.sql.*" %> <%@ page import="javax.sql.*" %> <%@ page import="java.io.*" %> <%@ page import="java.rmi.*" %> <%@ page import="javax.naming.*" %> <%@ page import="javax.servlet.*" %> <%@ page import="javax.servlet.http.*" %> Cable and Wireless <% try { Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup("java:/comp/env"); DataSource ds = (DataSource)envContext.lookup("jdbc/nims"); Connection conn = ds.getConnection(); am getting error "Cannot create JDBC driver of class '' for connect URL 'null' " help me _ MSN Hotmail now on your Mobile phone. http://server1.msn.co.in/sp03/mobilesms/ Click here. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]