This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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: 19684
    
  20

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