This document is a good overview of classloaders in Orion. http://kb.atlassian.com/content/atlassian/howto/classloaders.jsp
What Alex says is basically correct - for classes that need to be accessed by your EJBs - either package them in the same jar, or use manifest classloading. You can optionally use a <lib> include, but that is not portable across application servers. Cheers, Scott Alex Paransky wrote: > Roxanne: > > > > I am not quite sure that this was the correct solution. Ideally, you > should not have to configure ANY path's in your orion-application.xml > file. The .ear is capable of configuring any dependency you wish. > > > > In general, if you have classes which are used only by your EJB's you > have 2 options: > > 1. Package them into the same .JAR file as your EJBs > > 2. Package them into a separate file and use the classpath in the > manifest for your EJB.jar > > > > To understand why you are having a problem, you need to read a little > about how classloaders are used and what is their hierarchy. (Honestly, > I don't remember where I found this information). > > > > At the base of it all is the system classloader. This is the one which > uses CLASSPATH environment to identify location of classes. On top of > it is your EJB-ClassLoader for a particular application. On top of the > EJB-class loader is a WEB-ClassLoader for every web application you deploy. > > > > Thus if you put something into WEB-INF/lib your EJB-ClassLoader will not > be able to find it. This is why you are getting this error. > > > > Re-evaluate your packaging scheme to avoid ANY <library path > configuration settings in orion-application.xml I have developed an > application which uses .EAR with a number of .WAR's and a number of EJB > .JARs without having to configure any additional paths. This really > makes deployment easy. > > > > -AP_ > http://www.alexparansky.com <http://www.alexparansky.com/> > Java/J2EE Architect/Consultant > http://www.myprofiles.com/member/view.do?profileId=127 > > -----Original Message----- > *From:* [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]*On Behalf Of *Roxanne > Tapia > *Sent:* Thursday, April 04, 2002 7:49 AM > *To:* Orion-Interest > *Subject:* Re: classpath problem with ear file > > Thanks! That worked > > A further note - for anyone who has the same sort of problem, here's > what I did; > > I changed the orion-application.xml file to say: > <library path="WebModule/WEB-INF/lib/" /> > > the path is relative to the .ear file, it took me a while to figure > that out. I was trying to set the path from the j2ee/home > directory. I just didn't get it. > > Thanks again! > Roxanne > > > > Thomas K�rner wrote: > >>Hi, >> >>it is possible to set a library path in the orion-application.xml, which is >>only valid in application. Use the following tag and place your jar-files >>into the directory the path points towards. >> >><library path="./lib/" /> >> >>Ciao TK >>----- Original Message ----- >>From: "Roxanne Tapia" <[EMAIL PROTECTED]> >>To: "Orion-Interest" <[EMAIL PROTECTED]> >>Sent: Wednesday, April 03, 2002 7:38 PM >>Subject: classpath problem with ear file >> >> >>>I am deploying an ear file, which contains a war file. The war file has >>>a jar in the WEB-INF/lib directory. >>> >>>However, when I start the server, and it is deploying the ejb jars in >>>the same application - it says it can't find the classes in that jar file. >>> >>>I saw this once before when some ancestor classes weren't found. My >>>solution for that was to include those classes in each of the jar files. >>> But in that case, there were only a couple of classes. >>> >>>Is there some sort of initialization step that doesn't include the jars >>>in the web-inf/lib directory for the J2EE application? Where do I put >>>these jars? I can't put them in j2ee/home/lib, becasuse they could be >>>different between j2ee apps. >>> >>>Thanks for your help, >>>Roxanne >>> >>> >>> >> >> >> > > -- > > =============================== > Roxanne Tapia > Bioscience Division (B-1) > Los Alamos National Laboratory > 505-665-0206 > =============================== > > -- Scott Farquhar :: [EMAIL PROTECTED] Atlassian :: http://www.atlassian.com Supporting YOUR J2EE World
