Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unsupported major.minor version 49.0

Tags:

java

I am getting the following exception whenever I login to my application ...

javax.servlet.ServletException: com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl (Unsupported major.minor version 49.0)

What does this mean and how can I resolve the problem?

like image 506
Gourav Avatar asked Oct 06 '09 14:10

Gourav


People also ask

How do I fix Java Lang UnsupportedClassVersionError unsupported major minor version?

There are two ways to solve this problem, first make sure you run your Java program in the same or higher version of JRE, on which it has compiled, and second use the cross-compilation option to create a class file compatible to a lower JRE.

How do I fix Java Lang UnsupportedClassVersionError in Java?

UnsupportedClassVersionError happens because of a higher JDK during compile time and lower JDK during runtime. How can i make above change? Project -> Properties -> Java Compiler Enable project specific settings. Then select Compiler Compliance Level to 1.7, 1.6 or 1.5, build and test your app.

What is unsupported class version error?

The UnsupportedClassVersionError is a sub-class of the LinkageError and thrown by the Java Virtual Machine (JVM). When a class file is read and when major and minor version numbers are not supported, this error is thrown, and especially during the linking phase, this error is thrown.

When my class encounters unsupported class version error which options could resolve this issue?

1) If you encounter UnSupportedClassVersionError, check the JRE version you are using to run program and switch to higher version for quick solution.


1 Answers

You have a mismatch between your JVM that you're using to run the .class, and the version of Java used to compile the .class. The JVM running it is an earlier version of the JVM used to compile that class.

As detailed here, you have a version 1.5 class that you're trying to run on an earlier JVM.

EDIT : WAS 5.1 uses JDK 1.4, it would appear.

like image 190
Brian Agnew Avatar answered Oct 09 '22 05:10

Brian Agnew