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 267789 - ClassCastException: sun.awt.image.ToolkitImage cannot be cast to javax.swing.Icon
Summary: ClassCastException: sun.awt.image.ToolkitImage cannot be cast to javax.swing....
Status: NEW
Alias: None
Product: third-party
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: attila.kelemen
Depends on:
Reported: 2016-08-30 17:51 UTC by javydreamercsw
Modified: 2016-10-04 19:58 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 225990

stacktrace (1.67 KB, text/plain)
2016-08-30 17:51 UTC, javydreamercsw
stacktrace (1.67 KB, text/plain)
2016-09-01 18:33 UTC, javydreamercsw
stacktrace (1.67 KB, text/plain)
2016-09-26 17:13 UTC, javydreamercsw
stacktrace (1.67 KB, text/plain)
2016-10-02 18:46 UTC, swpalmer
stacktrace (1.67 KB, text/plain)
2016-10-03 08:49 UTC, J Bachorik
stacktrace (1.67 KB, text/plain)
2016-10-04 17:22 UTC, mclaassen
stacktrace (1.67 KB, text/plain)
2016-10-04 19:58 UTC, Exceptions Reporter

Note You need to log in before you can comment on or make changes to this bug.
Description javydreamercsw 2016-08-30 17:51:49 UTC
Build: NetBeans IDE Dev (Build 201608230002)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.91-b14, Java(TM) SE Runtime Environment, 1.8.0_91-b14
OS: Linux

User Comments:
javydreamercsw: Tried to run a gradle project.

java.lang.ClassCastException: sun.awt.image.ToolkitImage cannot be cast to javax.swing.Icon
   at org.netbeans.core.output2.ui.WeakAction.<init>(
   at org.netbeans.core.output2.ui.AbstractOutputTab.installKeyboardAction(
   at org.netbeans.core.output2.ui.AbstractOutputTab.setToolbarActions(
   at org.netbeans.core.output2.Controller.createOutputTab(
   at org.netbeans.core.output2.Controller.performCommand(
   at org.netbeans.core.output2.Controller.eventDispatched(
Comment 1 javydreamercsw 2016-08-30 17:51:50 UTC
Created attachment 161832 [details]
Comment 2 javydreamercsw 2016-09-01 18:33:34 UTC
Created attachment 161867 [details]

Right click on project node.
Comment 3 javydreamercsw 2016-09-26 17:13:07 UTC
Created attachment 162219 [details]

Executing a second project.
Comment 4 swpalmer 2016-10-02 18:46:12 UTC
Created attachment 162307 [details]

Happens when I try to run my project (using the Gradle plugin)
Comment 5 Jaroslav Havlin 2016-10-03 08:34:11 UTC
Seems related to Gradle plugin. Reassigning to owner of Gradle Support.
Attila, can you please evaluate this issue?
Thank you.
Comment 6 J Bachorik 2016-10-03 08:49:13 UTC
Created attachment 162314 [details]

Nothing. Working in IDE
Comment 7 Exceptions Reporter 2016-10-03 08:49:18 UTC
This bug already has 5 duplicates 
Comment 8 attila.kelemen 2016-10-03 09:00:12 UTC
I cannot reproduce the issue in a clean install of NetBeans 8.2 RC (with the Gradle plugin). What should I do to reproduce the issue?
Comment 9 attila.kelemen 2016-10-03 09:41:27 UTC
Though I could not reproduce this issue, I made some changes which might affect this issue:
Comment 10 mclaassen 2016-10-04 17:22:14 UTC
Created attachment 162332 [details]

Trying 8.2 for first time.  Installed 8.1 update center plugin or gradle, not sure if that is related.
Comment 11 attila.kelemen 2016-10-04 18:13:27 UTC
I would like to ask someone to build the Gradle plugin from the sources and check if it solves their issue or not.

Though it seems reasonable that my changes might fix this issue, I have no means to verify it because I cannot reproduce the issue. Also, looking at NB's sources: The related classes were not changed since forever, so if the Gradle plugin is at fault, I don't see why the issue did not manifest in earlier version of NB.
Comment 12 Exceptions Reporter 2016-10-04 19:58:14 UTC
Created attachment 162336 [details]

just open my projets with dracula LAF