views:

19

answers:

1

I have a J2EE web application that instantiates an Apache Axis SOAP client proxy as a Spring bean.

When I deploy the application into a Glassfish 3 server for the first time, it succeeds. However, if I undeploy and redeploy the application, I get the following error (at the bottom of the Spring stacktrace):

Instantiation of bean failed; nested exception is 
org.springframework.beans.factory.BeanDefinitionStoreException: Factory method
[com.foo.bar.FooServicePortType com.foo.bar.config.ApplicationConfig.backendService()] threw exception;
nested exception is java.lang.RuntimeException: 
java.lang.IllegalStateException: WEB9031: WebappClassLoader unable to load resource
[META-INF/services/org.apache.axis.EngineConfigurationFactory],
because it has not yet been started, or was already stopped

If I restart the domain and redeploy, it succeeds again.

Any ideas why this is happening?

A: 

This was caused by a classloader leak in the Axis library. The easiest fix is to deploy the Axis jars into the application itself and not as part of the shared domain libraries.

Jacob