如何在WildFly 8中调试“无法启动服务”?

时间:2016-04-12 13:17:03

标签: java struts2 wildfly

2016-04-12 12:32:04,399 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 62) HHH000230: Schema export complete
2016-04-12 12:32:04,753 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.BanqueEE.ear.BanqueEEWeb.war:main" from Service Module Loader]
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:870)
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:242)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_66]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_66]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_66]
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.BanqueEE.ear.BanqueEEWeb.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final]
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.addListener(UndertowDeploymentInfoService.java:1145)
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:734)
    ... 6 more

2016-04-12 12:32:05,109 INFO  [org.jboss.weld.Bootstrap] (weld-worker-4) WELD-000119: Not generating any bean definitions from org.apache.struts2.tiles.StrutsTilesListener because of underlying class loading error: Type org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.BanqueEE.ear.BanqueEEWeb.war:main" from Service Module Loader] not found.  If this is unexpected, enable DEBUG logging to see the full error.
2016-04-12 12:32:07,323 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "BanqueEE.ear")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module \"deployment.BanqueEE.ear.BanqueEEWeb.war:main\" from Service Module Loader]
    Caused by: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module \"deployment.BanqueEE.ear.BanqueEEWeb.war:main\" from Service Module Loader]"}}
2016-04-12 12:32:07,408 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) JBAS018559: Deployed "BanqueEE.ear" (runtime-name : "BanqueEE.ear")
2016-04-12 12:32:07,410 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.BanqueEE.ear.BanqueEEWeb.war:main" from Service Module Loader]

2 个答案:

答案 0 :(得分:2)

您错过了一个库struts2-tiles-plugin-x.x.x.x.jar,可能还有它们的依赖项。

您需要将这些库添加到部署程序集中。它将帮助您归档ear项目并包含在其类路径中具有等效清单设置的依赖项。

如果您想知道什么是部署程序集,可以阅读本文Eclipse : Java EE Module Dependencies is replaced by Web Deployment Assembly

  

“Web部署程序集”,它提供了更强大,更灵活的方法来配置项目打包结构。

     

enter image description here

还有一个页面描述了将外部资源与耳朵应用程序相关联的过程:Web Application Development: Configuring Projects with External Resources

答案 1 :(得分:0)

你的战争中有一些javaee api jar吗?也许是servlet.jar?请删除它,然后检查。