Jboss8 WildFly:EAR 部署 ClassNotFoundException
Jboss 8 WildFly: EAR Deployment ClassNotFoundException
我有耳朵
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 中,"thirth.war" 中的所有 Servlet 都会抛出错误:
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
在 WildFly 上将您的包定义为一个模块可以解决您的问题。包裹必须包含 com.wosocean.indexos.vc.servlet.IndexOsIntegracaoServlet
class。如果您对将模块添加到 WildFly 没有任何想法,您可以检查 JBoss Modules documentation.
我有耳朵
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 中,"thirth.war" 中的所有 Servlet 都会抛出错误:
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
在 WildFly 上将您的包定义为一个模块可以解决您的问题。包裹必须包含 com.wosocean.indexos.vc.servlet.IndexOsIntegracaoServlet
class。如果您对将模块添加到 WildFly 没有任何想法,您可以检查 JBoss Modules documentation.