Jboss 8 WildFly:EAR部署ClassNotFoundException

时间:2015-12-23 12:59:13

标签: deployment wildfly wildfly-8 ear

我有一个EAR

EAR
 |-web (many wars)
 |-ejbs (many ejbs.jar)
 |-libs (one million lib jars)
 \-thirthapp
     |-web
     |  |-thirth.war
     |-ejb (some ejb.jar)
     \-libs (some specifics libs)

这项工作在JBoss 4.05中,但在WildFly 8版本中没有。在WildFly中,所有的Servlet都在" thirth.war"抛出错误:

09:45:53,426 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./indexos.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./indexos.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: com.wosocean.indexos.vc.servlet.IndexOsIntegracaoServlet from [Module "deployment.wosoceanw_3.11.0b167.ear.IndexOS.web.tim-indexos.war:main" from Service Module Loader]
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:933)
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:256)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_65]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_65]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_65]
Caused by: java.lang.ClassNotFoundException: com.wosocean.indexos.vc.servlet.IndexOsIntegracaoServlet from [Module "deployment.wosoceanw_3.11.0b167.ear.IndexOS.web.tim-indexos.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:651)
    ... 6 more

1 个答案:

答案 0 :(得分:1)

将您的包定义为WildFly上的模块可以解决您的问题。包必须包含com.wosocean.indexos.vc.servlet.IndexOsIntegracaoServlet类。如果您对将模块添加到WildFly中没有任何想法,可以检查JBoss Modules documentation