[GeoNetwork-devel] [GeoNetwork opensource Developer website] #826: GeoNetwork data directory

#826: GeoNetwork data directory
-------------------------+--------------------------------------------------
Reporter: fxp | Owner: geonetwork-devel@…
     Type: enhancement | Status: new
Priority: major | Milestone: v2.7.0
Component: General | Version:
Keywords: |
-------------------------+--------------------------------------------------
See proposal
http://trac.osgeo.org/geonetwork/wiki/proposals/GeoNetworkDataDir

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/826&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
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.

#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:
--------------------------+-------------------------------------------------
Changes (by fxp):

  * status: new => closed
  * resolution: => fixed

Comment:

Committed revision 8879.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/826#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
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.

#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"):wink:

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&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
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.

#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):

Correction. Setting the resource dir only works if passing
-Dgeosource.resources.dir=/tmp/geosource_res to the tomcat commandline
java options. That way it's created at tomcat startup, but this is not
really consistent with the way to set the datadir through web.xml.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/826#comment:3&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
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.

#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):

And finally, i don't know if it's still related to the datadir, but with
that setting geosource doesnt register any schema and
/tmp/geosource_data/config/schemaplugin-uri-catalog.xml links to no
schema. The admin interface doesnt even show the schemas supposedly
bundled by geonetwork, i had to manually copy iso19139 and iso19139.fra
dirs to /tmp/geosource_data/config/schema_plugins to see them.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/826#comment:4&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
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.