无法在Glassfish 3中重新部署使用Axis的.WAR

时间:2010-08-20 15:16:16

标签: java-ee glassfish war glassfish-3 axis

我有一个J2EE Web应用程序,它将Apache Axis SOAP客户端代理实例化为Spring bean。

当我第一次将应用程序部署到Glassfish 3服务器时,它会成功。但是,如果我取消部署并重新部署应用程序,我会收到以下错误(在Spring堆栈跟踪的底部):

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

如果我重新启动域并重新部署,它会再次成功。

为什么会发生这种情况?

1 个答案:

答案 0 :(得分:1)

这是由Axis库中的类加载器泄漏引起的。最简单的解决方法是将Axis jar部署到应用程序本身,而不是作为共享域库的一部分。

相关问题