无法使用Jboss 7.0.2部署war maven项目

时间:2013-03-16 16:52:41

标签: maven-3 jboss7.x

我正在尝试部署一个包含简单托管Bean和xhtml页面的WAR maven项目。 之前我创建了一个包含实体和会话Bean的EJB maven项目。在部署rjb项目之后,我获得了一个JAR可执行文件,我将其添加为WEB项目的依赖项。 但部署我的Web项目的WAR时出现问题 香港专业教育学院整日都在寻找一个解决方案..一个强烈的头巾,我很快就会放弃.. 这是错误:

17:48:07,781 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."GestionReclamationWEB-1.0-SNAPSHOT.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."GestionReclamationWEB-1.0-SNAPSHOT.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "GestionReclamationWEB-1.0-SNAPSHOT.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [:1.6.0_38]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [:1.6.0_38]
    at java.lang.Thread.run(Unknown Source) [:1.6.0_38]
Caused by: java.lang.UnsupportedClassVersionError: com/GestionReclamation/services/EmployeBean : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_38]
    at java.lang.ClassLoader.defineClassCond(Unknown Source) [:1.6.0_38]
    at java.lang.ClassLoader.defineClass(Unknown Source) [:1.6.0_38]
    at java.security.SecureClassLoader.defineClass(Unknown Source) [:1.6.0_38]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.modules.Module.loadModuleClass(Module.java:590) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.getEjbClass(BusinessViewAnnotationProcessor.java:201)
    at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.deploy(BusinessViewAnnotationProcessor.java:83)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
    ... 5 more

17:48:07,783 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Deployment of "GestionReclamationWEB-1.0-SNAPSHOT.war" was rolled back with failure message {"Failed services" => {"jboss.deployment.unit.\"GestionReclamationWEB-1.0-SNAPSHOT.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"GestionReclamationWEB-1.0-SNAPSHOT.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"GestionReclamationWEB-1.0-SNAPSHOT.war\""}}
17:48:07,824 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Stopped deployment GestionReclamationWEB-1.0-SNAPSHOT.war in 41ms
17:48:07,825 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 2) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Failed services" => {"jboss.deployment.unit.\"GestionReclamationWEB-1.0-SNAPSHOT.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"GestionReclamationWEB-1.0-SNAPSHOT.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"GestionReclamationWEB-1.0-SNAPSHOT.war\""}}}}

1 个答案:

答案 0 :(得分:0)

看起来您的代码是使用JDK7编译的,而JBoss是使用JDK6运行的。这不起作用,因为JDK6无法执行使用JDK7编译的类文件。

This可能有助于了解问题。