无法将企业项目部署到 JBossAS
Can not deploy enterprise project to JBossAS
有一个带有描述符的简单 EAR 项目
<?xml version="1.0" encoding="UTF-8"?>
<application ... version="6">
<display-name>EAR</display-name>
<module>
<web>
<web-uri>View.war</web-uri>
<context-root>view</context-root>
</web>
</module>
<module>
<ejb>Module.jar</ejb>
</module>
</application>
部署到 Jboss7.1 后出现错误
WARN [org.jboss.modules] Failed to define class
intf.module.FacadeLocal in Module "deployment.EAR.ear.Module.jar:main"
from Service Module Loader: java.lang.UnsupportedClassVersionError :
intf/module/FacadeLocal : Unsupported major.minor version 52.0 ...
WARN [org.jboss.modules] Failed to define class intf.module.Facade in
Module "deployment.EAR.ear.Module.jar:main" from Service Module
Loader: java.lang.LinkageError: Failed to link intf/module/Facade
(Module "deployment.EAR.ear.Module.jar:main" from Service Module
Loader)
Caused by: java.lang.NoClassDefFoundError: intf/module/FacadeLocal
at java.lang.ClassLoader.defineClass1(Native Method)[rt.jar:1.7.0_79]
Caused by: java.lang.ClassNotFoundException: intf.module.FacadeLocal
from [Module "deployment.EAR.ear.Module.jar :main" from Service Module
Loader] at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001:
Failed to start service
jboss.deployment.subunit."EAR.ear"."Module.jar".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.subunit."EAR.ear"."Module.jar".POST_MODULE: Failed to
process phase POST_MODULE of subdeployment "Module.jar" of deployment
"EAR.ear"
Caused by:
org.jboss.as.server.deployment.DeploymentUnitProcessingException:
Could not load EJB class intf.module.Facade
Caused by: java.lang.ClassNotFoundException: intf.module.Facade from
[Module "deployment.EAR.ear.Module.jar:main" from Service Module
Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
Eclipse 中有任何错误,但出了点问题。你能指出这里的问题吗?
在您的 Eclipse 中,转到 Windows->Preferences->Server->Runtime Environment
编辑 JBoss 7.1 Runtime
的条目
将 JRE 指定为 [jre7]
- 您在 java 项目中用于构建它的 JRE。
单击完成并确定。
重新启动服务器。
有一个带有描述符的简单 EAR 项目
<?xml version="1.0" encoding="UTF-8"?>
<application ... version="6">
<display-name>EAR</display-name>
<module>
<web>
<web-uri>View.war</web-uri>
<context-root>view</context-root>
</web>
</module>
<module>
<ejb>Module.jar</ejb>
</module>
</application>
部署到 Jboss7.1 后出现错误
WARN [org.jboss.modules] Failed to define class intf.module.FacadeLocal in Module "deployment.EAR.ear.Module.jar:main" from Service Module Loader: java.lang.UnsupportedClassVersionError : intf/module/FacadeLocal : Unsupported major.minor version 52.0 ...
WARN [org.jboss.modules] Failed to define class intf.module.Facade in Module "deployment.EAR.ear.Module.jar:main" from Service Module Loader: java.lang.LinkageError: Failed to link intf/module/Facade (Module "deployment.EAR.ear.Module.jar:main" from Service Module Loader)
Caused by: java.lang.NoClassDefFoundError: intf/module/FacadeLocal at java.lang.ClassLoader.defineClass1(Native Method)[rt.jar:1.7.0_79]
Caused by: java.lang.ClassNotFoundException: intf.module.FacadeLocal from [Module "deployment.EAR.ear.Module.jar :main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.subunit."EAR.ear"."Module.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."EAR.ear"."Module.jar".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "Module.jar" of deployment "EAR.ear"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Could not load EJB class intf.module.Facade
Caused by: java.lang.ClassNotFoundException: intf.module.Facade from [Module "deployment.EAR.ear.Module.jar:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
Eclipse 中有任何错误,但出了点问题。你能指出这里的问题吗?
在您的 Eclipse 中,转到 Windows->Preferences->Server->Runtime Environment
编辑 JBoss 7.1 Runtime
将 JRE 指定为 [jre7]
- 您在 java 项目中用于构建它的 JRE。
单击完成并确定。
重新启动服务器。