On Wed, 8 Jun 2022 06:58:13 -0700 (PDT), Antoine Etc wrote:
> Hi, i'm trying to load Spatialite extension in JAVA application with
> STMT.EXECUTE("SELECT LOAD_EXTENSION('MOD_SPATIALITE.SO')");
> Then the error occurs :
> [SQLITE_ERROR] SQL ERROR OR MISSING DATABASE
> (*PATH_TO_LIBDIR*/MOD_SPATIALITE.SO: UNDEFINED SYMBOL:
> I compiled spatialite with these following configure options :
> --DISABLE-RTTOPO --DISABLE-MINIZIP
> I tried to load mod_spatialite, but application doesn't find
> What can i do to solve the problem ?
you are missing to specify the unique relevant infos:
a) on wich OS/version are you working ?
I guess some kind of Linux (.so), but it's too vague
b) are you using directly sqlite3 for loading mod_spatialite
or some other tool (e.g. python, Java ...)
c) the most releavant question: wich version of SQLite3 ?
just some insight:
sqlite3_extension_init() was the expected entry point to be
declared by all extension modules many (many) years ago.
in modern times the convention for the entry point name
has changed, and consequently now mod_spatialite declares
as its entry point:
I strongly suspect that your loading app complaints about
a missing sqlite3_extension_init() just because it's
some venerable fossil of longly gone eras and is still
unaware of the new convention about entry point names.
the load_extension() function has two different signatures,
one of them allowing to explictitly pass the name of the
entry point of the extension.
please check if the following call fixes your issue:
SELECT load_extension('mod_spatialite', 'sqlite3_modspatialite_init');