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 246279 - ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cast to javax.lang.model.element.ExecutableElement
Summary: ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cas...
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0
Hardware: All All
: P1 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
: 247573 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-08-05 14:14 UTC by Alexander Simon
Modified: 2015-03-26 13:46 UTC (History)
19 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 211015


Attachments
stacktrace (2.04 KB, text/plain)
2014-08-05 14:14 UTC, Alexander Simon
Details
stacktrace (2.04 KB, text/plain)
2014-12-03 14:43 UTC, michbarsinai
Details
stacktrace (2.04 KB, text/plain)
2014-12-08 07:58 UTC, Tomas Mysik
Details
stacktrace (2.04 KB, text/plain)
2014-12-10 00:13 UTC, alied
Details
stacktrace (2.12 KB, text/plain)
2014-12-11 07:43 UTC, vkhashin
Details
stacktrace (2.04 KB, text/plain)
2015-01-05 17:15 UTC, satory
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2014-08-05 14:14:02 UTC
Build: NetBeans IDE Dev (Build 20140805-9392ab2f1455)
VM: Java HotSpot(TM) Client VM, 24.60-b09, Java(TM) SE Runtime Environment, 1.7.0_60-b19
OS: SunOS

User Comments:
alexvsimon: paste some code in class

FrantaM: paste java code from another file




Stacktrace: 
java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cast to javax.lang.model.element.ExecutableElement
   at org.netbeans.modules.java.hints.bugs.ThrowableNotThrown.methodInvocation(ThrowableNotThrown.java:155)
   at sun.reflect.GeneratedMethodAccessor117.invoke(GeneratedMethodAccessor117.java:0)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.netbeans.modules.java.hints.providers.code.CodeHintProviderImpl$WorkerImpl.createErrors(CodeHintProviderImpl.java:336)
   at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.runHint(HintsInvoker.java:798)
Comment 1 Alexander Simon 2014-08-05 14:14:03 UTC
Created attachment 148560 [details]
stacktrace
Comment 2 Svata Dedic 2014-08-07 12:31:10 UTC
Fixed by jet-main#5c09cd739e7b
Comment 3 Quality Engineering 2014-08-10 01:50:58 UTC
Integrated into 'main-silver', will be available in build *201408100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/5c09cd739e7b
User: Svata Dedic <sdedic@netbeans.org>
Log: #246279: avoid erroneous symbols
Comment 4 everflux 2014-11-29 17:02:36 UTC
I do not think this is fixed, just got an exception in NB 8.0.2
Comment 5 michbarsinai 2014-12-03 14:43:12 UTC
Created attachment 150859 [details]
stacktrace

Not sure what happened. Might be while the app was in the background.
Comment 6 Tomas Mysik 2014-12-08 07:58:25 UTC
Created attachment 150946 [details]
stacktrace

editing java file
Comment 7 alied 2014-12-10 00:13:25 UTC
Created attachment 150995 [details]
stacktrace

editing a JUnit class test
Comment 8 vkhashin 2014-12-11 07:43:31 UTC
Created attachment 151031 [details]
stacktrace

Debug test file.
Comment 9 satory 2015-01-05 17:15:08 UTC
Created attachment 151370 [details]
stacktrace

Cant remember stepped away from Laptop for a while.
Comment 10 Alexander Simon 2015-01-06 09:21:37 UTC
251 reports => P1
Comment 11 Svata Dedic 2015-01-06 10:36:33 UTC
Folks, I am sorry the change did not propagate into 8.0 branch. I'll leave the defect as P1 fixed in dev and try backport it into the next patch release when it is scheduled.
The issue should be fixed in dev builds as noted in comment #3.
Comment 12 Marian Mirilovic 2015-02-24 13:47:49 UTC
This is a candidate for NB 8.0.2 Patch 1 , so please integrate the bugfix into releases/release801 branch today by 10pm CET, for more information see 
http://wiki.netbeans.org/NetBeansPatchesProcess
Comment 13 Svata Dedic 2015-02-24 15:36:52 UTC
Backported as changeset 04fc3e2f3f78 into release801 branch.
Comment 14 Svata Dedic 2015-03-26 13:46:47 UTC
*** Bug 247573 has been marked as a duplicate of this bug. ***