0

I have I-Jetty web server configured in Android. I also have a SQLite .db file stored in the SD card.

What I want to do is to access my database from a .WAR file deployed in the web server.

To do this, I use JDBC library in my servlet to connect to my database. I have added the .jar driver file for SQLite. Everything seems to be OK in my development.

The problem is, when I start my web server from Android and access to my servlet within the browser in my device:

 http://localhost:8080/myServlet

I have this exception raised:

SQLite library not found.

I don't know why. The SQLite library is normally brought with the Android System, and I have libsqlitejdbc.so in my driver file.

Andrew T.
  • 4,701
  • 8
  • 43
  • 62
Nabil El
  • 972
  • 1
  • 10
  • 24

1 Answers1

0

The native SQLite library that comes with Android is integrated in a different way compared to sqlite-jdbc. So sqlite-jdbc can not use it. sqlite-jdbc comes with multiple shared libraries for Windows, Mac and Linux but those are not compatible with Android.

You could use SQLDroid for accessing your DB on your Android device.

HHK
  • 4,852
  • 1
  • 23
  • 40