简体   繁体   中英

JBoss Unsupported major.minor version 52.0

I have an application that needs to be deployed in JBoss 6.0.0 and I am using Eclipse Mars. My system variable points to Java 1.6, from build path I've selected Java 1.6 and also, JBoss is using Java 1.6. My problem is that when trying to deploy the app to JBoss the following error

[org.jboss.detailed.classloader.ClassLoaderManager] Unexpected error during load of:com.xservice.java.velocity.VelocityLoader: java.lang.UnsupportedClassVersionError: com/xservice/java/velocity/VelocityLoader : Unsupported major.minor version 52.0 .

I don't have any idea how to handle this considering the given settings.

The problem was fixed by changing the Java version from Project Facets(it was 1.8 instead of 1.6). Thanks go to Sanjeev Saha. Project facets screen

Please locate the Jar which contains the class com.xservice.java.velocity.VelocityLoader .

This class is compiled with JDK 8. The class file version for Java SE 8 is 52.0 as per http://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html Your JVM is Java 6. You may not be able to run a Java class compiled with JDK 8.0 by JVM 6.0. This is the reason you are getting 'Unsupported major.minor version 52.0'

My suggestion is using a Jar which contains classes compiled by JDK 6.0.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM