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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "ClassNotFoundException while loading the JDBC driver for HSQLDB" Watch "ClassNotFoundException while loading the JDBC driver for HSQLDB" New topic
Author

ClassNotFoundException while loading the JDBC driver for HSQLDB

Pavan Kumar Dittakavi
Ranch Hand

Joined: Feb 12, 2011
Posts: 104

hi All,

I have downloaded the HSQLDB and have created a sample table in it. I have been following the link for the same. Im unable to load the driver using the Class.forName method. It basically complains of the following message. Im relatively new to JDBC please suggest what I might be missing here.

Thanks,
Pavan.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

You missed setting your classpath. In particular it has to include the jar which contains the JDBC driver.
Pavan Kumar Dittakavi
Ranch Hand

Joined: Feb 12, 2011
Posts: 104

Hi Paul,

I have already set the class path to the directory that contains the jar file you mentioned. It still is throwing me this error. Am I missing something here.

Thanks.,
Pavan.

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19679
    
  18

Don't include the folder with the JAR file to your class path, add the JAR file itself.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ClassNotFoundException while loading the JDBC driver for HSQLDB