I hope that this is the correct list to send this question.
I am trying to use SQLite on a Gumstix Linux module running Angstrom armv7l GNU/Linux. (32-bit).
I have installed the sqlite packages and can happily create and query a database using the sqlite command line.
I would like to access my database from some Java code – and I am hitting some problems!
I see the error:
java: codegen.c:2036: codegen_emit: Assertion `(15) != 15' failed.
Aborted
Whenever I try to make a connection to the database.
I have been trying out various jdbc providers and seem to always see the same error. Is this a common problem ?!?!
At the moment I am using the jdbc jar file downloaded from http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC#RuninPure-Javamode
And am running in “Pure Java” mode.
I have a very basic java test which tries to access the database in this way:
;
public static void main(String[] args) {
Connection conn = null;
System.out.println("Logging in to database");
try {
System.out.println(String.format("running in %s mode", SQLiteJDBCLoader.isNativeMode() ? "native" : "pure-java"));
System.setProperty("sqlite.purejava", "true");
System.out.println(String.format("running in %s mode", SQLiteJDBCLoader.isNativeMode() ? "native" : "pure-java"));
Class.forName("org.sqlite.JDBC");
System.out.println("Got jdbc driver");
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
System.out.println("Failure when getting jdbc driver");
e.printStackTrace();
}
try {
conn = DriverManager.getConnection("jdbc:sqlite:testdb.db");
System.out.println("Connected to the database");
} catch (SQLException e) {
// TODO Auto-generated catch block#
System.out.println("Failure connecting to the database");
e.printStackTrace();
}
Output:
Logging in to database
running in pure-java mode
running in pure-java mode
Got jdbc driver
java: codegen.c:2036: codegen_emit: Assertion `(15) != 15' failed.
Judging by the system.out calls my code dies when it reaches conn = DriverManager.getConnection
Any tips much appreciated.
Best Regards,
Katie,
Katie Blake, Software Developer
Visit us at Metering Europe, Booth B54.
Sentec Ltd phone: +44(0) 1223 303800
5 The Westbrook Centre fax: +44(0) 1223 303801
Milton Road mobile:
Cambridge email: kbl...@sentec.co.uk
CB4 1YG, UK web: www.sentec.co.uk
This email is confidential. If you have received it in error, please notify Sentec Ltd UK at postm...@sentec.co.uk immediately,
delete it from your system and note that you may not copy, distribute or use its contents.
Sentec Limited is registered at the above address UK Company Number 3452194.
_______________________________________________
sqlite-users mailing list
sqlite...@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Hello, Katie!
>
> I hope that this is the correct list to send this question.
> I am trying to use SQLite on a Gumstix Linux module running Angstrom armv7l GNU/Linux. (32-bit).
>
> I have installed the sqlite packages and can happily create and query a database using the sqlite command line.
>
> I would like to access my database from some Java code ? and I am hitting some problems!
>
> I see the error:
>
> java: codegen.c:2036: codegen_emit: Assertion `(15) != 15' failed.
> Aborted
>
This looks like a JVM error when trying to output JIT code.
> Whenever I try to make a connection to the database.
>
> I have been trying out various jdbc providers and seem to always see the same error. Is this a common problem ?!?!
>
> At the moment I am using the jdbc jar file downloaded from http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC#RuninPure-Javamode
> And am running in ?Pure Java? mode.
>
I've had no problems running the JDBC driver from here:
http://www.zentus.com/sqlitejdbc/
But your driver appears to be an extension of this driver, hence you may get the same issue. I've tested on AIX with the IBM JRE, so it will definitely be using the NestedVM version of the driver. If you haven't tried this driver, give it a go.
This driver:
http://www.ch-werner.de/javasqlite/
is a JNI based wrapper and may not be affected by the error you're seeing, which may be related to the NestedVM based implementation.
For the Xerial project driver, you may also want to post on it's mailing list. You might also want to try (cross-)compiling the Xerial driver from source for the armv7l target, so that you use the JNI interface, which should also improve performance.
You might also want to investigate the error within the JVM from your JRE vendor.
Hope that helps,
Christian (from IBM:)
Oh, and try running the JVM in non-JIT mode. That will isolate the problem to the JVM JIT compiler, and at least allow you to continue testing:
java -Djava.compiler=NONE ...
Christian
What a small world it is :) Thank you for helping me out!
I have tried the zentus driver, and have sent the same issue. I am now looking at getting the http://www.ch-werner.de/javasqlite/ compiled for my platform - fingers crossed!
I don't see any difference if I run the test program with a preceding java -Djava.compiler=NONE ... am I doing something foolish?
Thanks so much again, very much hope that life is treating you well at the moment.
Katie,
-----Original Message-----
From: sqlite-use...@sqlite.org [mailto:sqlite-use...@sqlite.org] On Behalf Of Christian Smith
Sent: 25 September 2011 22:34
To: General Discussion of SQLite Database
Subject: Re: [sqlite] SQLite on armv7l GNU/Linux - JDBC issues - any suggestions?!
On Sun, Sep 25, 2011 at 09:52:00PM +0100, Christian Smith wrote:
> On Sun, Sep 25, 2011 at 11:08:38AM +0100, Katie Blake wrote:
> >
> > I hope that this is the correct list to send this question.
> > I am trying to use SQLite on a Gumstix Linux module running Angstrom armv7l GNU/Linux. (32-bit).
> >
> > I have installed the sqlite packages and can happily create and query a database using the sqlite command line.
> >
> > I would like to access my database from some Java code ? and I am hitting some problems!
> >
> > I see the error:
> >
> > java: codegen.c:2036: codegen_emit: Assertion `(15) != 15' failed.
> > Aborted
> >
>
> This looks like a JVM error when trying to output JIT code.
>
> You might also want to investigate the error within the JVM from your JRE vendor.
Oh, and try running the JVM in non-JIT mode. That will isolate the problem to the JVM JIT compiler, and at least allow you to continue testing:
java -Djava.compiler=NONE ...
Christian
_______________________________________________
sqlite-users mailing list
sqlite...@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Katie Blake, Software Developer
Visit us at Metering Europe, Booth B54.
Sentec Ltd phone: +44(0) 1223 303800
5 The Westbrook Centre fax: +44(0) 1223 303801
Milton Road mobile:
Cambridge email: kbl...@sentec.co.uk
CB4 1YG, UK web: www.sentec.co.uk
This email is confidential. If you have received it in error, please notify Sentec Ltd UK at postm...@sentec.co.uk immediately,
delete it from your system and note that you may not copy, distribute or use its contents.
Sentec Limited is registered at the above address UK Company Number 3452194.
_______________________________________________
https://evolvis.org/pipermail/jalimo-info/2009-March/000299.html
Michael D. Black
Senior Scientist
NG Information Systems
Advanced Analytics Directorate
________________________________
From: sqlite-use...@sqlite.org [sqlite-use...@sqlite.org] on behalf of Katie Blake [KBl...@sentec.co.uk]
Sent: Monday, September 26, 2011 6:39 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] SQLite on armv7l GNU/Linux - JDBC issues -anysuggestions?!
Christian! Hi !
What a small world it is :) Thank you for helping me out!
I have tried the zentus driver, and have sent the same issue. I am now looking at getting the http://www.ch-werner.de/javasqlite/ compiled for my platform - fingers crossed!
I don't see any difference if I run the test program with a preceding java -Djava.compiler=NONE ... am I doing something foolish?
Thanks so much again, very much hope that life is treating you well at the moment.
Katie,
_______________________________________________
--
--
--
--ô¿ô--
K e V i N
I got JamVm for my platform and now see a different error - anyone any thoughts?!
( Once again the line in my code which causes the error is conn = DriverManager.getConnection("jdbc:sqlite:testdb.db"); )
Logging in to database
running in pure-java mode
running in pure-java mode
Got jdbc driver
java.lang.reflect.InvocationTargetException
at java.lang.reflect.VMMethod.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:327)
at jamvm.java.lang.JarLauncher.main(JarLauncher.java:50)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.VMMethod.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:327)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
at java.lang.reflect.VMMethod.invoke(Native Method)
...2 more
Caused by: java.lang.NullPointerException
at org.sqlite.NestedDB$CausedSQLException.fillInStackTrace(NestedDB.java:649)
at java.lang.Throwable.<init>(Throwable.java:161)
at java.lang.Exception.<init>(Exception.java:78)
at java.sql.SQLException.<init>(SQLException.java:76)
at java.sql.SQLException.<init>(SQLException.java:113)
at org.sqlite.NestedDB$CausedSQLException.<init>(NestedDB.java:626)
at org.sqlite.NestedDB._open(NestedDB.java:63)
at org.sqlite.DB.open(DB.java:86)
at org.sqlite.Conn.open(Conn.java:140)
at org.sqlite.Conn.<init>(Conn.java:57)
at org.sqlite.JDBC.createConnection(JDBC.java:77)
at org.sqlite.JDBC.connect(JDBC.java:64)
at java.sql.DriverManager.getConnection(DriverManager.java:165)
at java.sql.DriverManager.getConnection(DriverManager.java:204)
at DataTest.main(DataTest.java:27)
at java.lang.reflect.VMMethod.invoke(Native Method)
...5 more
Best Regards,
Katie
https://evolvis.org/pipermail/jalimo-info/2009-March/000299.html
Michael D. Black
Senior Scientist
NG Information Systems
Advanced Analytics Directorate
Christian! Hi !
Katie,
Katie Blake, Software Developer
Visit us at Metering Europe, Booth B54.
Sentec Ltd phone: +44(0) 1223 303800
5 The Westbrook Centre fax: +44(0) 1223 303801
Milton Road mobile:
Cambridge email: kbl...@sentec.co.uk
CB4 1YG, UK web: www.sentec.co.uk
This email is confidential. If you have received it in error, please notify Sentec Ltd UK at postm...@sentec.co.uk immediately,
delete it from your system and note that you may not copy, distribute or use its contents.
Sentec Limited is registered at the above address UK Company Number 3452194.
_______________________________________________
Just to let you know that I am running the same code on the same OS but with OpenJDK and my issue has now magically disappeared! Confirming Christian's suspicions of the JVM being the root of the issue I think..
Best Regards,
Katie,
-----Original Message-----
From: Katie Blake
Sent: 26 September 2011 19:08
To: 'General Discussion of SQLite Database'
Subject: RE: [sqlite] SQLite on armv7l GNU/Linux - JDBC issues -anysuggestions?!
Thank you so much for this suggestion Michael.
I got JamVm for my platform and now see a different error - anyone any thoughts?!
( Once again the line in my code which causes the error is conn = DriverManager.getConnection("jdbc:sqlite:testdb.db"); )
Logging in to database
running in pure-java mode
running in pure-java mode
Got jdbc driver
Best Regards,
Katie
-----Original Message-----
From: sqlite-use...@sqlite.org [mailto:sqlite-use...@sqlite.org] On Behalf Of Black, Michael (IS)
Sent: 26 September 2011 14:41
https://evolvis.org/pipermail/jalimo-info/2009-March/000299.html
Michael D. Black
Senior Scientist
NG Information Systems
Advanced Analytics Directorate
Christian! Hi !
Katie,
Katie Blake, Software Developer
Visit us at Metering Europe, Booth B54.
Sentec Ltd phone: +44(0) 1223 303800
5 The Westbrook Centre fax: +44(0) 1223 303801
Milton Road mobile:
Cambridge email: kbl...@sentec.co.uk
CB4 1YG, UK web: www.sentec.co.uk
This email is confidential. If you have received it in error, please notify Sentec Ltd UK at postm...@sentec.co.uk immediately,
delete it from your system and note that you may not copy, distribute or use its contents.
Sentec Limited is registered at the above address UK Company Number 3452194.
_______________________________________________
Once I was able to make JDBC connections to SQLite on my system I found any volume of connections lead to intermittent errors in the pure java sqlite jdbc providers I was using.
Things like:
org.ibex.nestedvm.Runtime$FaultException: java.lang.NullPointerException: at (unknown)
at org.sqlite.SQLite._execute(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:406)
at org.sqlite.NestedDB.call(NestedDB.java:389)
at org.sqlite.NestedDB.step(NestedDB.java:133)
at org.sqlite.DB.execute(DB.java:261)
at org.sqlite.Stmt.exec(Stmt.java:56)
at org.sqlite.Stmt.executeQuery(Stmt.java:90)
Using the native JCBC option and compiling the supporting library from here-> http://www.ch-werner.de/javasqlite/ fixed the issue.
Very pleased!
-----Original Message-----
From: Katie Blake
Sent: 27 September 2011 17:50
To: Katie Blake; 'General Discussion of SQLite Database'
Subject: RE: [sqlite] SQLite on armv7l GNU/Linux - JDBC issues -anysuggestions?!
Hello again,
Just to let you know that I am running the same code on the same OS but with OpenJDK and my issue has now magically disappeared! Confirming Christian's suspicions of the JVM being the root of the issue I think..
Best Regards,
Katie,
-----Original Message-----
From: Katie Blake
Sent: 26 September 2011 19:08
To: 'General Discussion of SQLite Database'
Subject: RE: [sqlite] SQLite on armv7l GNU/Linux - JDBC issues -anysuggestions?!
Thank you so much for this suggestion Michael.
I got JamVm for my platform and now see a different error - anyone any thoughts?!
( Once again the line in my code which causes the error is conn = DriverManager.getConnection("jdbc:sqlite:testdb.db"); )
Logging in to database
running in pure-java mode
running in pure-java mode
Got jdbc driver
Best Regards,
Katie
-----Original Message-----
From: sqlite-use...@sqlite.org [mailto:sqlite-use...@sqlite.org] On Behalf Of Black, Michael (IS)
Sent: 26 September 2011 14:41
https://evolvis.org/pipermail/jalimo-info/2009-March/000299.html
Michael D. Black
Senior Scientist
NG Information Systems
Advanced Analytics Directorate
Christian! Hi !
Katie,
Katie Blake, Software Developer
Visit us at Metering Europe, Booth B54.
Sentec Ltd phone: +44(0) 1223 303800
5 The Westbrook Centre fax: +44(0) 1223 303801
Milton Road mobile:
Cambridge email: kbl...@sentec.co.uk
CB4 1YG, UK web: www.sentec.co.uk
This email is confidential. If you have received it in error, please notify Sentec Ltd UK at postm...@sentec.co.uk immediately,
delete it from your system and note that you may not copy, distribute or use its contents.
Sentec Limited is registered at the above address UK Company Number 3452194.
_______________________________________________