Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031889Openbravo ERPA. Platformpublic2016-01-14 12:402016-01-15 07:36
alostale 
caristu 
urgentmajorhave not tried
closedfixed 
5
 
3.0PR16Q13.0PR16Q1 
alostale
Core
No
0031889: some reports are not exported using JDK 8
When Openbravo is deployed using JDK 8, some reports cannot be exported.

Note this only happens for some reports.
* Using JDK 8
* Go to Trial Balance Report
* Try to export to PDF
  - PDF is not exported
  - Looking at log, this stack trace can be seen:
71178 [http-nio-8080-exec-10] ERROR net.sf.jasperreports.engine.design.JRJdtCompiler - Compilation error
org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
    at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.<init>(ClassFileReader.java:298)
    at net.sf.jasperreports.engine.design.JRJdtCompiler$1.findType(JRJdtCompiler.java:255)
    at net.sf.jasperreports.engine.design.JRJdtCompiler$1.findType(JRJdtCompiler.java:192)
    at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:93)
    at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:43)
    at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:84)
    at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveTypesFor(BinaryTypeBinding.java:750)
    at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.getExactMethod(BinaryTypeBinding.java:564)
    at org.eclipse.jdt.internal.compiler.lookup.Scope.findExactMethod(Scope.java:715)
    at org.eclipse.jdt.internal.compiler.lookup.Scope.getMethod(Scope.java:2097)
    at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:314)
    at org.eclipse.jdt.internal.compiler.ast.Assignment.resolveType(Assignment.java:181)
    at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:829)
    at org.eclipse.jdt.internal.compiler.ast.Block.resolve(Block.java:101)
    at org.eclipse.jdt.internal.compiler.ast.Statement.resolveCase(Statement.java:140)
    at org.eclipse.jdt.internal.compiler.ast.SwitchStatement.resolve(SwitchStatement.java:279)
    at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:418)
    at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:178)
    at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:396)
    at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1072)
    at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1121)
    at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:305)
    at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:512)
    at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:329)
    at net.sf.jasperreports.engine.design.JRJdtCompiler.compileUnits(JRJdtCompiler.java:167)
    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:201)
    at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:354)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:614)
    at org.openbravo.client.application.report.ReportingUtils.getTranslatedJasperReport(ReportingUtils.java:1068)
The problem looks to be caused by the ecj (Eclipse JDT compiler) that jasper uses. Current version included in Openbravo 3.1.1 seems not to work with JDK 8.

Quick test upgrading to currently latest 4.4.2 [1] seems to solve the problem, though intensive testing should be done.

[1] http://mvnrepository.com/artifact/org.eclipse.jdt.core.compiler/ecj [^]
No tags attached.
blocks defect 00317093.0PR16Q2 closed caristu some reports are not exported using JDK 8 
Issue History
2016-01-14 12:40alostaleNew Issue
2016-01-14 12:40alostaleAssigned To => caristu
2016-01-14 12:40alostaleModules => Core
2016-01-14 12:40alostaleTriggers an Emergency Pack => No
2016-01-14 12:40alostaleIssue generated from0031709
2016-01-14 12:40alostaleRelationship addedblocks 0031709
2016-01-14 16:05hgbotCheckin
2016-01-14 16:05hgbotNote Added: 0083304
2016-01-14 16:05hgbotStatusnew => resolved
2016-01-14 16:05hgbotResolutionopen => fixed
2016-01-14 16:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR16Q1/rev/52da579a0c82c2da7fc12bdec918865565cf9992 [^]
2016-01-14 16:06caristuReview Assigned To => alostale
2016-01-14 16:07caristuIssue Monitored: alostale
2016-01-15 07:36alostaleNote Added: 0083324
2016-01-15 07:36alostaleStatusresolved => closed
2016-01-15 07:36alostaleFixed in Version => 3.0PR16Q1

Notes
(0083304)
hgbot   
2016-01-14 16:05   
Repository: erp/backports/3.0PR16Q1
Changeset: 52da579a0c82c2da7fc12bdec918865565cf9992
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Jan 14 16:03:01 2016 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR16Q1/rev/52da579a0c82c2da7fc12bdec918865565cf9992 [^]

fixes issue 31889: some reports are not exported using JDK 8

The library which contains the JDT compiler from the Eclipse Foundation has been upgraded to version 4.4.2. This compiler is used to compile jrxml -> jasper.

Using JDK 8 with the previous library version caused an error when exporting some reports. With this upgrade reports are exported correctly using JDK 8.

---
M legal/Licensing.txt
A lib/runtime/jdt-compiler-4.4.2.jar
R legal/CPL-1.0.txt
R lib/runtime/jdt-compiler-3.1.1.jar
---
(0083324)
alostale   
2016-01-15 07:36   
Code reviewed + tested