Bug 1336481

Summary: Rebase: Upgrade ECJ to at least 4.4
Product: Red Hat Enterprise Linux 6 Reporter: Coty Sutherland <csutherl>
Component: ecjAssignee: Elliott Baron <ebaron>
Status: CLOSED ERRATA QA Contact: Lukáš Zachar <lzachar>
Severity: unspecified Docs Contact:
Priority: high    
Version: 6.8CC: ahughes, alanm, andreas.oberheim, aogburn, bnater, csutherl, dbhole, dkochuka, dpuglielli, ebaron, jentrena, kfujii, rhatlapa, salmy, scott, sidney
Target Milestone: rcKeywords: Rebase
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
ECJ is the Java bytecode compiler of the Eclipse Platform. It is also known as the JDT Core batch compiler. Previously, ECJ was unable to compile Java code that used features introduced in Java 8, such as Lambda expressions. Compilation would also fail for Java code that referenced class files containing Java 8 features, including system classes part of the Java Runtime Environment. Users should upgrade to this updated package, which provides a newer version of ECJ that is fully compatible with Java 8 code.
Story Points: ---
Clone Of:
: 1379855 (view as bug list) Environment:
Last Closed: 2017-03-21 09:01:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1223609, 1269194, 1337940, 1361283, 1379855    

Description Coty Sutherland 2016-05-16 15:14:02 UTC
With the latest update to java-1.8.0-openjdk (java-1.8.0-openjdk-headless-1.8.0.91-0.b14.el6_7.x86_64) all JSP compilation for tomcat6 is broken. The workaround for the problem is to revert the java update to a previously stable release.

The reason for the problem is that ECJ's JDTCompiler classes have some sort of incompatibility with the OpenJDK update's java.io.ObjectInputStream class. This compatibility issue is causing an exception and preventing JSPs from compiling on tomcat6. See attached bug (https://bugzilla.redhat.com/show_bug.cgi?id=1223609#c13) for more details on this.

Is it possible to rebase ECJ to at least 4.4 to correct this?

Comment 1 Andrew John Hughes 2016-05-16 15:28:11 UTC
Yeah, the fix for "S8144430, CVE-2016-3427: Improve JMX connections" adds:

+    static {
+        SharedSecrets.setJavaObjectInputStreamAccess(ObjectInputStream::setValidator);
+    }

to java.io.ObjectInputStream. We had to remove this for the OpenJDK 7 backport.

It's mainly luck if you've managed to use a Java 8 class library with a compiler that doesn't support Java 8 so far. This is only going to get worse on subsequent updates, as Oracle show no sign of avoiding using Java 8 features. Tomcat either needs to use the OpenJDK 7 class library or ecj needs to be upgraded.

Comment 2 Deepak Bhole 2016-05-16 17:10:35 UTC
Assigning to Elliott to study the effects of an ECJ update and then update it as appropriate.

Comment 50 errata-xmlrpc 2017-03-21 09:01:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0566.html