我将Resteasy网络服务从JBoss 5.1迁移到Wildfly 8时遇到错误。
15:09:55,411 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./bpcWebServices: org.jboss.msc.service.StartException in service jboss.undertow.deployme
nt.default-server.default-host./bpcWebServices: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_25]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_25]
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate InjectorFactory implementation.
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:222)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)
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]
... 3 more
Caused by: java.lang.RuntimeException: Unable to instantiate InjectorFactory implementation.
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:156)
at org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap.contextInitialized(ResteasyBootstrap.java:28)
at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:193)
... 7 more
Caused by: java.lang.RuntimeException: Unable to lookup BeanManager.
at org.jboss.resteasy.cdi.CdiInjectorFactory.lookupBeanManager(CdiInjectorFactory.java:165)
at org.jboss.resteasy.cdi.CdiInjectorFactory.<init>(CdiInjectorFactory.java:43)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_25]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) [rt.jar:1.8.0_25]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) [rt.jar:1.8.0_25]
at java.lang.reflect.Constructor.newInstance(Unknown Source) [rt.jar:1.8.0_25]
at java.lang.Class.newInstance(Unknown Source) [rt.jar:1.8.0_25]
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:148)
... 10 more
15:09:55,420 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "bpcWebServices.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.
undertow.deployment.default-server.default-host./bpcWebServices" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./bpcWebServices: Failed to start service
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate InjectorFactory implementation.
Caused by: java.lang.RuntimeException: Unable to instantiate InjectorFactory implementation.
Caused by: java.lang.RuntimeException: Unable to lookup BeanManager."}}
答案 0 :(得分:0)
我解决了这个问题,因为Wildfly 8.2中提供的resteasy JAR没有被添加到webinf / lib文件夹,同时创建了一个部署WAR。
这个问题现已解决,但现在我面临另一个问题。 WAR outside the EAR, not able to reference JAR inside EAR. In wildfly 8