Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031709Openbravo ERPA. Platformpublic2015-12-15 09:382016-03-17 10:54
alostale 
caristu 
urgentmajorhave not tried
closedfixed 
5
 
3.0PR16Q23.0PR16Q2 
alostale
Core
No
0031709: 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.
related to feature request 0031708 closed alostale support for JDK 8 
related to feature request 0029566 closed caristu Upgrade Jasper Libraries 
depends on backport 00318893.0PR16Q1 closed caristu some reports are not exported using JDK 8 
related to defect 0031878 closed alostale API checks due jdt-compiler upgrade 
Issue History
2015-12-15 09:38alostaleNew Issue
2015-12-15 09:38alostaleAssigned To => platform
2015-12-15 09:38alostaleModules => Core
2015-12-15 09:38alostaleTriggers an Emergency Pack => No
2015-12-15 09:38alostaleStatusnew => acknowledged
2015-12-15 09:38alostaleRelationship addedrelated to 0031708
2015-12-15 09:39alostaleRelationship addedrelated to 0029566
2015-12-15 09:52alostaleProposed Solution updated
2015-12-15 11:07alostaleTarget Version => 3.0PR16Q2
2015-12-23 19:49caristuAssigned Toplatform => caristu
2015-12-23 19:49caristuStatusacknowledged => scheduled
2016-01-13 12:10caristuReview Assigned To => alostale
2016-01-13 12:11hgbotCheckin
2016-01-13 12:11hgbotNote Added: 0083231
2016-01-13 12:11hgbotStatusscheduled => resolved
2016-01-13 12:11hgbotResolutionopen => fixed
2016-01-13 12:11hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d6b9e9ab3d17d5ce94dc6f1a93991ba640c9ad2d [^]
2016-01-13 12:14caristuNote Added: 0083232
2016-01-13 12:15caristuNote Edited: 0083232bug_revision_view_page.php?bugnote_id=0083232#r10599
2016-01-13 12:37caristuNote Edited: 0083232bug_revision_view_page.php?bugnote_id=0083232#r10602
2016-01-13 12:44caristuNote Edited: 0083232bug_revision_view_page.php?bugnote_id=0083232#r10603
2016-01-13 12:44caristuIssue Monitored: alostale
2016-01-13 12:50hgbotCheckin
2016-01-13 12:50hgbotNote Added: 0083235
2016-01-13 15:30hgbotCheckin
2016-01-13 15:30hgbotNote Added: 0083242
2016-01-14 08:49alostaleRelationship addedrelated to 0031878
2016-01-14 12:26hgbotCheckin
2016-01-14 12:26hgbotNote Added: 0083292
2016-01-14 12:29hgbotCheckin
2016-01-14 12:29hgbotNote Added: 0083293
2016-01-14 12:32alostaleNote Added: 0083294
2016-01-14 12:32alostaleStatusresolved => closed
2016-01-14 12:32alostaleFixed in Version => 3.0PR16Q2
2016-01-14 12:40alostaleIssue cloned0031889
2016-01-14 12:40alostaleRelationship addeddepends on 0031889
2016-03-17 10:54hudsonbotCheckin
2016-03-17 10:54hudsonbotNote Added: 0085033
2016-03-17 10:54hudsonbotCheckin
2016-03-17 10:54hudsonbotNote Added: 0085034
2016-03-17 10:54hudsonbotCheckin
2016-03-17 10:54hudsonbotNote Added: 0085035
2016-03-17 10:54hudsonbotCheckin
2016-03-17 10:54hudsonbotNote Added: 0085045
2016-03-17 10:54hudsonbotCheckin
2016-03-17 10:54hudsonbotNote Added: 0085046

Notes
(0083231)
hgbot   
2016-01-13 12:11   
Repository: erp/devel/pi
Changeset: d6b9e9ab3d17d5ce94dc6f1a93991ba640c9ad2d
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Jan 13 10:21:51 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d6b9e9ab3d17d5ce94dc6f1a93991ba640c9ad2d [^]

fixes issue 31709: 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 lib/runtime/jdt-compiler-3.1.1.jar
---
(0083232)
caristu   
2016-01-13 12:14   
(edited on: 2016-01-13 12:44)
Fix tested with:

- JDK 6
- JDK 7
- JDK 8

in the different print flows:

- PrintController (print Shipments, Orders, Invoices, Payments)
- Based on renderJR (Trial Balance Report, Customer Statement Report)
- Process Definition Reports

Updated wiki page: http://wiki.openbravo.com/wiki/Openbravo_Libraries [^]

More info about report compilers can be found here: http://jasperreports.sourceforge.net/sample.reference/groovy/index.html [^]

(0083235)
hgbot   
2016-01-13 12:50   
Repository: erp/devel/pi
Changeset: ba2e2bd9103656835130f9de6f21184c40f5b69b
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Jan 13 12:49:41 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ba2e2bd9103656835130f9de6f21184c40f5b69b [^]

related to issue 31709: update license url

---
M legal/Licensing.txt
---
(0083242)
hgbot   
2016-01-13 15:30   
Repository: erp/devel/pi
Changeset: ab2107e0c40333116b7be6ae1913b2646859787d
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Jan 13 15:29:32 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ab2107e0c40333116b7be6ae1913b2646859787d [^]

related to bug 31709: removed non referenced CPL license text

---
R legal/CPL-1.0.txt
---
(0083292)
hgbot   
2016-01-14 12:26   
Repository: erp/devel/pi
Changeset: d3de567925ce7810a6c1687570ceb35349048bd5
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jan 14 12:25:27 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d3de567925ce7810a6c1687570ceb35349048bd5 [^]

related to bug 31709: added test case

  The original problem was reproducible whenever the jrxml contained a String.replace.
  Added a test case covering it.

---
M src-test/src/org/openbravo/test/AllAntTaskTests.java
A src-test/src/org/openbravo/test/reporting/JasperReportsCompilation.java
---
(0083293)
hgbot   
2016-01-14 12:29   
Repository: erp/devel/pi
Changeset: 33cb1870df6f8afad289f0b380de4a711efff747
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jan 14 12:28:59 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/33cb1870df6f8afad289f0b380de4a711efff747 [^]

related to bug 31709: fixed (c)

---
M src-test/src/org/openbravo/test/reporting/JasperReportsCompilation.java
---
(0083294)
alostale   
2016-01-14 12:32   
code reviewed + tested
automated test case created
(0085033)
hudsonbot   
2016-03-17 10:54   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b22fb0500156 [^]
Maturity status: Test
(0085034)
hudsonbot   
2016-03-17 10:54   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b22fb0500156 [^]
Maturity status: Test
(0085035)
hudsonbot   
2016-03-17 10:54   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b22fb0500156 [^]
Maturity status: Test
(0085045)
hudsonbot   
2016-03-17 10:54   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b22fb0500156 [^]
Maturity status: Test
(0085046)
hudsonbot   
2016-03-17 10:54   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b22fb0500156 [^]
Maturity status: Test