由于以下错误,我无法在Glassfish v2.1.1中部署EAR:
PWC1270: Exception starting filter struts2
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork
has already been loaded by bean - jar:file:/C:/Programs/Sun/glassfish_2-1-1/domains
/domain272/applications/j2ee-apps/JabEAR/JabWeb_war/WEB-INF/lib/struts2-core-2.2.3.jar!
/struts-default.xml:29:72 - bean - jar:file:/C:/Programs/Sun/glassfish_2-1-1/domains
/domain272/applications/j2ee-apps/JabEAR/JabWeb_war/WEB-INF/lib/struts2-core-2.2.3.jar!
/struts-default.xml:29:72
耳朵的Web应用程序部分实际上是基于Struts 2.2.3构建的。
我检查了EAR文件,但找不到任何jar重复。我检查了glassfish域lib文件夹,glassfish通用lib文件夹,JDK认可的lib文件夹,struts2-core-2.2.3.jar不存在 怎么可以加载那个罐子?
下面的完整堆栈跟踪:
[#|2012-03-22T16:19:36.047+0100|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=106;_ThreadName=Timer-13;_RequestID=56a43177-04f1-4cbd-9fe4-88459309fa0c;|WebModule[/JabWeb]PWC1270: Exception starting filter struts2
Unable to load configuration. - bean - jar:file:/C:/Programs/Sun/glassfish_2-1-1/domains/domain272/applications/j2ee-apps/JabEAR/JabWeb_war/WEB-INF/lib/struts2-core-2.2.3.jar!/struts-default.xml:29:72
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:437)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:195)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:273)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:385)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:119)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4521)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5369)
at com.sun.enterprise.web.WebModule.start(WebModule.java:345)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:986)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:970)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:704)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1649)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1254)
at com.sun.enterprise.web.WebContainer.loadJ2EEApplicationWebModules(WebContainer.java:1177)
at com.sun.enterprise.server.TomcatApplicationLoader.doLoad(TomcatApplicationLoader.java:141)
at com.sun.enterprise.server.ExtendedApplicationLoader.doLoad(ExtendedApplicationLoader.java:134)
at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:240)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:336)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:210)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:645)
at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:959)
at com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:943)
at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:467)
at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182)
at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:231)
at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:280)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:298)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:584)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:390)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:373)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:170)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:583)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:564)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:495)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:270)
at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: Unable to load configuration. - bean - jar:file:/C:/Programs/Sun/glassfish_2-1-1/domains/domain272/applications/j2ee-apps/JabEAR/JabWeb_war/WEB-INF/lib/struts2-core-2.2.3.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:380)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:424)
... 55 more
Caused by: Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/C:/Programs/Sun/glassfish_2-1-1/domains/domain272/applications/j2ee-apps/JabEAR/JabWeb_war/WEB-INF/lib/struts2-core-2.2.3.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:232)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:180)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
... 57 more
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already been loaded by bean - jar:file:/C:/Programs/Sun/glassfish_2-1-1/domains/domain272/applications/j2ee-apps/JabEAR/JabWeb_war/WEB-INF/lib/struts2-core-2.2.3.jar!/struts-default.xml:29:72 - bean - jar:file:/C:/Programs/Sun/glassfish_2-1-1/domains/domain272/applications/j2ee-apps/JabEAR/JabWeb_war/WEB-INF/lib/struts2-core-2.2.3.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)
... 60 more
|#]
[#|2012-03-22T16:19:36.047+0100|SEVERE|sun-appserver2.1|org.apache.catalina.core.StandardContext|_ThreadID=106;_ThreadName=Timer-13;_RequestID=56a43177-04f1-4cbd-9fe4-88459309fa0c;|PWC1306: Startup of context /JabWeb failed due to previous errors|#]