我正在将我的Monolith Web服务转换为一个微服务,它位于一个用尽Docker的容器中(目前运行1.12.3)。应用程序服务器是:jboss-eap7:2.2.0-1.6.9。
我最初创建了一个准确的REST api,它几乎没有代码,只是一个hello world。 但是在将一些CDI组件添加到我的应用程序后,我总是得到这个例外...
21:40:57,240 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.subunit."wackyEAR-1.0.0-SNAPSHOT.ear"."wacky.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."wackyEAR-1.0.0-SNAPSHOT.ear"."wacky.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of subdeployment "wacky.war" of deployment "wackyEAR-1.0.0-SNAPSHOT.ear"
还有更多:
21:40:57,245 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "wackyEAR-1.0.0-SNAPSHOT.ear")]) - failure description: {
user-api_1 | "WFLYCTL0080: Failed services" => {"jboss.deployment.subunit.\"wackyEAR-1.0.0-SNAPSHOT.ear\".\"wacky.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"wackyEAR-1.0.0-SNAPSHOT.ear\".\"wacky.war\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of subdeployment \"upload-api-talon.war\" of deployment \"wackyEAR-1.0.0-SNAPSHOT.ear\"
如何打包我的应用程序以便启用CDI?
现在我的应用程序是包
- wackyEAR --wackyWAR --lib --wackyEJB1(CDI EJB应用程序) --meta-INF --beans.xml --wackyEJB2。 (CDI EJB应用程序) META-INF --beans.xml
我的想法已经用完了?
以下是完整日志:
23:13:03,533 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.subunit."appEAR-1.0.0-SNAPSHOT.ear"."app.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."appEAR-1.0.0-SNAPSHOT.ear"."app.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of subdeployment "app.war" of deployment "app.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassFormatError: Failed to link javax/faces/webapp/FacetTag (Module "deployment.appEAR-1.0.0-SNAPSHOT.ear.app.war:main" from Service Module Loader): Absent Code attribute in method that is not native or abstract in class file javax/faces/webapp/FacetTag
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:446)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:274)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:78)
at org.jboss.modules.Module.loadModuleClass(Module.java:605)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:21)
at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:14)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:84)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
... 5 more
23:13:03,538 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "appEAR-1.0.0-SNAPSHOT.ear")]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.deployment.subunit.\"appEAR-1.0.0-SNAPSHOT.ear\".\"app.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"appEAR-1.0.0-SNAPSHOT.ear\".\"app.war\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of subdeployment \"upload-api-talon.war\" of deployment \"upload-api-talonEAR-1.0.0-SNAPSHOT.ear\"
Caused by: java.lang.ClassFormatError: Failed to link javax/faces/webapp/FacetTag (Module \"deployment.appEAR-1.0.0-SNAPSHOT.ear.app.war:main\" from Service Module Loader): Absent Code attribute in method that is not native or abstract in class file javax/faces/webapp/FacetTag"},
"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"appEAR-1.0.0-SNAPSHOT.ear\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"appEAR-1.0.0-SNAPSHOT.ear\".beanmanager]"]
}
23:13:03,559 INFO [org.jboss.as.server] (ServerService Thread Pool -- 26) WFLYSRV0010: Deployed "appEAR-1.0.0-SNAPSHOT.ear" (runtime-name : "appEAR-1.0.0-SNAPSHOT.ear")
23:13:03,560 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0184: New missing/unsatisfied dependencies:
service jboss.deployment.unit."appEAR-1.0.0-SNAPSHOT.ear".beanmanager (missing) dependents: [service jboss.deployment.unit."appEAR-1.0.0-SNAPSHOT.ear".weld.weldClassIntrospector]
WFLYCTL0186: Services which failed to start: service jboss.deployment.subunit."appEAR-1.0.0-SNAPSHOT.ear"."app.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."appEAR-1.0.0-SNAPSHOT.ear"."app.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of subdeployment "app.war" of deployment "appEAR-1.0.0-SNAPSHOT.ear"