Hi Andy,
Template metadata is stored in the table METADATA. The column ‘istemplate’ is set to ‘y’ to indicate a template record. From a fresh install I get 9 template records (note: I work off the BlueNetMEST branch in the sandbox so my results may differ a little from yours).
I have never got the sample record setup to work, just assumed it was a bug somewhere and never really went looking. The failure may be timing related. Perhaps try exiting GAST after creating the tables and then starting the server, then run GAST and add the sample data.
Why? It has to do with Lucene (Apache open source indexing framework). Lucene is used to create and maintain keyword indexes for metadata records. You are correct, when first started the indexes do not exist and as part of the server startup the indexes will be rebuilt. You should see something like this during the first server startup:
exception while opening lucene index, going to rebuild it: no segments* file found in org.apache.lucene.store.FSDirectory@anonymised.com:\dev\workspace\BlueNet\dist\web\geonetwork\WEB-INF\lucene: files:
rebuilding lucene index
The index rebuild can take some time, in my case it’s around 10 minutes with ~2000 metadata records.
You may also want to check your directory permissions. The server process needs write permissions to /usr/local/geonetwork/web/geonetwork/WEB-INF/lucene and other locations below geonetwork (e.g. images).
Cheers,
Steve
-----Original Message-----
From: Andrew Chamberlain [mailto:andyc@anonymised.com]
Sent: Tuesday, 19 August 2008 3:32
To: Davies Stephen; geonetwork-devel@lists.sourceforge.net
Subject: Re: [GeoNetwork-devel] Empty Template List on Admin->New XML [SEC=UNCLASSIFIED]
Hi Stephen,
Thanks for getting back. And thanks too for the tip about the installer having an ant script for itself. I hadn’t spotted that, and using this will give me the confidence that I’m doing everything else right.
I’ve now tried installing using a freshly built installer jar file (as above), but the template menu remains empty. This is despite a seemingly successful set-up of the database using the GAST (the log for this is given below). When it says “Adding tempate file”, is there a table in the database which I could check to ensure it was added successfully?
Also, not sure if it’s related, but I’m still getting the following error when inserting the sample data:
no segments* file found in org.apache.lucene.store.FSDirectory@/usr/local/geonetwork/web/geonetwork/WEB-INF/lucene: files:
I’m guessing this is because it’s a fresh install and there’s no previous data in Lucene (?).
Is there anything else I can check? Your help is very much appreciated!
Andy
GAST output log for Database Set-Up:
2008-08-18 18:35:05,860 INFO [gast] - Removing database objects
2008-08-18 18:35:07,846 INFO [gast] - Creating database schema
2008-08-18 18:35:14,624 INFO [gast] - Filling database tables
2008-08-18 18:35:14,625 DEBUG [gast] - - Filling table : Categories
2008-08-18 18:35:14,745 DEBUG [gast] - - Filling table : Settings
2008-08-18 18:35:15,184 DEBUG [gast] - - Filling table : Languages
2008-08-18 18:35:15,245 DEBUG [gast] - - Filling table : IsoLanguages
2008-08-18 18:35:20,361 DEBUG [gast] - - Filling table : IsoLanguagesDes
2008-08-18 18:35:40,482 DEBUG [gast] - - Filling table : Regions
2008-08-18 18:35:43,350 DEBUG [gast] - - Filling table : RegionsDes
2008-08-18 18:35:54,987 DEBUG [gast] - - Filling table : Users
2008-08-18 18:35:55,013 DEBUG [gast] - - Filling table : Operations
2008-08-18 18:35:55,075 DEBUG [gast] - - Filling table : OperationsDes
2008-08-18 18:35:55,288 DEBUG [gast] - - Filling table : Groups
2008-08-18 18:35:55,330 DEBUG [gast] - - Filling table : GroupsDes
2008-08-18 18:35:55,453 DEBUG [gast] - - Filling table : CategoriesDes
2008-08-18 18:35:56,141 DEBUG [gast] - - Adding template file : raster.xml
2008-08-18 18:35:56,292 DEBUG [gast] - - Adding template file : vector.xml
2008-08-18 18:35:56,408 DEBUG [gast] - - Adding template file : service.xml
2008-08-18 18:35:56,711 DEBUG [gast] - - Adding template file : sub-PointOfContact.xml
2008-08-18 18:35:56,895 DEBUG [gast] - - Adding template file : sub-OnlineResource.xml
2008-08-18 18:35:56,943 DEBUG [gast] - - Adding template file : metadata.xml
2008-08-18 18:35:56,981 DEBUG [gast] - - Adding template file : metadata.xml
Stephen.Davies@anonymised.com wrote:
Hi Andy,
Templates are stored in the database. If building from source you still need to run the Gast tool at least once to create the database schema and populate key tables. There is an Ant script in the installer directory you can run to create the install jar file.
Not sure why you would copy bin, csw or gast to Tomcat (web is required). Richard Walker has created some documentation you might find useful, see http://trac.osgeo.org/geonetwork/wiki/HowToRunUnderTomcat .
Regards,
Steve
-----Original Message-----
From: geonetwork-devel-bounces@lists.sourceforge.net [mailto:geonetwork-devel-bounces@lists.sourceforge.net] On Behalf Of Andrew Chamberlain
Sent: Saturday, 16 August 2008 1:06
To: geonetwork-devel@anonymised.comts.sourceforge.net
Subject: [GeoNetwork-devel] Empty Template List on Admin->New XML
Hi All,
Just wondering if anyone can help…
Why is it that when I install a packaged, stable version of GeoNework (ie. using “java -jar geonetwork-install-2.2.0.jar
”), everything is dandy and I get a populated list of templates in the “New Metadata” admin page … but when I build from SVN and copy the created directories (ie. bin
, csw
, gast
, web,
etc.) to Tomcat, the same “Template” list is empty?
The reason I’m trying to build from SVN is to make use of the recently added support for entering ISO 19119 data.
Perhaps I need to build an installer jar file (e.g. geonetwork-install-2.3.0.jar)
which I run using “java -jar …” ?
Any advice or recommendations would be very much appreciated.
Many thanks,
Andy