JasperReports - Unsupported major.minor version 51.0
Just ran into something a bit far fetched: My Jasper reports were not working in VOS, our JAVA Swing application at Inforviegas. It complained with an error along these lines: Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedClassVersionError: CCClient_1334580618412_476658 : Unsupported major.minor version 51.0
The only difference from business as usual was that i changed laptops.
We are using the jasperreports-maven-plugin to compile the reports from maven. In our pom.xml files we always define the maven-compiler-plugin target and source versions of the virtual machine. One would assume that the jasper plugin would use the same version of the maven-compiler-plugin, right? Wrong. It uses the default virtual machine set in your computer. And since i had Java 7 as the default and we are compiling to Java 6, the reports end up with the wrong java version, making them not show in our application.
Hope this helps some people save some time, since i couldn't :)