I have created small code of sqlite database in java.
Below is the code for connection with database,
Class.forName("org.sqlite.JDBC");
objConnection=DriverManager.getConnection("jdbc:sqlite:/etc/javaData/Test.db");
In this code the exception thrown in second line for getConnection(). I am trying this code on Raspberry pi. How to fix the exceptionrelated to this
Exception
Exception Message: Error opening connection Stack Trace:
java.sql.SQLException: Error opening connection at
org.sqlite.core.CoreConnection.open(CoreConnection.java:140) at
org.sqlite.core.CoreConnection.(CoreConnection.java:66) at
org.sqlite.jdbc3.JDBC3Connection.(JDBC3Connection.java:21) at
org.sqlite.jdbc4.JDBC4Connection.(JDBC4Connection.java:23) at
org.sqlite.SQLiteConnection.(SQLiteConnection.java:45) at
org.sqlite.JDBC.createConnection(JDBC.java:114) at
org.sqlite.JDBC.connect(JDBC.java:88) at
java.sql.DriverManager.getConnection(DriverManager.java:571) at
java.sql.DriverManager.getConnection(DriverManager.java:215
Aucun commentaire:
Enregistrer un commentaire