This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes JDBC ClassNotFoundException Weird Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "JDBC ClassNotFoundException Weird Problem" Watch "JDBC ClassNotFoundException Weird Problem" New topic
Author

JDBC ClassNotFoundException Weird Problem

Adam Zedan
Ranch Hand

Joined: Jun 10, 2011
Posts: 124

Hi I connected to SQLite DB successfully using a simple java project in Eclipse. (All i did was i went to the project option and in the build path added an external JAR file JDBCSqlite.jar) and used the following code to connect and test the DB.


Now the problem starts when i create a new Web Project (A Dynamic Website in EclipseEE). I did add the jar file. But this time i get an exception as follows
java.lang.ClassNotFoundException: org.sqlite.JDBC
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

any idea what might be causing this problem ??


Don’t look where you fall, but where you slipped
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61451
    
  67

Please be sure to ask IDE questions in the IDEs forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Adam Zedan
Ranch Hand

Joined: Jun 10, 2011
Posts: 124

Fixed the problem. What i did was i added the external jar to the tomcat configuration...
 
Consider Paul's rocket mass heater.
 
subject: JDBC ClassNotFoundException Weird Problem