sqlite with Java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

sqlite with Java

Sylvain Pointeau
Dear all,

I would like to use sqlite from Java, but I am also looking to buy SSE.
however which library would you recommend? how to integrate SSE?

ps: it would be splendid if you could provide the java libs, similar to the
.net version.

Best regard,
Sylvain
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

PICCORO McKAY Lenz
one solution its use the odbc sqlite brigde

http://www.java2s.com/Tutorial/Java/0340__Database/ConnecttoAccessDatabaseusingJDBCODBCbridge.htm

with the sqlite odbc module

http://www.ch-werner.de/sqliteodbc/

so due i dont see here java (a general great widely use due
portability) facilities, and too much .net facilities

the other its used 3dr party as:
http://www.sqlitetutorial.net/sqlite-java/

that's enough info
Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com


2017-03-17 17:35 GMT-04:00 Sylvain Pointeau <[hidden email]>:

> Dear all,
>
> I would like to use sqlite from Java, but I am also looking to buy SSE.
> however which library would you recommend? how to integrate SSE?
>
> ps: it would be splendid if you could provide the java libs, similar to the
> .net version.
>
> Best regard,
> Sylvain
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

Sylvain Pointeau
I don't really want to use odbc in Java. I was thinking of
https://github.com/xerial/sqlite-jdbc
but how to use SSE in this case? seems the build is not so easy.

with the sqlite odbc module
>
> http://www.ch-werner.de/sqliteodbc
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

Christian Werner
On 03/18/2017 06:21 AM, Sylvain Pointeau wrote:
> I don't really want to use odbc in Java. I was thinking of
> https://github.com/xerial/sqlite-jdbc
> but how to use SSE in this case? seems the build is not so easy.

You could use http://www.ch-werner.de/javasqlite which can be built with SEE.

Best,
Christian

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

Sylvain Pointeau
Le sam. 18 mars 2017 à 09:53, Christian Werner <[hidden email]>
a écrit :

> On 03/18/2017 06:21 AM, Sylvain Pointeau wrote:
> > I don't really want to use odbc in Java. I was thinking of
> > https://github.com/xerial/sqlite-jdbc
> > but how to use SSE in this case? seems the build is not so easy.
>
> You could use http://www.ch-werner.de/javasqlite which can be built with
> SEE.


OK I can give it a try.

Could it be updated to the latest version of sqlite, seems it is pretty
outdated now.
Could it be also improved? not needing to set the path of the native
library? like xerial made it, is it possible?

does this jdbc driver give the metadata?

Best regards,
Sylvain


>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

Christian Werner
> Could it be updated to the latest version of sqlite, seems it is pretty
> outdated now.

Totally outdated but still compiling even with most recent SQLite 3 (and 2)
versions and having autoconf OOTB support for SEE. Must be steampunk then ;-)

> Could it be also improved? not needing to set the path of the native
> library? like xerial made it, is it possible?

If properly installed there should be no need to explicitly set a path.

> does this jdbc driver give the metadata?

Yes.

Best,
Christian

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

Sylvain Pointeau
On Sat, Mar 18, 2017 at 1:04 PM, Christian Werner <
[hidden email]> wrote:

> Could it be updated to the latest version of sqlite, seems it is pretty
>> outdated now.
>>
>
> Totally outdated but still compiling even with most recent SQLite 3 (and 2)
> versions and having autoconf OOTB support for SEE. Must be steampunk then
> ;-)
>

I am on a computer without compilers, it would have been good if I could
test with the latest version.

Could it be also improved? not needing to set the path of the native
>> library? like xerial made it, is it possible?
>>
>
> If properly installed there should be no need to explicitly set a path.
>

You mean in the JDK (or JRE)? (if yes -> this is not always possible)

another question, do you confirm that sqlite3 is included into
sqlite_jni.dll?

Best regards,
Sylvain
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

Christian Werner
On 03/18/2017 02:01 PM, Sylvain Pointeau wrote:

>> If properly installed there should be no need to explicitly set a path.
>>
>
> You mean in the JDK (or JRE)? (if yes -> this is not always possible)
>
> another question, do you confirm that sqlite3 is included into
> sqlite_jni.dll?

Now I'm a little bit confused. You asked for an SEE enabled SQLite Java
binding. This requires you to 1. obtain your SEE license from DRH's company
and 2. to use the SEE sources and compile/link them to {lib,}sqlite_jni.{dll,so}
for your target platform.

So in any case involving SEE you have to rebuild things from source code
and deal with deployment on the target environment.

Regarding the {lib,}sqlite_jni.{dll,so}: it depends on the platform,
for Windows the SQLite 3 (and optionally 2) engine usually is directly linked
into that library. For Linuxen many distros have a javasqlite-something
package where the maintainers chose to dynamically link to the system
SQLite 3 library.

