[GeoNetwork-devel] Bugs in latest source (2.1.0 alpha)

Hi All,

            I have been playing with the latest source of Geonetwork
(retrieved on 5/10/2006) and have found a bug that was not present in the
last version I was using (also 2.1.0 alpha, but probably from a few weeks
ago). It seems like the formats are not being loaded since the drop down
list of formats on the XML Metadata Insert page contains nothing.

            There was also a bug in the Harvester class which caused
Geonetwork to throw NullPointerExceptions every 2 seconds. The GeonetContext
object this class retrieves was null. It didn't seem to be doing anything
with it anyway so I just wrapped it with a null value check to get me by.

            And it also threw a ClassNotFoundException trying to find
org.fao.geonet.services.resources.Download2 which is not part of the source
code.

            I have been trying to get Geonetwork to run under Tomcat with a
few problems. It seems that the Xalan libraries are required when running
under Tomcat but not under Jetty. I looked through all the libraries inside
Jetty but could not find any Xalan classes so I'm not sure where Jetty is
getting them from. I put the Xalan libraries in myself, but then got another
ClassNotFoundException which was looking for some Exception class that was
not part of the Xalan libraries. Sorry I can't remember the name of this
class. There are a lot of NullPointerExceptions being thrown from here:

            org.fao.geonet.guiservices.util.Env.exec(Env.java:53 and 55)

and

org.fao.geonet.guiservices.metadata.GetRandom.exec(GetRandom.java:82)

and

org.fao.geonet.guiservices.metadata.GetLatestUpdated.exec(GetLatestUpdated.j
ava:90)

These all seem to be the same thing, the GeonetContext object is not there.
This may actually explain all of these symptoms. As this object seems to be
used for everything, I assume that it would also be used to supply the list
of formats available.

--
Steven Smith <steven.smith@anonymised.com>
Software Developer / Analyst

Geometry Pty Ltd

Telephone

:

03 6223 1999

Facsimile

:

03 6223 1988

Web

:

www.geometryit.com
<file:///C:\Documents%20and%20Settings\ssmith.GEOMETRY\Application%20Data\Mi
crosoft\Signatures\www.geometryit.com>

Address

:

31 Salamanca Square, Battery Point, TAS 7004, Australia

Postal

:

PO Box 844, Sandy Bay, TAS 7006, Australia

Building Intelligent Business through the Power of Spatial

Hi Steven,

I have committed the stable code that will be GeoNetwork 2.1 alpha
next week. You got some problems because I had to commit some
stuff in order to simplify my work. Here are some notes:

            I have been playing with the latest source of Geonetwork
(retrieved on 5/10/2006) and have found a bug that was not present in the
last version I was using (also 2.1.0 alpha, but probably from a few weeks
ago). It seems like the formats are not being loaded since the drop down
list of formats on the XML Metadata Insert page contains nothing.

I have to investigate this because it seems to be a random bug.

            There was also a bug in the Harvester class which caused
Geonetwork to throw NullPointerExceptions every 2 seconds. The GeonetContext
object this class retrieves was null. It didn't seem to be doing anything
with it anyway so I just wrapped it with a null value check to get me by.

Fixed.

            And it also threw a ClassNotFoundException trying to find
org.fao.geonet.services.resources.Download2 which is not part of the source
code.

I know. It does not cause any problem (it is just a reminder for me).

            I have been trying to get Geonetwork to run under Tomcat with a
few problems. It seems that the Xalan libraries are required when running
under Tomcat but not under Jetty. I looked through all the libraries inside
Jetty but could not find any Xalan classes so I'm not sure where Jetty is
getting them from. I put the Xalan libraries in myself, but then got another
ClassNotFoundException which was looking for some Exception class that was
not part of the Xalan libraries. Sorry I can't remember the name of this
class.

The problem is that tomcat sets a system preference which changes the
default transformer. Geonetwork uses xalan provided in java 1.5 but changing
that preference, java is not able to find that anymore. You have to download
xalan and copy *both* xalan.jar and serializer.jar into the endorsed dir (or
'shared' I don't remember well).

There are a lot of NullPointerExceptions being thrown from here:

            org.fao.geonet.guiservices.util.Env.exec(Env.java:53 and 55)

and

org.fao.geonet.guiservices.metadata.GetRandom.exec(GetRandom.java:82)

and

org.fao.geonet.guiservices.metadata.GetLatestUpdated.exec(GetLatestUpdated.j
ava:90)

These all seem to be the same thing, the GeonetContext object is not there.
This may actually explain all of these symptoms. As this object seems to be
used for everything, I assume that it would also be used to supply the list
of formats available.

It was related to the partial commit and should be fixed now.

There are other small issue to address in order to have a good working system
and we hope to address them next week when we will release the 2.1 alpha.

Cheers,
Andrea