| Summary: | java-1.7.0-openjdk: java.lang.ClassCastException: com.sun.tools.javac.tree.JCTree$JCFieldAccess | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Stanislav Ochotnicky <sochotni> | ||||
| Component: | java-1.7.0-openjdk | Assignee: | Andrew John Hughes <ahughes> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Lukáš Zachar <lzachar> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 7.2 | CC: | ahughes, dbhole, jerboaa, jvanek, matt, mizdebsk, omajid, ptisnovs, rrati | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | java-1.7.0-openjdk-1.7.0.101-2.6.6.6.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-11-03 22:58:03 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: | |||||
| Attachments: |
|
||||||
This issue seems to be caused by the following change made in OpenJDK7: changeset: 1483:7e2c650b86bc user: mcimadamore date: Wed May 29 14:49:14 2013 +0100 summary: 7160084: javac fails to compile an apparently valid class/interface combination http://hg.openjdk.java.net/jdk7u/jdk7u/langtools/rev/7e2c650b86bc Is it possible to cooperate on creating a simple reproducer which could be send to upstream? Created attachment 809349 [details] Simplified reproducer $ wget http://repo1.maven.org/maven2/commons-el/commons-el/1.0/commons-el-1.0.jar $ javac -source 1.3 ELParser.java -cp commons-el-1.0.jar The problem seems to be enum *identifier* (valid in Java 1.4 and older). Mikolaj, I'm able to reproduce it even on OpenJDK8 and Oracle JDK8, because this change have been backported from 8 as far as I knwo. TY, I'm working on it. This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22 This is now fixed in OpenJDK 8 by: https://bugs.openjdk.java.net/browse/JDK-8069181 but Oracle didn't backport it to 7, so the bug remains there. As 7 is no longer in Fedora, turning this into a RHEL bug. 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-2016-2140.html |
Description of problem: java-1.7.0-openjdk throws ClassCastException when building apache-commons-el[1]: Snippet: [javac] An exception has occurred in the compiler (1.7.0_40). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you. [javac] java.lang.ClassCastException: com.sun.tools.javac.tree.JCTree$JCFieldAccess cannot be cast to com.sun.tools.javac.tree.JCTree$JCIdent [javac] at com.sun.tools.javac.comp.MemberEnter.visitVarDef(MemberEnter.java:629) [javac] at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:725) [javac] at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:401) [javac] at com.sun.tools.javac.comp.Attr.visitVarDef(Attr.java:855) [javac] at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:725) [javac] at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:431) [javac] at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:418) [javac] at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:480) [1] http://koji.fedoraproject.org/koji/taskinfo?taskID=6024885 Version-Release number of selected component (if applicable): 1:1.7.0.60-2.4.2.5.fc21 but I can reproduce on F19 with java-1.7.0-openjdk-1.7.0.60-2.4.2.4.fc19.x86_64 as well