本文介绍了无法在Glassfish 3中重新部署使用Axis的.WAR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个J2EE Web应用程序,它将Apache Axis SOAP客户端代理实例化为Spring bean。
当我将应用程序部署到Glassfish 3服务器中时间,它成功。但是,如果我取消部署和重新部署应用程序,则会收到以下错误(位于Spring堆栈跟踪的底部):
实例化豆失败了;嵌套异常是
org.springframework.beans.factory.BeanDefinitionStoreException:工厂方法
[com.foo.bar.FooServicePortType com.foo.bar.config.ApplicationConfig.backendService()]引发异常;
嵌套异常是java.lang.RuntimeException:
java.lang.IllegalStateException:WEB9031:WebappClassLoader无法加载资源
[META-INF / services / org.apache.axis.EngineConfigurationFactory],
,因为它尚未启动或已经停止
如果我重新启动域并重新部署,它再次成功。
任何想法为什么会发生这种情况?
这是由Axis库中的类加载器泄漏造成的。最简单的解决方法是将Axis jar部署到应用程序本身,而不是作为共享域库的一部分。
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?
解决方案
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.
这篇关于无法在Glassfish 3中重新部署使用Axis的.WAR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!