On 1/18/06,
iksrazal <[EMAIL PROTECTED]> wrote:
Hi Inigo,
I also use Spring with Axis2, but in general I haven't trusted the aar
classloader due to some early problems around the .92 frame.
So I use a bare bones aar structure:
./META-INF
./META-INF/MANIFEST.MF
./META-INF/SWAWiseEndpoint.wsdl
./META-INF/services.xml
./com
./com/siemens
./com/siemens/swa
./com/siemens/swa/webservices
./com/siemens/swa/webservices/wisemobil
./com/siemens/swa/webservices/wisemobil/SWAWiseEndpointSkeleton.class
And put the rest of the classes - several hundred or so as its a big web app
and web services are only one part - into WEB-INF/classes . All the spring
etc jars go into WEB-INF/lib .
As far as spring goes, any bean dependencies in the skeleton are resolved with
an object factory. The rest of the beans, transactions for hibernate etc, get
loaded via web.xml, applicationContext.xml, serviceContext.xml etc as one
normally would do with Spring.
HTH,
iksrazal
http://www.braziloutsource.com/
Em Quarta 18 Janeiro 2006 12:55, o Inigo Surguy escreveu:
> Hi,
>
> I've deployed a .aar to Axis 2, and I'm trying to use Spring within it.
> However, when Spring tries to access it's applicationContext.xml file from
> the classpath, it doesn't work. When I try to access the classpath in my
> own code, using MyObject.class.getResource() or
> Thread.currentThread().getContextClassLoader().getResource(), I can't find
> the file either; and when I check the classloader roots of the current
> context classloader, it only shows Tomcat
> 5.5\webapps\axis2_094\WEB-INF\classes - and not the .aar itself.
>
> When I move my applicationContext.xml to the Axis WEB-INF/classes
> directory, then Spring can find it, which is consistent with the behaviour
> above. However, it then can't load any of my application classes -
> presumably because they're not on the classpath available to my
> application.
>
> I can presumably solve this by moving all of my code into the Axis
> WEB-INF/lib directory - but this defeats the point of having an .aar!
>
> What am I doing wrong, please? How can I get the contents of the .aar onto
> the classpath of classes within that .aar?
>
> (I'm running Axis 0.94 inside Tomcat 5.5.12 on Windows XP with JDK 1.5)
>
> Cheers
>
> Inigo
--
