geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Zink <jochenl...@web.de>
Subject Re: Classloader/Classpath Problems with Webapp and EJB-jar in same EAR.
Date Wed, 16 May 2007 06:34:12 GMT
Sorry for the missing informations.

I'm working with geronimo 1.1.1


My problem is solved ... "... the ejb classloaded is a parent of the war-classloaded..." this
was
the important information :)

Thanks al lot!


> -----Urspr√ľngliche Nachricht-----
> Von: user@geronimo.apache.org
> Gesendet: 15.05.07 20:12:19
> An: user@geronimo.apache.org
> Betreff: Re: Classloader/Classpath Problems with Webapp and EJB-jar in same EAR.


> 
> 
> On May 15, 2007, at 7:55 AM, Jochen Zink wrote:
> 
> > Hello all,
> >
> > I have an EAR Archive. The archive contains a WAR-File (WebApp.war)  
> > and a JAR File (ejb.jar). The JAR contains a MessageDrivenBean. In  
> > a lib folder inside the ear are some JAR-Libs. Some of these libs  
> > are used from the webapp and some from the MDB.
> >
> > My Problem is:
> > Both, the war and the ejb jar Archive have a MANIFEST.MF in the  
> > META-INF Directory. In that manifest the class-path attribute is  
> > set to some libs in the lib folder inside the ear. This works fine  
> > if I does not place ejb.jar in the ear and the war archive is the  
> > only one inside the ear. But if both archives are inside the ear  
> > some strange errors happens. While deploying the Webapp, geronimo  
> > does not find the libs which are placed in lib folder of the ear  
> > (NoClassDefFound). Whithout the ejb.jar, the Webapplication is  
> > loaded correctly. If I define exactly the same class-path attribute  
> > in manifest.mf of the ejb-jar, the webapplication starts correctly.  
> > So, it seems that the ejb.jar manipulate the classpath of the  
> > webapplication.
> >
> > With two Webapplications inside the same ear, everythink works  
> > fine. The problem raised only with WAR nad EJB-Jar archives.
> >
> > Has anyone an idea why this happen?
> 
> Please always supply complete information on which version of  
> geronimo you are using.  We occasionally have fixed bugs :-)
> 
> NoClassDefFound usually means the class is in an unexpected  
> classloader, not that it isn't there at all.  What is the exact  
> error?  Do any classes in the lib jars load classes from the war?
> 
> The ejb jars' classloader is going to be a parent of the war  
> classloader, so if you remove the manifest classpath entries from the  
> war that are also present in the ejb jars manifest classpath the lib  
> classes should be available to both the ejbs and the web layer, both  
> loaded in the same classloader.
> 
> Hope this helps
> thanks
> david jencks
> 
> >
> > Thanaks a lot!
> >
> > structure:
> > ear:
> > |-- lib/
> >       |--jarFileA.jar
> >       |--jarFileB.jar
> > |-- META-INF/
> >       |--application.xml
> >       |--geronimo-application.xml
> > |-- WebApp.war
> >       |-- WEB-INF/
> >               |--- // Some webapp stuff
> >       |-- META-INF/
> >               |-- web.xml
> >               |-- geronimo-web.xml
> >               |-- MANIFEST.MF
> > |-- ejb.jar
> >       |-- META-INF
> >               |-- ejb-jar.xml
> >               |-- openejb-jar.xml
> >               |-- MANIFEST.MF
> >
> > _____________________________________________________________________
> > Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> > http://smartsurfer.web.de/?mc=100071&distributionid=000000000066
> >
> 
> 


_________________________________________________________________________
In 5 Schritten zur eigenen Homepage. Jetzt Domain sichern und gestalten! 
Nur 3,99 EUR/Monat! http://www.maildomain.web.de/?mc=021114


Mime
View raw message