geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From solprovi...@apache.org
Subject Re: JAR in Geronimo overrides JAR in WAR
Date Wed, 13 Jun 2007 21:15:44 GMT
AFAIK, the endorsed directory was Sun's way of stating these libraries
are based on external standards and may be overwritten because you
cannot blame any problems on Sun.  The org.xml.sax... classes are in
the Sun's rt.jar.  The upgraded classes must be in an endorsed
directory to replace rt.jar's classes.

The Cocoon WAR is built with all JARS in the WEB-INF/lib; the endorsed
libs are moved to the lib directory.
cocoon.war\WEB-INF\lib\xml-apis-1.3.04.jar was ignored.

I cannot find a method for a WAR to specify using the endorsed
directory.  This should be standard functionality.  Tomcat seems to
have deliberately excluded the WAR's endorsed directory when loading
classes:
http://tomcat.apache.org/tomcat-5.0-doc/class-loader-howto.html

The implementation would be easy so someone must have deliberately
decided that web apps would never need to control their endorsed
classes.

solprovider


On 6/13/07, David Jencks <david_jencks@yahoo.com> wrote:
>  From a quick look at what you say the problems you are experiencing
> are from cocoon requiring a more recent JAXP implementation than is
> in the geronimo 1.2-beta you are using.  AFAICT the jaxp
> implementation has to be installed in lib/endorsed and cannot be
> affected by any application classpaths or classloader settings (such
> as inverse-classloading).   I believe that in the geronimo 1.2 branch
> code and the 2.0 trunk code we have successfully navigated through
> various problems I can't discuss here that kept us at antique jaxp
> versions for a long time and include fairly up to date jaxp
> implementations and apis.  In any case you can certainly replace or
> install xml libraries in lib/endorsed to what you need.
>
> thanks
> david jencks
>
> On Jun 13, 2007, at 8:37 AM, solprovider@apache.org wrote:
>
> > [I started this as a response to David Jencks' 20070608 post about
> > classpaths for EARs, WARs, and JARs.]
> >
> > Please correct me if I misrepresent anything.  My understanding was
> > one of the primary benefits of J2EE was independent class loading.
> >
> > My application uses Cocoon with
> > org.apache.cocoon.components.modules.input.XMLFileModule configured in
> > cocoon.xconf.
> >
> > I created a Cocoon WAR using the ant build target.
> > Sometimes I deply the WAR to Geronimo.  Sometimes I create an EAR.  I
> > have not tested if the results differ depending on the format
> > deployed.
> >
> > I used Eclipse 3.2 to create an EAR project.
> > I used Eclipse 3.2 to Import the WAR with the "Add project to an
> > EAR" option.
> > The next screen states: "Select the web library jars from the list
> > below to be imported as web library projects.  Unselected web
> > libraries will be imported as jars in the WEB-INF/lib directory."
> > No libraries were selected so all libraries are imported to
> > cocoon.war\WEB-INF\lib.
> > I deployed the EAR on Geronimo.
> >
> > The Cocoon pipeline using XMLFileModule errors:
> > java.lang.NoSuchMethodError:
> > javax.xml.transform.dom.DOMResult.getNextSibling()Lorg/w3c/dom/Node;
> >
> > I solved this by copying Cocoon's lib/endorsed/xml-apis-1.3.04.jar to
> > Geronimo's lib/endorsed directory. (I planned to remove
> > xmlParserAPIs-2.6.2.jar but this proved unnecessary, probably because
> > xmlParserAPIs-2.6.2 is ancient.)
> >
> > Should the Cocoon WAR use the JARs in the WAR before the JARs in
> > Geronimo?
> >
> > solprovider
> > USING geronimo-tomcat-j2ee-1.2-beta
>
>

Mime
View raw message