[Geonetwork-devel] Jetty exception at startup

FYI

Begin forwarded message:

From: Roberto Giaccio <r.giaccio@…2…>
Date: July 22, 2006 12:15:25 AM GMT+02:00
To: Jeroen Ticheler <Jeroen.Ticheler@…1…>
Cc: Andrea Carboni <a.carboni@…2…>, Stefano Giaccio <sgiaccio@…124…>
Subject: Jetty exception at startup

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)