Using the stable 2.8.0 ANZMEST version of Geonetwork (similar to GN
2.8.0 with ANZMEST schema additions). Initially I had the geonetwork data
directory in the default location geonetwork/WEB-INF/data and all was fine
i.e I was adding/changing metadata and working OK.
Later I put the data directory into an
another place to make it easier to do upgrades. So I set
-Dgeonetwork.dir=/home/awalsh/geonetwork_data for the java command
in start_geonetwork.sh and I copied all contents geonetwork/WEB-INF/data
to the new location /home/awalsh/geonetwork_data.
I then restart geonetwork, it detects the new data dir. location OK but startup
fails with message:-
2013-06-11 11:09:56,472 ERROR [geonetwork.schemamanager] - Failed whilst adding
the schema information. Exception message if any is Exceeded maximum number of
plugin schemas 20
Craig Jones informed me that:-
When you start up GeoNetwork, an xml file containing schema plugin
linking information is updated with the location of all schema plugins
found in the schema plugins directory:
/config/schemaplugin-uri-catalog.xml
Unfortunately, the Schema Manager doesn't remove entries which don't
exist anymore and only a maximum number of 20 are allowed so its
attempting to add all the schema plugins in the new location without
removing the old ones and is running out of space.
A workaround for this issue is to delete the config/schemaplugin-uri-catalog.xml
in the new data dir. location and let GN recreate it on startup. However a more permanent
solution might be like:
- schema manager I think?, should check IF geonetwork.dir was set
- IF geonetwork.dir set then root of file paths in schemaplugin-uri-catalog.xml should have <geonetwork.dir>/ in them.
- If the file paths don't have geonetwork.dir in them then delete those entries and
recreate the correct entry.
OR on further thought, may be simpler to always remake the
config/schemaplugin-uri-catalog.xml on startup generating
the paths depending on setting of geonetwork.dir or not.