[GeoNetwork-devel] Jetty exception at startup

Hi guys,

this is a fix to Z39.50 that may be usefull to you. I have already added it
to geonetwork.

Cheers,
Andrea

---------- Messaggio inoltrato ----------

Subject: Jetty exception at startup
Date: 00:15, sabato 22 luglio 2006
From: Roberto Giaccio <r.giaccio@anonymised.com>
To: Jeroen Ticheler <Jeroen.Ticheler@anonymised.com>
Cc: Andrea Carboni <a.carboni@anonymised.com>, Stefano Giaccio <sgiaccio@anonymised.com>

Ciao Jeroen,
this is how to stop jetty throwing at startup about the following
exception:

  ...
  Unable to locate collection directory service
  javax.naming.NotContextException: Services is not a subcontext
          at tyrex.naming.MemoryContext.internalLookup
(MemoryContext.java:341)
  ...

You have to:

1- put org.mortbay.jetty.plus.jar inside jetty/ext
2- put jndi.properties inside src
3- add a rule to build.xml to copy jndi.properties inside classes
when building

The explanation is that tyrex, used by the jzkit library, uses some
naming services that cannot be initialized since some properties are
not defined (the ones you find in jdni.properties); these properties
tells that the needed services are provided by the Java classes found
in org.mortbay.jetty.plus.jar.
This is a sub-product of the CIESIN work: weblogic complains about
the same undefined properties; the difference is that instead of just
throwing an exception, it stops the webapp startup. Also with
weblogic we had to set a different jndi.properties file referring to
the weblogic classes.
Enjoy,

        Roberto

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

(attachments)

jndi.properties (113 Bytes)
org.mortbay.jetty.plus.jar (55.5 KB)