title: "Bad major version" error when using Jasper-Reports on Websphere
body: <p>When I try to fill a JasperReport in my Servlet running on Websphere 6.1 I get an <code>UnsupportedClassVersionError: Bad major version at offset=6</code>. </p>
  
  <p>I guess that the compiled JasperReport has a different version (java 6?) than the jre on websphere can execute (which would be java 5), but I can not figure out why. Compiling the reports with maven or in the application (in the servlet) both leads to the error. </p>
  
  <p>According to the demo which was provided with JasperReports, which also shows how to use it with Java 1.5, I added following config to the jasperreports.properties:</p>
  
  <pre><code>org.eclipse.jdt.core.compiler.source=1.5
  org.eclipse.jdt.core.compiler.compliance=1.5
  org.eclipse.jdt.core.compiler.codegen.TargetPlatform=1.5
  </code></pre>
  
  <p>But the error still exists. </p>
  
  <p>The language used in the report is Java, so which compiler is the correct one to use? <code>net.sf.jasperreports.engine.design.JRJdtCompiler</code> or <code>net.sf.jasperreports.engine.design.JRJavacCompiler</code>? </p>
  
  <p>Unfortunately, the documentation does not explain the difference between those two compilers...</p>
  
  <p>Edit: so fare I have been using the JRJavacCompiler. With the JRJdtCompiler I get a NullPointer Exception:</p>
  
  <pre><code> java.lang.NullPointerException
      at java.lang.Class.isAssignableFrom(Native Method)
      at net.sf.jasperreports.engine.fill.JRFillTextField.getFormat(JRFillTextField.java:706)
      at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:394)
      at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:368)
      at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258)
      at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499)
      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2036)
      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:760)
      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:270)
      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
      at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946)
      at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:864)
      at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:84)
      at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:624)
      at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:540)
      at com.swissre.sod.jone.web.server.FileStreamingServlet.doGet(FileStreamingServlet.java:48)
  </code></pre>