JasperReports: Unsupported major.minor version 51.0

justified picture justified · Jan 7, 2013 · Viewed 8.9k times · Source

Possible Duplicate:
Exception in thread “main” java.lang.UnsupportedClassVersionError: a (Unsupported major.minor version 51.0)

Iam getting the error "Unsupported major.minor version 51.0". I am using jdk 1.6 and made the compiler compliance level to 1.6 and the jre is jre6. still I am geting the same error.

This is my error

java.lang.UnsupportedClassVersionError: transfer_1355215622877_662113 : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at net.sf.jasperreports.engine.util.JRClassLoader.loadClass(JRClassLoader.java:245)
    at net.sf.jasperreports.engine.util.JRClassLoader.loadClassFromBytes(JRClassLoader.java:154)
    at net.sf.jasperreports.engine.design.JRAbstractJavaCompiler.loadEvaluator(JRAbstractJavaCompiler.java:76)
    at net.sf.jasperreports.engine.design.JRAbstractCompiler.loadEvaluator(JRAbstractCompiler.java:327)
    at net.sf.jasperreports.engine.design.JRDefaultCompiler.loadEvaluator(JRDefaultCompiler.java:218)
    at net.sf.jasperreports.engine.fill.JRFillDataset.createCalculator(JRFillDataset.java:404)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.(JRBaseFiller.java:373)

Answer

Christoffer Hammarström picture Christoffer Hammarström · Jan 7, 2013

You're unintentionally using classes compiled with JDK 7 for JRE 7, with JRE 6.

You appear to have a report named transfer_1355215622877_662113 that was compiled with JDK 7 that needs to be recompiled with JDK 6.