HTH,
Christian

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

Sylvain Pointeau
> Now I'm a little bit confused. You asked for an SEE enabled SQLite Java
> binding. This requires you to 1. obtain your SEE license from DRH's company
> and 2. to use the SEE sources and compile/link them to
> {lib,}sqlite_jni.{dll,so}
> for your target platform.
>

Don't be confused, I know all that, but before to buy the SSE (it is
2'000), I need:
1- to choose a sqlite jdbc driver allowing SSE (done)
2- to test the java driver to see if I can migrate successfully from H2 to
sqlite (I will do that in the next coming week(s))
3- to really assess if I need still need encryption in my project (after
some recent changes)

For now I tested your driver (quicky) and it seems I can use it, so 1 is
done, I need to do 2.


>
> So in any case involving SEE you have to rebuild things from source code
> and deal with deployment on the target environment.
>
>
Yes and I have a compiler on another machine, but for a matter of testing
quickly, I would not like go through the compile cycle.
Anyway, for now I tested with the outdated version (3.7.7.1)

Why don't you provide an up-to-date version? this lib seems dead when we
look at the website, also why don't you put the sources on git it would be
easier to contribute or raise a bug if any...
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

Sylvain Pointeau
>
> Why don't you provide an up-to-date version? this lib seems dead when we
> look at the website, also why don't you put the sources on git it would be
> easier to contribute or raise a bug if any...
>

