Hi Frank,
I've verified, indeed a reference to a geopackage inside the data directory
does not work,
it only works using an absolute reference for the moment.
Could you open a bug report for it?
Cheers
Andrea
On Tue, Oct 24, 2017 at 12:51 PM, Steggink, Frank <
[email protected]> wrote:
> 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
>
>
--
Regards,
Andrea Aime
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
------------------------------------------------------------------------------
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