Hi there !

I'm facing a deployment problem with Axis 1.4 on Tomcat 5.5.26 (using Sun jvm 
1.5.0_10).

I have a webapp that uses Axis.
No problem so far, I just put the Axis jars and dependencies into WEB-INF/lib/ 
and everything works fine.

To secure the access to this webapp (and others on the same Tomcat instance), I 
use a component (set of jars) that is installed in
shared/lib/ in order to be shared amongst all the webapps (this provides an 
instant SSO).
This component implements a Filter that is defined in the web.xml of all our 
protected webapps.
Still nothing unusual here.

The problem is that the security component (a.k.a. security agent) also uses 
Axis (same version). So it needs the Axis jar and dependencies
in shared/lib/.
Doing so, nothing works anymore as I have the following exception when the 
security agent tries to connect to the security infrastructure with Axis :
java.lang.NullPointerException
        at 
org.apache.axis.client.Service.getEngineConfiguration(Service.java:813)
        at org.apache.axis.client.Service.getAxisClient(Service.java:104)
        at org.apache.axis.client.Service.<init>(Service.java:113)
        <subsequent calls are from the agent>

If I remove the Axis jar and dependencies from the webapp (i.e. Axis is 
installed in shared/lib/ only), it works well until I try to reload the webapp.
Each time I try to use Axis from the webapp, I get the following exception :
java.lang.NullPointerException
        at 
org.apache.catalina.loader.WebappClassLoader.findResources(WebappClassLoader.java:973)
        at java.lang.ClassLoader.getResources(ClassLoader.java:1015)
        at 
org.apache.commons.discovery.jdk.JDK12Hooks.getResources(JDK12Hooks.java:150)
        at 
org.apache.commons.discovery.resource.DiscoverResources$1.getNextResources(DiscoverResources.java:153)
        at 
org.apache.commons.discovery.resource.DiscoverResources$1.getNextResource(DiscoverResources.java:129)
        at 
org.apache.commons.discovery.resource.DiscoverResources$1.hasNext(DiscoverResources.java:116)
        at 
org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassNames(DiscoverNamesInFile.java:186)
        at 
org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassName(DiscoverNamesInFile.java:170)
        at 
org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.hasNext(DiscoverNamesInFile.java:157)
        at 
org.apache.commons.discovery.resource.names.NameDiscoverers$1.getNextIterator(NameDiscoverers.java:143)
        at 
org.apache.commons.discovery.resource.names.NameDiscoverers$1.hasNext(NameDiscoverers.java:126)
        at 
org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.getNextResource(ResourceClassDiscoverImpl.java:159)
        at 
org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.hasNext(ResourceClassDiscoverImpl.java:147)
        at 
org.apache.axis.configuration.EngineConfigurationFactoryFinder$1.run(EngineConfigurationFactoryFinder.java:120)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:113)
        at 
org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:160)
        at 
org.apache.axis.client.Service.getEngineConfiguration(Service.java:813)
        at org.apache.axis.client.Service.getAxisClient(Service.java:104)
        at org.apache.axis.client.Service.<init>(Service.java:113)
        <subsequent calls are from the webapp>
Restarting Tomcat after each update makes it work again, but it's not very 
practical.

This seems to be a ClassLoader issue, but I don't know enough to fix that by 
myself.

So my question is : is there a clean way to deploy this ? And if so, what is it 
?

Thanks in advance.
-- 
Olivier SERVE
Bull, Architect of an Open World TM
http://www.bull.com

Reply via email to