Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Class not found exception

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
hello

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

Regards
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Those cherries would go best on cherry cheesecake. Don't put those cherries on this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic