1

I have added sqlite jar in lib folder into project and i also added into build path but still i'm getting "java.lang.ClassNotFoundException: org.sqlite.JDBC" exception.

here is conection code.

try {
    String path = OsSpecificseperator.getPath(Platform.getInstallLocation().getURL().getPath());
    Class.forName("org.sqlite.JDBC");
    connection = DriverManager.getConnection("jdbc:sqlite:" + path+"configuration/tools/KidProject_Database");
} catch (Exception e) {
    e.printStackTrace();
    System.out.println("DB : Connection: " + e.getMessage());
    return;
}
4
  • 1
    You haven't told us anything about the application you're building. Just because it's in the build path doesn't mean it's available at execution time. Commented Apr 29, 2013 at 13:30
  • From where did you download the driver ? Commented Apr 29, 2013 at 13:30
  • @Noob UnChained: I had downloaded it long back so i don't remember from where i had downloaded.But at that time It has worked fine with other project. Commented Apr 29, 2013 at 13:37
  • no its Eclipse RCP application Commented Apr 29, 2013 at 13:38

1 Answer 1

1

I would think that Class.forName("org.sqlite.JDBC") is expecting a class name. It looks like you're providing it a package name.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.