Win a copy of Functional Reactive Programming this week in the Other Languages forum!
    Bookmark Topic Watch Topic
  • New Topic

Class not found exception

 
Aashu Arya
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Report post to moderator
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).
 
Aashu Arya
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
  • Report post to moderator
hello

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

Regards
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
    Bookmark Topic Watch Topic
  • New Topic