Cannot run tests or change skins on simulator that uses database

13 views
Skip to first unread message

nickk...@gmail.com

unread,
Jul 27, 2017, 10:40:13 PM7/27/17
to CodenameOne Discussions
If you change skins the database ends up open twice or something and you get the following error. This also happens if you run tests from the TestRecorder.

[EDT] 0:0:0,236 - Exception: java.lang.UnsatisfiedLinkError - org.sqlite.NativeDB._open(Ljava/lang/String;I)V
java.lang.UnsatisfiedLinkError: org.sqlite.NativeDB._open(Ljava/lang/String;I)V
at org.sqlite.NativeDB._open(Native Method)
Rendering frame took too long 652 milliseconds
at org.sqlite.DB.open(DB.java:157)
at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:184)
at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:105)
at org.sqlite.JDBC.createConnection(JDBC.java:113)
at org.sqlite.JDBC.connect(JDBC.java:87)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:270)
at com.codename1.impl.javase.JavaSEPort.openOrCreateDB(JavaSEPort.java:8146)
at com.codename1.ui.Display.openOrCreate(Display.java:3665)
at com.codename1.db.Database.openOrCreate(Database.java:59)

I'm closing the database in destroy() but it still has this error.

Shai Almog

unread,
Jul 28, 2017, 1:04:51 AM7/28/17
to CodenameOne Discussions
Can you please file an issue on that?
I made an attempt to fix it in the past and it failed. This is because the JDBC driver for sqlite uses native code and that breaks out classloader tricks.

I've tried some tricks to separate the JDBC driver loading but that didn't work out I'm guessing this needs more work. I had it on low priority because I only thought about the skin change hassle but the test case issue is big...

kurt....@it.weltec.ac.nz

unread,
Jan 9, 2019, 8:54:33 PM1/9/19
to CodenameOne Discussions
Im currently getting an error like this, any progress on a fix?

Shai Almog

unread,
Jan 9, 2019, 10:46:13 PM1/9/19
to CodenameOne Discussions
Reply all
Reply to author
Forward
0 new messages