I think you guys have figured this out, more details if not: DBQuery requires "spatialite=mod_spatialite" because this tells the SQLite drivers to load the spatialite extensions. I didn't want to hardcode the string "mod_spatialite" in case the Spatialite author changed the name of the shared library, plus this also opens the possibility of loading other extensions by adjusting the JDBC URL.
The SQLite native drivers embedded in the Xerial jar load the Spatialite extensions when DBQuery calls "SELECT load_extension" before running a Spatialite query. It's been awhile since I've used it, and don't have a dev environment set up at the moment, so I could be misremembering, but this step almost always depends on the operating system dynamic loader to resolve the location of the spatialite DLLs (or shared objects on Mac/Linux). As a result, it's best to do a standard spatialite install, which should put the DLLs in the proper location for your operating system to load them. See https://www.gaia-gis.it/fossil/libspatialite/wiki?name=mod_spatialite for more info. -lreeder On Wed, Dec 16, 2015 at 4:34 PM, <edgar.sol...@web.de> wrote: > On 16.12.2015 16:44, Rahkonen Jukka (MML) wrote: > > Lähettäjä: edgar.sol...@web.de [mailto:edgar.sol...@web.de] > > > > > >> issue with the sqlite extension libs seems to be that they are loaded > by sqlite itself. all _we've_ got is the > >> sqlite jdbc that seems to have a config switch to turn on autoloading > *OR* the SELECT load_extension(...); > >> *OR* the connection parameter > "jdbc:sqlite:/...?spatialite=mod_spatialite" (is that processed by > >> sqlite or did Larry hack that?). > > > > I do not believe that SQLite is autoloading anything. Datastore loads > mod_spatialite in > > > https://sourceforge.net/p/jump-pilot/code/HEAD/tree/core/trunk/src/com/vividsolutions/jump/datastore/spatialite/SpatialiteDSMetadata.java > > > > and DB Query in > https://sourceforge.net/p/jumpdbqplugin/code/ci/default/tree/src/main/java/org/freevoice/jumpdbqueryextension/spatialite/JumpSpatialiteDbQuery.java#l142 > > > > No mystery at all but explicit SQL function calls. > > > > just assumed because of > > https://sourceforge.net/p/jump-pilot/code/HEAD/tree/core/trunk/src/com/vividsolutions/jump/datastore/spatialite/SpatialiteDataStoreDriver.java#l69 > "new SQLiteConfig().enableLoadExtension(true);" > but obviously this just autoloads the sqlite native libs. > > my bad. > > we should probably add spatialite success load messages for debugging > purposes, just to make sure everything went well wrt. loading spatialite. > > .. ede > > > ------------------------------------------------------------------------------ > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >
------------------------------------------------------------------------------
_______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel