Discussions
Web tier: servlets, JSP, Web frameworks: Cannot create JDBC driver of class '' for connect URL 'null', ca
-
Cannot create JDBC driver of class '' for connect URL 'null', ca (7 messages)
- Posted by: pradeep yerra
- Posted on: October 11 2006 07:50 EDT
I am able to lookup dB. But on trying to fetch data from dB I am getting this error. i am using oracle i copied the jar file in classes12.jar in catalinahome/common/lib but i am getting this error Cannot create JDBC driver of class '' for connect URL 'null', ca this is my server.xml file ------------------------------ <?xml version='1.0' encoding='utf-8'?> factory org.apache.catalina.users.MemoryUserDatabaseFactory pathname conf/tomcat-users.xml url jdbc:oracle:thin:@localhost:1521:BSL password yerra maxActive 4 maxWait 5000 driverClassName oracle.jdbc.driver.OracleDriver username pradeep maxIdle 2 --------------------------- this is my web.xml file ------------------------------------- <?xml version="1.0" encoding="UTF-8"?> 30 index.jsp Oracle Datasource example jdbc/myoracle javax.sql.DataSource Container --------------------------- this is my context.xml file -------------------------- any one plz help me thanks in advanceThreaded Messages (7)
- Re: Cannot create JDBC driver of class '' for connect URL 'null' by arijit dey on October 11 2006 07:54 EDT
- dbcp problem by pradeep yerra on October 11 2006 08:19 EDT
-
Re: dbcp problem by arijit dey on October 11 2006 09:17 EDT
-
not working by pradeep yerra on October 11 2006 09:29 EDT
-
Re: not working by arijit dey on October 12 2006 01:36 EDT
-
still problem persists by pradeep yerra on October 12 2006 02:29 EDT
- connected but some help need by pradeep yerra on October 12 2006 05:36 EDT
-
still problem persists by pradeep yerra on October 12 2006 02:29 EDT
-
Re: not working by arijit dey on October 12 2006 01:36 EDT
-
not working by pradeep yerra on October 11 2006 09:29 EDT
-
Re: dbcp problem by arijit dey on October 11 2006 09:17 EDT
- dbcp problem by pradeep yerra on October 11 2006 08:19 EDT
-
Re: Cannot create JDBC driver of class '' for connect URL 'null'[ Go to top ]
- Posted by: arijit dey
- Posted on: October 11 2006 07:54 EDT
- in response to pradeep yerra
post the whole exception stack trace. \ cheers, http://www.javaicillusion.blogspot.com/ -
dbcp problem[ Go to top ]
- Posted by: pradeep yerra
- Posted on: October 11 2006 08:19 EDT
- in response to arijit dey
(org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver ) I am getting the above error in the browser i am using th below jsp -
Re: dbcp problem[ Go to top ]
- Posted by: arijit dey
- Posted on: October 11 2006 09:17 EDT
- in response to pradeep yerra
There may be many reasons: 1: The driver does not match the database version you are using. 2: The connection URL is not correct 3: The DBCP jar and the driver class is loaded by different classloaders. Check them and see if you find any success. cheers, http://www.javaicillusion.blogspot.com/ -
not working[ Go to top ]
- Posted by: pradeep yerra
- Posted on: October 11 2006 09:29 EDT
- in response to arijit dey
the driver is working well there is no problem because i directly write the url in jsp page by using drivermanager and when i try to connect it is connecting i didn't get u in this The DBCP jar and the driver class is loaded by different classloaders can u be specipic because i am very much new i am in learning stage thanks -
Re: not working[ Go to top ]
- Posted by: arijit dey
- Posted on: October 12 2006 01:36 EDT
- in response to pradeep yerra
I am reaaly not an expert of dbcp but you do these: 1: keep the driver jar file in Catalina/shared/lib dir. 2: set the system property -Djdbc.drivers=oracle.jdbc.driver.OracleDriver:org.apache.commons.dbcp.PoolingDriver 3: As the exceptionn says,that you have got a null url, something to do with Contexts. I will have to check with tomcat. cheers, http://javaicillusion.blogspot.com/ -
still problem persists[ Go to top ]
- Posted by: pradeep yerra
- Posted on: October 12 2006 02:29 EDT
- in response to arijit dey
i copied the jar file and i also set the system property what u said but still the problem persists and the the exception is same yar -
connected but some help need[ Go to top ]
- Posted by: pradeep yerra
- Posted on: October 12 2006 05:36 EDT
- in response to pradeep yerra
i connected to database using pooling when ichanged the datasource properties for my webapplication in jndi tree Tomcat Server Service (Catalina) Connector (8009) Connector (8080) Host (localhost) Context (/) Resources Data Sources Mail Sessions Resource Links Environment Entries Context (/admin) Context (/manager) Context (/tomcat-docs) Context (/web1) Resources -------------------------------------------- Data Sources------------->(Ichanged the properties here by default there is no url and driver class but i created in datasource now what i have to do is there any way to set the content dynamically when i created the datasource ) i am setting the datasource manually here now i connected to the database. ------------------------------------------- Mail Sessions Resource Links Environment Entries Realm for Service (Catalina) Resources Data Sources Mail Sessions Environment Entries User Databases User Definition Users Groups Roles