I tried to compile the latest version of sqlite 3.17 with the latest
sources of sqlitejava  (http://www.ch-werner.de/javasqlite) with VS2015
Express Edition
I downloaded the latest jdk-8u121.

I have the following error: SQLite\JDBCDriver.java:9: error: JDBCDriver is
not abstract and does not override abstract method getParentLogger() in
Driver
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

Sylvain Pointeau
On Sun, Mar 19, 2017 at 4:57 PM, Sylvain Pointeau <
[hidden email]> wrote:

> Why don't you provide an up-to-date version? this lib seems dead when we
>> look at the website, also why don't you put the sources on git it would be
>> easier to contribute or raise a bug if any...
>>
>
> I tried to compile the latest version of sqlite 3.17 with the latest
> sources of sqlitejava  (http://www.ch-werner.de/javasqlite) with VS2015
> Express Edition
> I downloaded the latest jdk-8u121.
>
> I have the following error: SQLite\JDBCDriver.java:9: error: JDBCDriver is
> not abstract and does not override abstract method getParentLogger() in
> Driver
>

I just tried with jdk-6u45-x86:

SQLite\JDBC2x\JDBCConnection.java:17: SQLite.JDBC2x.JDBCConnection is not
abstract and does not override abstract method
createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection
public class JDBCConnection
       ^
.\SQLite\JDBC2x\JDBCDatabaseMetaData.java:10:
SQLite.JDBC2x.JDBCDatabaseMetaData is not abstract and does not override
abstract method
getFunctionColumns(java.lang.String,java.lang.String,java.lang.String,java.lang.String)
in java.sql.DatabaseMetaData
public class JDBCDatabaseMetaData implements DatabaseMetaData {
       ^
.\SQLite\JDBC2x\JDBCResultSet.java:12: SQLite.JDBC2x.JDBCResultSet is not
abstract and does not override abstract method
updateNClob(java.lang.String,java.io.Reader) in java.sql.ResultSet
public class JDBCResultSet implements java.sql.ResultSet {
       ^
.\SQLite\JDBC2x\JDBCStatement.java:6: SQLite.JDBC2x.JDBCStatement is not
abstract and does not override abstract method isPoolable() in
java.sql.Statement
public class JDBCStatement implements java.sql.Statement {
       ^
.\SQLite\JDBC2x\JDBCResultSetMetaData.java:5:
SQLite.JDBC2x.JDBCResultSetMetaData is not abstract and does not override
abstract method isWrapperFor(java.lang.Class<?>) in java.sql.Wrapper
public class JDBCResultSetMetaData implements java.sql.ResultSetMetaData {
       ^
.\SQLite\JDBC2x\JDBCPreparedStatement.java:17:
SQLite.JDBC2x.JDBCPreparedStatement is not abstract and does not override
abstract method setNClob(int,java.io.Reader) in java.sql.PreparedStatement
public class JDBCPreparedStatement extends JDBCStatement
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

Sylvain Pointeau
On Sun, Mar 19, 2017 at 5:38 PM, Sylvain Pointeau <
[hidden email]> wrote:

> On Sun, Mar 19, 2017 at 4:57 PM, Sylvain Pointeau <
> [hidden email]> wrote:
>
>> Why don't you provide an up-to-date version? this lib seems dead when we
>>> look at the website, also why don't you put the sources on git it would be
>>> easier to contribute or raise a bug if any...
>>>
>>
>> I tried to compile the latest version of sqlite 3.17 with the latest
>> sources of sqlitejava  (http://www.ch-werner.de/javasqlite) with VS2015
>> Express Edition
>> I downloaded the latest jdk-8u121.
>>
>> I have the following error: SQLite\JDBCDriver.java:9: error: JDBCDriver
>> is not abstract and does not override abstract method getParentLogger() in
>> Driver
>>
>
> I just tried with jdk-6u45-x86:
>
> SQLite\JDBC2x\JDBCConnection.java:17: SQLite.JDBC2x.JDBCConnection is not
> abstract and does not override abstract method
> createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection
> public class JDBCConnection
>        ^
> .\SQLite\JDBC2x\JDBCDatabaseMetaData.java:10: SQLite.JDBC2x.JDBCDatabaseMetaData
> is not abstract and does not override abstract method
> getFunctionColumns(java.lang.String,java.lang.String,java.lang.String,java.lang.String)
> in java.sql.DatabaseMetaData
> public class JDBCDatabaseMetaData implements DatabaseMetaData {
>        ^
>

it works with jdk-1_5_0_22

Please could we move this library to compile with the newest JDK and VS2015
without error and warning?

I am ready to help for windows.

Best regards,
Sylvain
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

Christian Werner
In reply to this post by Sylvain Pointeau
On 03/19/2017 05:38 PM, Sylvain Pointeau wrote:

> On Sun, Mar 19, 2017 at 4:57 PM, Sylvain Pointeau <
> [hidden email]> wrote:
>
>> Why don't you provide an up-to-date version? this lib seems dead when we
>>> look at the website, also why don't you put the sources on git it would be
>>> easier to contribute or raise a bug if any...
>>>
>>
>> I tried to compile the latest version of sqlite 3.17 with the latest
>> sources of sqlitejava  (http://www.ch-werner.de/javasqlite) with VS2015
>> Express Edition
>> I downloaded the latest jdk-8u121.
>>
>> I have the following error: SQLite\JDBCDriver.java:9: error: JDBCDriver is
>> not abstract and does not override abstract method getParentLogger() in
>> Driver
>>
>
> I just tried with jdk-6u45-x86:

IMO it is no good idea to discuss specific issues of an only indirectly SQLite related
library on this mailing list.

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

Sylvain Pointeau
>
>
> IMO it is no good idea to discuss specific issues of an only indirectly
> SQLite related
> library on this mailing list


OK yes I agree, where can we discuss about it?

>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

Christian Werner
On 03/19/2017 06:38 PM, Sylvain Pointeau wrote:
>>
>> IMO it is no good idea to discuss specific issues of an only indirectly
>> SQLite related
>> library on this mailing list
>
>
> OK yes I agree, where can we discuss about it?

C'mon, you apparently obtained the source code of this dead project, didn't you?

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

Sylvain Pointeau
> OK yes I agree, where can we discuss about it?
>
>
For information, we continued this discussion privately.

I succeed to build this library and I will use it in my project.
Additionally I would be glad contribute if Christian needs my help.
Furthermore, I will assess my need to have SSE, and if yes, I will buy it
and integrate it (quite easily).

I will also blog on how to compile it and how to use it, sooner or later,
it might help other people having the same need.

Best regards,
Sylvain
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

Timothy Stack
In reply to this post by Sylvain Pointeau
I see that you've got a solution working, but I wanted to mention this
project which is a JDBC driver that can work with a dynamically linked
sqlite library so there shouldn't be anything to recompile:

  https://github.com/tstack/SqliteJdbcNG

Unfortunately, it hasn't seen updates for a couple years, but I think
it still works.

thanks,

tim stack

On Fri, Mar 17, 2017 at 2:35 PM, Sylvain Pointeau <
[hidden email]> wrote:

> Dear all,
>
> I would like to use sqlite from Java, but I am also looking to buy SSE.
> however which library would you recommend? how to integrate SSE?
>
> ps: it would be splendid if you could provide the java libs, similar to the
> .net version.
>
> Best regard,
> Sylvain
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite with Java

Matthias-Christian Ott
On 2017-03-21 21:36, Timothy Stack wrote:
> I see that you've got a solution working, but I wanted to mention this
> project which is a JDBC driver that can work with a dynamically linked
> sqlite library so there shouldn't be anything to recompile:

I can confirm that it's possible to dynamically link SQLite in a JDBC
driver without any additional problems.

I created JDBC driver for SQLite because I was disappointed with the
existing drivers. It takes between 30 to 200 person hours to create a
JDBC driver for SQLite, depending on your experience and the number of
features that you want to support. So perhaps that is also an option.

- Matthias

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Loading...