在JBOSS EAP 7.0.5上部署war文件失败。无法加载带注释的类:

时间:2017-08-17 20:25:57

标签: jsf deployment jboss

我正在将JBF EAP 6.4中的JSF应用程序迁移到JBOSS EAP 7.0.5。我使用JBOSS控制台进行部署。部署应用程序失败,并出现以下错误:

Unexpected HTTP response: 500 Request { "operation" => "add", "address" => [ ("server-group" => "<INSTANCE_NAME>"), 
("deployment" => "<APPNAME>.war") ], "runtime-name" => "<APPNAME>", "enabled" => true } 
Response Internal Server Error { "outcome" => "failed", "result" => undefined, "failure-description" => {"WFLYDC0074:
 Operation failed or was rolled back on all servers. Server failures:" => {"server-group" => {"<INSTANCE_NAME>" => 
 {"host" => {"WUWVC0ASDOF01" => {"<INSTANCE_NAME>" => {"WFLYCTL0080: Failed services" => 
 {"jboss.deployment.unit.<APPNAME>.INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.<APPNAME>.INSTALL: 
 WFLYSRV0153: Failed to process phase INSTALL of deployment \"<APPNAME>\" 
 Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYJSF0008: 
 Failed to load annotated class: com.access.mbean.MyManagedBean"}}}}}}}}, "rolled-back" => true, "server-groups" => 
 {"<INSTANCE_NAME>" => {"host" => {"WUWVC0ASDOF01" => {"<INSTANCE_NAME>" => {"response" => 
 { "outcome" => "failed", "result" => undefined, "failure-description" => 
 {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.<APPNAME>.INSTALL" => 
 "org.jboss.msc.service.StartException in service jboss.deployment.unit.<APPNAME>.INSTALL: WFLYSRV0153: 
 Failed to process phase INSTALL of deployment \"<APPNAME>\" 
 Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYJSF0008: 
 Failed to load annotated class: com.access.mbean.MyManagedBean"}}, "rolled-back" => true }}}}}} }

班级MyManagedBean有注释:

@ManagedBean(name="myMB")
@ViewScoped

war文件的WEB-INF由以下xml文件组成:faces-config.xml,jboss-deployment-structure.xml,jboss-web.xml,web.xml。

迁移之前,应用程序是在Java 1.8中编译的,并在JBOSS EAP 7.0中进行本地测试 我试过类似帖子中描述的解决方案,它对我不起作用。

server.log中的错误:

2017-08-17 15:50:33,442 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit.Portal.INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit.Portal.INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "Portal"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:172)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
    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: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYJSF0008: Failed to load annotated class: com.access.mbean.MyManagedBean
    at org.jboss.as.jsf.deployment.JSFAnnotationProcessor.deploy(JSFAnnotationProcessor.java:115)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:165)
    ... 5 more

0 个答案:

没有答案