aspose file tools*
The moose likes JDBC and the fly likes Oracle.jdbc. driver.OracleDriver problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Oracle.jdbc. driver.OracleDriver problem" Watch "Oracle.jdbc. driver.OracleDriver problem" New topic
Author

Oracle.jdbc. driver.OracleDriver problem

Varsha Pardeshi
Ranch Hand

Joined: Feb 27, 2006
Posts: 30
java.lang.ClassNotFoundException: Oracle.jdbc.driver.OracleDriver

is it the case that classes12.jar & classes12.zip is not getting in classpath. actually if I use command

echo %classpath%

it is showing the path of classes12.jar & classes12.zip files in classpath.
what could be done now?
Sujith Kanaparthi
Ranch Hand

Joined: Sep 04, 2005
Posts: 45
You will definitely get the errorjava.lang.ClassNotFoundException: Oracle.jdbc.driver.OracleDriver as oracle driver class name is "oracle.jdbc.driver.OracleDriver" and not "Oracle.jdbc.driver.OracleDriver".

Regards,
Sujith
Varsha Pardeshi
Ranch Hand

Joined: Feb 27, 2006
Posts: 30
Originally posted by Sujith Kanaparthi:
You will definitely get the errorjava.lang.ClassNotFoundException: Oracle.jdbc.driver.OracleDriver as oracle driver class name is "oracle.jdbc.driver.OracleDriver" and not "Oracle.jdbc.driver.OracleDriver".

Regards,
Sujith



Hello Sujith,

I had change Oracle.jdbc.driver.OracleDriver to oracle.jdbc.driver.OracleDriver & recompiled it. still the same error I m pasting here the error:

java.lang.ClassNotFoundException:
oracle.jdbc.driver.OracleDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1407)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at db.dataCon1.DBConnection(dataCon1.java:19)
at org.apache.jsp.callDb_jsp._jspService(callDb_jsp.java:60)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.
processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)

please tell me what I should do to correct it.

Regards,
Varsha
Purushoth Thambu
Ranch Hand

Joined: May 24, 2003
Posts: 425
Try using oracle.jdbc.OracleDriver. Alternatively you can confirm by opening classes12.jar in winzip or using jar utility and confirm you the class you are trying to use does exist. The real issue in your case must be classpath issue. Before loading the oracle driver in your code you can get the system property "java.class.path" and check if classes12.jar is there.
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
(1) Put the jar file in JAVA_HOME\jre\lib\ext folder and try.
(2) Unzip the jar file and check whether the packages exist or not. Download jar file again and use the new one.


My blood is tested +ve for Java.
Varsha Pardeshi
Ranch Hand

Joined: Feb 27, 2006
Posts: 30
Originally posted by Chetan Parekh:
(1) Put the jar file in JAVA_HOME\jre\lib\ext folder and try.
(2) Unzip the jar file and check whether the packages exist or not. Download jar file again and use the new one.


thanks chetan once again.

I put the classes.jar file in JAVA_HOME\jre\lib\ext folder & I got connection to oracle database through the oracleDriver.
Thanks a lot.

Actually as Purushothaman said I had checked the java.class.path it was showing the classes12.jar file.

When I unzip the classes12.zip file in folder named OracleJar.Then I got the file
OracleJar/jdbc/OracleDriver.class

so I thought that required file is there.
Any ways, friends thanks for the helping me.

Regards,
Varsha.
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
(1) Put the jar file in JAVA_HOME\jre\lib\ext folder and try.

Varsha, it was a �quick and dirty� way. Ideally your should add jar file in CLASSPATH environment variable.
 
Consider Paul's rocket mass heater.
 
subject: Oracle.jdbc. driver.OracleDriver problem