Bejay Bamboo wrote:
> 
> Hello,
> i'm trying to load new SQL functions from a shared library with the
> help of the SQLite Java
> Wrapper/JDBC Driver (http://www.ch-werner.de/javasqlite). I'm trying
> 
> java -cp :. -Djava.library.path=/tmp/javasqlite-20090213/.libs
> SQLite.Shell db "select
> load_extension('/tmp/spatialite-2.2-linux-x86-libs/lib/libspatialite.so')"
> 
> I get the following SQL Error:
> 
> SQL Error: SQLite.Exception: not authorized
> 
> Same error in the small test program
> (http://www.ch-werner.de/javasqlite/test.java) i ve added the
> following line:
> 
> db.exec("select
> load_extension('/tmp/spatialite-2.2-linux-x86-libs/lib/libspatialite.so')",new
> test());
> 
> The following statements are fully working  in sqlite:
> sqlite> select 
> load_extension('/tmp/spatialite-2.2-linux-x86-libs/lib/libspatialite.so');
> sqlite> .load /tmp/spatialite-2.2-linux-x86-libs/lib/libspatialite.so
> 
> Did I misunderstood something? Did i trying something which is not
> provided by the SQLite Java
> Wrapper/JDBC Driver?

In order to enable loading an extension the SQLite API
sqlite_enable_load_extension() must be called but there's
currently no method to call it from Java code for 
security reasons.

HTH,
Christian
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to