[GeoNetwork-devel] Empty Template List on Admin->New XML [SEC=UNCLASSIFIED]

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

Stephen.Davies@anonymised.com wrote:

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.

Hi Stephen & Andy,

In the BlueNet MEST version of GeoNetwork there are 5 templates installed on database setup and 15 sample records installed as part of the sample data so I think you must have got your sample record setup to work somehow Stephen! If you are using gast to setup the database and load sample data then pay attention to the icons at the top right hand side of the panels - for Database->Setup, geonetwork should be stopped but for Database->Sample data, geonetwork needs to be running and you need to have authenticated using the Options pull down in gast (sorry if you've been through all this before).

This has always worked reliably for me (in gast and on install) so I'm interested in whether there are bugs outstanding on this.

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.

10 minutes! Wow - I guess it depends on how extensive these records are, how slow the machine you're running it on is and where the database is but re-indexing approx 1450 ISO19139 marine records (mysql and oracle 10g) is typically quite a bit less than 60 seconds on our server machine. More details on why this takes so long would be nice!

Cheers,
Simon

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 <mailto: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 HowToRunUnderTomcat – GeoNetwork opensource Developer website .

Regards,

Steve

-----Original Message-----
*From:* geonetwork-devel-bounces@lists.sourceforge.net <mailto: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@lists.sourceforge.net <mailto:geonetwork-devel@lists.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

------------------------------------------------------------------------

This body part will be downloaded on demand.
------------------------------------------------------------------------

This body part will be downloaded on demand.

Hi Simon and Stephen,

Yes, that’s got it! I had to restart tomcat for the database set-up operation to take effect. The template list is now populated.

Many thanks to you both.

Andy