I currently am working on a quite simple projet using Java web app hosted in Weblogic and an SQLite DB. (Scope quite small, two tables only)
Developpement went fine and still works, but when deploying to staging, i got some unexpected prolem.
Whenever the app has to read (select) from the DB, i can read the following stack trace :
Root cause of ServletException.java.lang.Error: in _syscall()
at org.ibex.nestedvm.Runtime.syscall(Runtime.java:1086)
at org.sqlite.SQLite.run_0x171800(target/build/SQLite.mips:???)
at org.sqlite.SQLite.trampoline(target/build/SQLite.mips:???)
at org.sqlite.SQLite._execute(target/build/SQLite.mips:???)
at org.ibex.nestedvm.Runtime.__execute(Runtime.java:506)
at org.ibex.nestedvm.Runtime.call(Runtime.java:678)
at org.ibex.nestedvm.Runtime.call(Runtime.java:647)
at org.sqlite.NestedDB.call(NestedDB.java:568)
at org.sqlite.NestedDB.call(NestedDB.java:563)
at org.sqlite.NestedDB.prepare(NestedDB.java:130)
at org.sqlite.DB.prepare(DB.java:123)
at org.sqlite.Stmt.executeQuery(Stmt.java:121)
Please tell me if i am wrong, but what i understand is that the target/build/SQLite.mips refers to a native implementation of the driver. However, i did specify it should stick to pure java using :
Connection con;
//Load the JDBC driver class dynamically.
Driver d = (Driver)Class.forName("org.sqlite.JDBC").newInstance();
DriverManager.registerDriver(d);
//init the connection
System.setProperty("sqlite.purejava", "true");
con = DriverManager.getConnection(getConnectionString());
Is my understanding correct ? How could i further enforce the use of pure java implementation ? Could anything else cause such a stack trace ?
For the record, both dev and stagging environements are linux / bea weblogic.
Thanks for you time :)
From the class names in your stacktrace I am assuming that you are using XerialJ JDBC driver (isn't that a little old?)
According to its wiki you are supposed to set that property before loading the JDBC driver
System.setProperty("sqlite.purejava", "true");
Class.forName("org.sqlite.JDBC");
You are setting it after the driver is loaded (but before connection setup). Please change the order of your initialization as below and retry:
//Load the JDBC driver class dynamically.
System.setProperty("sqlite.purejava", "true");
Driver d = (Driver)Class.forName(driver).newInstance();
DriverManager.registerDriver(d);
//init the connection
con = DriverManager.getConnection(getConnectionString());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With