File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Class not found exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

Class not found exception

Aashu Arya
Greenhorn

Joined: Aug 18, 2008
Posts: 22
When I am using the JDBC in my jsp scriplet to retrieve some values from the database it is throwing this exception:

java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

I have included the required jar files also but still it throwing the error.

I am using Eclipse Ganymede as the IDE and Tomcat as the container.

Please somebody help me solve it!

Aashu.
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

Originally posted by Aashu Arya:
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

I have included the required jar files also but still it throwing the error.


Apparently you haven't. My guess is that the required JAR files are not being deployed from Eclipse. Make sure you add them to the list of JARs required are defined in the Eclipse project's Java EE Module Dependincies (On the Project Properties page).


Steve
Aashu Arya
Greenhorn

Joined: Aug 18, 2008
Posts: 22
I have already include all the jar files in eclipse also!

I have copied the jar files to my lib inside the WEB-INF folder,also inside tomcat's lib,also inside eclipse's lib...but still not getting the solution..

Do I need to set something in the classpath in environment variables?

I would also like to mention that jdbc is workin fine with a java class inside the same package!That there is no problem with the jars...should we try it with any other different approach?

Aashu..
Sagar Birari
Greenhorn

Joined: Sep 05, 2008
Posts: 11
hello

add jar file in classpath ,that will definately solve your problem

Regards


Sagar Birari
Development & Technical Blog
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61420
    
  67

Originally posted by Sagar Birari:
add jar file in classpath ,that will definately solve your problem

No, it won't. The classpath is ignored by servlet containers.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61420
    
  67

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please read this for more information.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Class not found exception