#826: GeoNetwork data directory
--------------------------+-------------------------------------------------
Reporter: fxp | Owner: geonetwork-devel@…
Type: enhancement | Status: closed
Priority: major | Milestone: v2.7.0
Component: General | Version:
Resolution: fixed | Keywords:
--------------------------+-------------------------------------------------
Comment(by landry):
I have an issue with that changeset. If i set my geosource build (from
trunk) datadir to say, /tmp/geonetwork (via <param-name>geonetwork.dir
</param-name> in web.xml) then geosource fails to create the images/logos
subdir at startup in that dir.
Traceback is :
SEVERE: StandardWrapper.Throwable
java.lang.AssertionError: Unable to create the images/logos directory.
Permissions problem? null/images/logos
at
org.fao.geonet.resources.Resources.locateLogosDir(Resources.java:68)
at org.fao.geonet.Geonetwork.createSiteLogo(Geonetwork.java:692)
at org.fao.geonet.Geonetwork.start(Geonetwork.java:422)
If i add some debug info in locateLogosDir, it gets passed :
a not-null context
a not-null appDir (/var/lib/tomcat6/webapps/geonetwork-private/)
but locateResourcesDir returns null. If i look for this func, there are
two slightly different implementations with the same signature, and the
second one is called (ie the one with
System.getProperty(context.getServletContextName()+".resources.dir")
If i look more closely in my case, context.getServletContextName() is
'geosource' and not 'geonetwork'. Anyway, I would have assumed from the
diff and the commit made that the resources dir, if not set, defaulted to
datadir/resources, instead of being undefined here.
I've tried setting geosource.resources.dir in web.xml, but it doesnt seem
to be reached by locateResourcesDir() which still returns null. So, my
workaround so far is to hack around locateLogosDir() and hardcode path to
a subdir of /tmp/geonetwork, which i know works. But i'd definitely
welcome a better fix, ie having the resources dir gracefully default to a
subdir of datadir.
--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/826#comment:2>
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/>
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.