Reputation: 111
There is a simple EAR project with descriptor
<?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>
After deploy to Jboss7.1 I get errors
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)
There are any errors in Eclipse but something went wrong. Could you point the problem here?
Upvotes: 1
Views: 368
Reputation: 2991
In your Eclipse, go to Windows->Preferences->Server->Runtime Environment
Edit the entry for JBoss 7.1 Runtime
Specify JRE as [jre7]
- the one you are using in your java project to build it.
Click Finish and OK.
Restart the server.
Upvotes: 0