Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionStanislav Ochotnicky
2013-10-04 15:28:52 UTC
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
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?
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.
Comment 7Andrew John Hughes
2016-05-04 18:50:09 UTC
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