AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem connecting Oracle with Tomcat 5.0

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases
View previous topic :: View next topic  
Author Message
vishnu
Guest





PostPosted: Fri Dec 19, 2003 7:32 pm    Post subject: Problem connecting Oracle with Tomcat 5.0 Reply with quote



I am using Tomcat v5.0 and Oracle 9i. Can anyone tell me why I am getting the exception given below...

I have added this to server.xml :

<Resource name="jdbc/ConnectionPool" auth="Container" type="javax.sql.DataSource"/>

<ResourceParams name="jdbc/ConnectionPool">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@130.70.152.135:1521:ORCLDEV</value>
</parameter>
<parameter>
<name>username</name>
<value>vishnu</value>
</parameter>
<parameter>
<name>password</name>
<value>[my password]</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>10</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>-1</value>
</parameter>
</ResourceParams>

I am getting this exception:


org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.lang.NullPointerException
at oracle.jdbc.driver.OracleDriver.oracleAcceptsURL(OracleDriver.java:477)
at oracle.jdbc.driver.OracleDriver.acceptsURL(OracleDriver.java:525)
at java.sql.DriverManager.getDriver(Unknown Source)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
at edu.louisiana.cbit.capture.util.DBConnection.getConnection(DBConnection.java:134)
at edu.louisiana.cbit.capture.util.DBConnection.startConnection(DBConnection.java:35)
at edu.louisiana.cbit.capture.action.LoginAction.execute(LoginAction.java:59)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:696)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
at java.lang.Thread.run(Unknown Source)

Dec 19, 2003 1:08:56 PM org.apache.struts.action.RequestProcessor processException

Back to top
correro
Guest





PostPosted: Mon Dec 22, 2003 7:42 am    Post subject: Re: Problem connecting Oracle with Tomcat 5.0 Reply with quote



yeah, i have exactly the same problem (Cannot create JDBC driver of class '' for connect URL 'null'), except that my db is mysql

could it be something with Tomcat?

please kindly help us out!

Back to top
Heinz Dittmann
Guest





PostPosted: Tue Dec 30, 2003 4:28 pm    Post subject: Re: Problem connecting Oracle with Tomcat 5.0 Reply with quote



Quote:
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
of >class '' for connect URL 'null', cause:

java.lang.NullPointerException

the error message points out that there are no values taken from the
server.xml file.

Adding JDBC Resource seems to be only valid in a <Context> subelement
of a
<service> or <DefaultContext> subelement of a <host> element in the
server.xml file.

Back to top
Serpico2003@hotmail.com
Guest





PostPosted: Sun Jan 11, 2004 2:16 am    Post subject: Re: Problem connecting Oracle with Tomcat 5.0 Reply with quote

[email]heinz.dittmann (AT) gmx (DOT) de[/email] (Heinz Dittmann) wrote in message news:<d629840e.0312300828.6b81de5c (AT) posting (DOT) google.com>...
Quote:
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
of >class '' for connect URL 'null', cause:
java.lang.NullPointerException

the error message points out that there are no values taken from the
server.xml file.

Adding JDBC Resource seems to be only valid in a <Context> subelement
of a
service> or <DefaultContext> subelement of a <host> element in the
server.xml file.


I have the same problem too with mysql and tomcat 4.1.29 .
not been able to find out what the problem is yet though :(

help out if any of you solved it .

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.