This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 190412 - java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cast to javax.lang.model.element.QualifiedNameable
Summary: java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol can...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-17 10:19 UTC by Petr Hejl
Modified: 2010-09-17 11:26 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch. (885 bytes, patch)
2010-09-17 10:47 UTC, Jan Lahoda
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Hejl 2010-09-17 10:19:07 UTC
Many tests in Java EE area are failing since http://hg.netbeans.org/web-main/rev/abab9f975d47. See http://bertram.netbeans.org/hudson/job/javaee/.

The stacktrace (fragment) is:

java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cast to javax.lang.model.element.QualifiedNameable
	at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.visitMemberSelect(ImmutableTreeTranslator.java:458)
	at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.visitMemberSelect(ImmutableTreeTranslator.java:91)
	at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1670)
	at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:127)
	at org.netbeans.api.java.source.TreeUtilities$1.translate(TreeUtilities.java:894)
	at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.translateClassRef(ImmutableTreeTranslator.java:138)
Comment 1 Jan Lahoda 2010-09-17 10:46:30 UTC
I know - I have notified Petr J. that this may happen. The problem (AFAIK) is that the test do not use the correct version of javac - "requires.nb.javac=true" needs to be added to corresponding nbproject/project.properties. In this case, j2ee.ejbcore and j2ee.persistence need to be augmented. I am attaching a patch - I can apply it but as I can only do that to jet-main, it would take many hours before it would arrive to web-main - so applying it directly to web-main would be faster.

Sorry for the trouble.
Comment 2 Jan Lahoda 2010-09-17 10:47:15 UTC
Created attachment 102058 [details]
Patch.
Comment 3 Petr Jiricka 2010-09-17 10:55:40 UTC
Interestingly, I pushed the fix just before reading last comment by Honza.
http://hg.netbeans.org/web-main/rev/12fb9a98d5f5
Comment 4 Jan Lahoda 2010-09-17 11:26:58 UTC
Thanks.