There is a property that you need to set in your services.xml file if you are using spring. Do some searching and you should find what that property is.
Chad On 10/16/07, Kahler, Jason J (US SSA) <[EMAIL PROTECTED]> wrote: > > Thanks you for all your help. > > > > The 1 thing that still confuses me is this. > > I started loading my classes from a jar using spring as per the tutorial > online. > > It looks like my class is loading via spring. I have told spring to use > the Services Classloader. > > But the class I load via spring eventually throws a NoClassDefFoundError > due to org/dom4j/yada > > A dependency of a Hibernate configuration class. > > > ------------------------------ > > *From:* Chad DeBauch [mailto:[EMAIL PROTECTED] > *Sent:* Tuesday, October 16, 2007 10:52 AM > *To:* Kahler, Jason J (US SSA); [email protected] > *Subject:* Re: axis question revisited > > > > This is the biggest headache with Axis2. Typically the only time you have > to worry about the ClassLoader is when your classes need access to > resources. If your jars do this and don't provide methods for passing a > ClassLoader or don't provide a way to pass the resource, then you are forced > to put that jar in the WEB-INF/lib directory. > > Chad > > On 10/16/07, *Kahler, Jason J (US SSA)* <[EMAIL PROTECTED]> > wrote: > > Thanks Chad. > > > > I would prefer to have my services entirely contained in the aar file. > > The problem is that my service Impl is in jar A and uses jar B. > > The code in jar B knows nothing about MessageContext or the Web Service > for that matter. > > So if I load the top level class from jar B using > MessageContext.getCurrentMessageContext > ().getAxisService().getClassLoader(); > > Will all the subsequently loaded classes be able to grab everything they > need form the aar file ? > > > > Sorry I am so dense, but these issues are new to me. > > > > Thanks; > > Jay > > > ------------------------------ > > *From:* Chad DeBauch [mailto:[EMAIL PROTECTED] > *Sent:* Monday, October 15, 2007 9:48 PM > *To:* Kahler, Jason J (US SSA); [email protected] > *Subject:* Re: axis question revisited > > > > The easiest way I have found to get past this issue temporarily, or if you > don't care about having your web services be modular, you can dump your jars > in the WEB-INF/lib directory. This way you don't have to worry about the > ClassLoader. If you don't want to take that approach here is how you get > the ClassLoader from the aar: > > MessageContext.getCurrentMessageContext > ().getAxisService().getClassLoader(); > > Depending on what application server you are deploying your app to, the > app server may load jars before they load the ones in your app, causing > ClassNotFound or MethodNotFound Excpetions. > > Chad > > On 10/15/07, *Kahler, Jason J (US SSA)* <[EMAIL PROTECTED]> > wrote: > > Can you give an example ? > > > > > > The jars in your lib aar directory will be loaded in a separate > classloader. So you must reference those classes using that classloader. > You can do this by getting the MessageContext. > > Chad > > On 10/12/07, *Kahler, Jason J (US SSA)* <[EMAIL PROTECTED]> > wrote: > > I am building my aar using the maven2 pluggin. Everything builds but when > I deploy I get NoClassDefFound > ERRORS all over. This was working as a war in tomcat using axis 1. All the > required jars are in > > > > myArr.arr/lib what could be wrong ? > > > > Jay > > > > > > >
