Hi,

Last Friday I’ve sent an e-mail about an issue when adding a Geopackage file as 
a data store in Geoserver. I’m using Geoserver 2.12.0 in combination with 
Tomcat 8.5.20 on a Debian Jessie machine running in a Docker container. This is 
the relevant part from my mail:

First of all, I’m having difficulties adding a new geopackage store. I’m adding 
a new datastore by just specifying the data source name and the database file 
(SQLite file), using the file browser. In the GEOSERVER_DATA_DIR (which is at 
/data in my container) I’ve created a subdirectory, also called “data”, which 
is mounted as a volume from the host into my Docker container. Because it is a 
subdirectory of the Geserver data dir, I’m getting the following relative path: 
file:data/mossel.gpkg. Since there are no other mandatory parameters (the 
namespace comes from my workspace), I just click “Save”, but the following 
error message appears: Error creating data store, check the parameters. Error 
message: Unable to obtain connection: Cannot create PoolableConnectionFactory 
(path to 'data/mossel.gpkg': '/usr/local/tomcat/data' does not exist). The 
directory /usr/local/tomcat is the Tomcat (Catalina) base dir. When creating a 
symbolic link from /usr/local/tomcat to /data/data (by executing the command ln 
-s /data/data from within /usr/local/tomcat), I’m not getting this error 
message anymore. So I’m fairly certain that this issue is not caused by my 
particular setup. My guess is that when the connection to the SQLite database 
is being set up, the relative path is not prefixed by the Geoserver data dir.

I have reproduced this issue on a Ubuntu Xenial VM using Geoserver 2.12.0 
running on Tomcat 8.5.23. The result is nearly the same. My data dir is now 
/opt/geoserver/data, catalina base dir is /opt/tomcat, and my geopackage file 
is /opt/geoserver/data/data/mossel.gpkg. When adding this file as a datastore 
(file:data/mossel.gpkg), I’m getting the following exception: Error creating 
data store, check the parameters. Error message: Unable to obtain connection: 
Cannot create PoolableConnectionFactory (path to 'data/mossel.gpkg': '/data' 
does not exist)
Apparently it is expecting a dir /data on my host, so I created a symlink again 
(executed in the root dir: sudo ln -s /opt/geoserver/data/data), and I’m able 
to load this file. The major difference, apart from not using Docker, is that 
I’m running Tomcat as a service. That is probably the reason that the root dir 
is seen as the root path, and not the Tomcat dir.

With kind regards,

Frank Steggink


Disclaimer:
De inhoud van dit bericht is uitsluitend bestemd voor geadresseerde.
Gebruik van de inhoud van dit bericht door anderen zonder toestemming van het 
Kadaster
is onrechtmatig. Mocht dit bericht ten onrechte bij u terecht komen, dan 
verzoeken wij u
dit direct te melden aan de verzender en het bericht te vernietigen.
Aan de inhoud van dit bericht kunnen geen rechten worden ontleend.

Disclaimer:
The content of this message is meant to be received by the addressee only.
Use of the content of this message by anyone other than the addressee without 
the consent
of the Kadaster is unlawful. If you have received this message, but are not the 
addressee,
please contact the sender immediately and destroy the message.
No rights can be derived from the content of this message.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to