2
我使用JBoss 7.1.1 Final,並在Eclipse Juno中使用JDK 7構建項目(使用ant腳本)。在部署時,它在加載EJB時失敗。我使用Oracle JDK 1.7.0_05的MAC OS使用JDK 7構建項目的JBoss AS 7在部署時失敗
這裏是堆棧跟蹤:
(MSC service thread 1-2) Failed to define class com.test.ReportManager in Module "deployment.TEST.war:main" from Service Module Loader: java.lang.UnsupportedClassVersionError: com/test/ReportManager : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method) [classes.jar:1.6.0_33]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [classes.jar:1.6.0_33]
at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [classes.jar:1.6.0_33]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [classes.jar:1.6.0_33]
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.Module.loadModuleClass(Module.java:517) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.getEjbClass(BusinessViewAnnotationProcessor.java:225)
at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.deploy(BusinessViewAnnotationProcessor.java:97)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_33]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_33]
at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_33]
任何想法是什麼原因?
感謝, 盧卡斯
root的默認JDK是從用戶的設置不同。謝謝! – lukas 2012-07-17 16:45:15
第一點怎麼辦? – 2012-11-27 09:21:54
創建一個新問題並將其鏈接到此處,我將回復。 :) – feniix 2012-11-27 16:23:39