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 : Context docBase=/ROOT reloadable=true Resource name=jdbc/myoracle auth=Container 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/ /Context it is located inside the Host /Host 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 Context docBase=/ROOT reloadable=true 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: Context path=ROOT docBase= 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, Context path=/ROOT/WEB-INF/classes 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. Resource name=jdbc/myoracle auth=Container 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. ResourceParams name=jdbc/myoracle 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
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 Context path=/ROOT/WEB-INF/classes docBase=ROOT/WEB-INF/classes/JITS debug=5 reloadable=true crossContext=true Resource name=jdbc/myoracle auth=Container 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/ ResourceParams name=jdbc/myoracle parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2/value /parameter parameter nameusername/name valuejits/value /parameter parameter namepassword/name valuemypassword/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /Context Here's the contents of C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\web.xml servlet servlet-nameJITS.ImageServer/servlet-name servlet-classJITS.ImageServer/servlet-class /servlet servlet-mapping servlet-nameJITS.ImageServer/servlet-name url-pattern/servlet/JITS.ImageServer/url-pattern /servlet-mapping resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref 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: 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 Context path=/ROOT/WEB-INF/classes docBase=ROOT/WEB-INF/classes/JITS debug=5 reloadable=true crossContext=true Resource name=jdbc/myoracle auth=Container 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/ ResourceParams name=jdbc/myoracle parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2/value /parameter parameter nameusername/name valuejits/value /parameter parameter namepassword/name valuemypassword/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /Context Here's the contents of C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\web.xml servlet servlet-nameJITS.ImageServer/servlet-name servlet-classJITS.ImageServer/servlet-class /servlet servlet-mapping servlet-nameJITS.ImageServer/servlet-name url-pattern/servlet/JITS.ImageServer/url-pattern /servlet-mapping resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref 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 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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, 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 Context path=/ROOT/WEB-INF/classes docBase=ROOT/WEB-INF/classes/JITS debug=5 reloadable=true crossContext=true Resource name=jdbc/myoracle auth=Container 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/ ResourceParams name=jdbc/myoracle parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2/value /parameter parameter nameusername/name valuejits/value /parameter parameter namepassword/name valuemypassword/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /Context Here's the contents of C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\web.xml servlet servlet-nameJITS.ImageServer/servlet-name servlet-classJITS.ImageServer/servlet-class /servlet servlet-mapping servlet-nameJITS.ImageServer/servlet-name url-pattern/servlet/JITS.ImageServer/url-pattern /servlet-mapping resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref 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 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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 Yoav Shapira, Thank you for your help. I've corrected my server.xml file. the first line now looks like: Context path=ROOT docBase= 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, Context path=/ROOT/WEB-INF/classes 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. Resource name=jdbc/myoracle auth=Container 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. ResourceParams name=jdbc/myoracle 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'
Hi Allistair, Thank you very much for helping. Here's my revised server.xml : Context docBase=/ROOT reloadable=true Resource name=jdbc/myoracle auth=Container 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/ /Context it is located inside the Host /Host 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 Context docBase=/ROOT reloadable=true 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: Context path=ROOT docBase= 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, Context path=/ROOT/WEB-INF/classes 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. Resource name=jdbc/myoracle auth=Container 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. ResourceParams name=jdbc/myoracle 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
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 : Context docBase=/ROOT reloadable=true Resource name=jdbc/myoracle auth=Container 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/ /Context it is located inside the Host /Host 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 Context docBase=/ROOT reloadable=true 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: Context path=ROOT docBase= 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, Context path=/ROOT/WEB-INF/classes 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. Resource name=jdbc/myoracle auth=Container 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. ResourceParams name=jdbc/myoracle 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
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 : Context docBase=/ROOT reloadable=true Resource name=jdbc/myoracle auth=Container 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/ /Context it is located inside the Host /Host 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 Context docBase=/ROOT reloadable=true 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: Context path=ROOT docBase= 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