我无法在jboss中部署我的战争。尝试使用struts2标签来在JSP文件中使用。但不能部署.....我已经添加struts2-core-2.3.15.3.jar到我的构建路径(日食)。这应该是我需要的一切权利?有一件事,我不确定是否它的问题,我是否正在使用与struts2一起重写过滤器,不知道这是否会造成冲突。我的struts.xml
位于我的WEB-INF目录中。Struts2标签NoClassDefFound NestedMessagesPresentTag
的web.xml
<display-name>Caterpillar MMS China Gateway</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
<init-param>
<param-name>confPath</param-name>
<param-value>/WEB-INF/urlrewrite.xml</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<!-- <dispatcher>FORWARD</dispatcher> -->
</filter-mapping>
struts.xml的
<struts>
<constant name="struts.enable.DynamicMethodInvocation"
value="false" />
<constant name="struts.devMode" value="false" />
<constant name="struts.custom.i18n.resources"
value="ApplicationResources" />
<package name="default" extends="struts-default" namespace="/">
<action name="login" method="authenticate"
class="action.LoginAction">
<result name="success">Listing.jsp</result>
<result name="error">Login.jsp</result>
</action>
</package>
</struts>
堆栈跟踪
19:29:09,101 ERROR [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015863: Replacement of deployment "XXXXX.war" by deployment "XXXXX.war" was rolled back wi
th the following failure message:
{"JBAS014671: Failed services" => {"jboss.deployment.unit.\"XXXXX.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"XXXXX.
war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"XXXXX.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: ava.lang.ClassNotFoundException: org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag from [Module \"de
ployment.XXXXX.war:main\" from Service Module Loader]
Caused by: java.lang.ClassNotFoundException: org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag from [Module \"deployment.XXXXX.war:main\" from Service Module Loader
]"}}
19:29:09,753 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-9) MSC000001: Failed to start service jboss.deployment.unit."XXXXX.war".POST_MODULE: org.jboss.msc.service.Star
tException in service jboss.deployment.unit."XXXXX.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "XXXXX.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.ClassNotFoundException: org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag from [Module "deploym
ent.XXXXX.war:main" from Service Module Loader]
at org.jboss.as.jaxrs.deployment.JaxrsComponentDeployer.deploy(JaxrsComponentDeployer.java:79)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
... 5 more
Caused by: java.lang.ClassNotFoundException: org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag from [Module "deployment.XXXXX.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:196) [jboss-modules.jar:1.2.0.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1]
at org.jboss.as.jaxrs.deployment.JaxrsComponentDeployer.deploy(JaxrsComponentDeployer.java:77)
... 6 more
19:29:09,769 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.naming.context.java.module.XXXXX.XXXXX (missing) dependents: [service jboss.naming.context.java.module.XXXXX.XXXXX.Vali
dator, service jboss.naming.context.java.module.XXXXX.XXXXX.ValidatorFactory]
JBAS014777: Services which failed to start: service jboss.deployment.unit."XXXXX.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."Cate
rpillarMMSChina.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "XXXXX.war"
19:29:09,780 INFO [org.jboss.as.controller] (MSC service thread 1-14) JBAS014774: Service status report
JBAS014776: Newly corrected services:
service jboss.naming.context.java.module.XXXXX.XXXXX (no longer required)
19:40:15,201 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment XXXXX.war (runtime-name: XXXXX.war) in 64ms
19:40:15,233 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018558: Undeployed "XXXXX.war" (runtime-name: "XXXXX.war")
19:43:45,313 INFO [org.jboss.as.server.deployment] (MSC service thread 1-15) JBAS015876: Starting deployment of "XXXXX.war" (runtime-name: "XXXXX.war")
19:43:46,170 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.deployment.unit."XXXXX.war".POST_MODULE: org.jboss.msc.service.Star
tException in service jboss.deployment.unit."XXXXX.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "XXXXX.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.ClassNotFoundException: org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag from [Module "deploym
ent.XXXXX.war:main" from Service Module Loader]
at org.jboss.as.jaxrs.deployment.JaxrsComponentDeployer.deploy(JaxrsComponentDeployer.java:79)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
... 5 more
Caused by: java.lang.ClassNotFoundException: org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag from [Module "deployment.XXXXX.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:196) [jboss-modules.jar:1.2.0.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1]
at org.jboss.as.jaxrs.deployment.JaxrsComponentDeployer.deploy(JaxrsComponentDeployer.java:77)
... 6 more
19:43:46,195 ERROR [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "XXXXX.war" was rolled back with the following failure message:
{"JBAS014671: Failed services" => {"jboss.deployment.unit.\"XXXXX.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"XXXXX.
war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"XXXXX.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.ClassNotFoundException: org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag from [Module \"de
ployment.XXXXX.war:main\" from Service Module Loader]
Caused by: java.lang.ClassNotFoundException: org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag from [Module \"deployment.XXXXX.war:main\" from Service Module Loader
]"}}
19:43:46,259 INFO [org.jboss.as.server.deployment] (MSC service thread 1-13) JBAS015877: Stopped deployment XXXXX.war (runtime-name: XXXXX.war) in 64ms
20:02:06,752 INFO [org.jboss.as.server.deployment] (MSC service thread 1-10) JBAS015876: Starting deployment of "XXXXX.war" (runtime-name: "XXXXX.war")
20:02:07,430 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."XXXXX.war".POST_MODULE: org.jboss.msc.service.Star
tException in service jboss.deployment.unit."XXXXX.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "XXXXX.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.ClassNotFoundException: org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag from [Module "deploym
ent.XXXXX.war:main" from Service Module Loader]
at org.jboss.as.jaxrs.deployment.JaxrsComponentDeployer.deploy(JaxrsComponentDeployer.java:79)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
... 5 more
Caused by: java.lang.ClassNotFoundException: org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag from [Module "deployment.XXXXX.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:196) [jboss-modules.jar:1.2.0.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1]
at org.jboss.as.jaxrs.deployment.JaxrsComponentDeployer.deploy(JaxrsComponentDeployer.java:77)
... 6 more
20:02:07,456 ERROR [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "XXXXX.war" was rolled back with the following failure message:
{"JBAS014671: Failed services" => {"jboss.deployment.unit.\"XXXXX.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"XXXXX.
war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"XXXXX.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.ClassNotFoundException: org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag from [Module \"de
ployment.XXXXX.war:main\" from Service Module Loader]
Caused by: java.lang.ClassNotFoundException: org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag from [Module \"deployment.XXXXX.war:main\" from Service Module Loader
]"}}
20:02:07,538 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment XXXXX.war (runtime-name: XXXXX.war) in 82ms
谢谢。我现在看到这个错误“元素类型'action'的内容必须匹配(param | result | interceptor-ref | exception-mapping)。这真的令人沮丧,因为我无法解决错误09:17:57,121错误[ com.opensymphony.xwork2.util.DomHelper] VFS:/ C:/jboss-eap-6.1/bin/content/XXXXX.war/WEB-INF/classes/struts.xml; LINENUMBER:22;得到columnnumber:18;内容 – user2084840
这是另一个问题。“(例外映射PARAM |结果| |拦截-REF)*”,但你更接近最终检查你写什么标签内的支柱元素类型的“动作”必须匹配。 .xml,在第22行。如果这个答案对你有帮助,请将其标记为已接受。 –
我已经验证过该标签没有语法问题。这真的令人沮丧,因为互联网上没有任何与之相关的错误 – user2084840