Reputation: 11
I've been trying to make use of the SQLite jdbc class from Xerial. Every time I try to run what I have, it fails, giving me the following error:
java.lang.ClassNotFoundException: org.sqlite.Driver
I'm using Ivy, and have the following in my ivy.xml
file.
<dependency org="org.xerial" name="sqlite-jdbc" rev="3.7.2"/>
This includes the sqlite-jdbc-3.7.2.jar file in my class path. I've also tried manually adding it, to no avail.
The command that runs this also contains the jar on the command line:
java -cp ... sqlite-jdbc-3.7.2.jar ...
I still get the class not found exception on the following line:
Class.forName("org.sqlite.Driver");
I've tried searching around for this particular issue, but it seems most of the time it's resolved simply by including the jar in the class path, which shouldn't be the issue here, as Eclipse lists the jar in the class path.
Upvotes: 1
Views: 6081
Reputation: 5625
Can you confirm that the jar version sqlite-jdbc-3.7.2
has class org.sqlite.Driver
?
You can check it by unzipping the jar file and check if unzippied folder has directory structure org\sqlite\Driver.class
?
I think the sqlLite Driver name is org.sqlite.JDBC
and not org.sqlite.Driver
. Source.
Upvotes: 4