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 208751 - ClassCastException: sun.awt.CGraphicsEnvironment cannot be cast to sun.awt.X11GraphicsEnvironment
Summary: ClassCastException: sun.awt.CGraphicsEnvironment cannot be cast to sun.awt.X1...
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 7.1.1
Hardware: Macintosh Mac OS X
: P2 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords: JDK_SPECIFIC
: 209926 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-22 13:20 UTC by Tomas Danek
Modified: 2012-04-10 12:50 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 185276


Attachments
stacktrace (725 bytes, text/plain)
2012-02-22 13:20 UTC, Tomas Danek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2012-02-22 13:20:28 UTC
Build: NetBeans IDE 7.1.1 RC1 (Build 201202141941)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.0-b15, Java(TM) SE Runtime Environment, 1.7.0_04-ea-b12
OS: Mac OS X

User Comments:
musilt2: debugged NB platform app,
debugegr hit breakpoint in action.




Stacktrace: 
java.lang.ClassCastException: sun.awt.CGraphicsEnvironment cannot be cast to sun.awt.X11GraphicsEnvironment
   at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:122)
   at java.lang.Class.forName0(Class.java:0)
   at java.lang.Class.forName(Class.java:186)
   at org.netbeans.modules.debugger.jpda.util.AWTGrabHandler.checkXServerExc(AWTGrabHandler.java:316)
   at org.netbeans.modules.debugger.jpda.util.AWTGrabHandler.checkXServer(AWTGrabHandler.java:303)
   at org.netbeans.modules.debugger.jpda.util.AWTGrabHandler.solveGrabbing(AWTGrabHandler.java:151)
Comment 1 Tomas Danek 2012-02-22 13:20:30 UTC
Created attachment 116025 [details]
stacktrace
Comment 2 Tomas Danek 2012-02-22 13:49:52 UTC
one more (maybe) useful info: debugger appeared to hit breakpoint (got notification in debugger window), but line with BP did not turn green.
Comment 3 Marian Mirilovic 2012-02-24 14:52:28 UTC
Might be JDK7u4 related .... is anybody able to reproduce it on another JDK and what about OS ?
Comment 4 Martin Entlicher 2012-02-24 15:44:58 UTC
IMHO it's Mac-specific. I didn't see it on a different platform.
Comment 5 Martin Entlicher 2012-02-27 14:56:44 UTC
The exception is fixed by changeset:   213798:48cb21c44a79
http://hg.netbeans.org/main/rev/48cb21c44a79

I've submitted issue #208904 to check the mouse grab problem on Mac OS X.
Comment 6 Quality Engineering 2012-03-01 11:00:46 UTC
Integrated into 'main-golden', will be available in build *201203010400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/48cb21c44a79
User: mentlicher@netbeans.org
Log: #208751 Catch exceptions that can be thrown during loading of sun.awt.X11.XToolkit class.
Comment 7 Jiri Kovalsky 2012-03-22 10:33:18 UTC
Tomasi, can you please verify this issue? I only have Snow Leopard. :( Thanks!
Comment 8 Martin Entlicher 2012-03-22 10:38:21 UTC
I do not think the assignment should be changed when asking for verification...
Comment 9 Tomas Danek 2012-03-22 11:28:01 UTC
I'm afraid another problem, very similar to this, occured: see http://netbeans.org/bugzilla/show_bug.cgi?id=209926

Product Version: NetBeans IDE Dev (Build 201203180400)
Java: 1.7.0_04-ea; Java HotSpot(TM) 64-Bit Server VM 23.0-b17
System: Mac OS X version 10.7.3 running on amd64; UTF-8; en_US (nb)
User directory: /tmp/nbTrunk5
Cache directory: /tmp/nbTrunk5/var/cache
Comment 10 Martin Entlicher 2012-03-22 11:52:45 UTC
Not really fixed - see issue #209926.
Comment 11 Martin Entlicher 2012-03-22 11:53:09 UTC
*** Bug 209926 has been marked as a duplicate of this bug. ***
Comment 12 Martin Entlicher 2012-03-22 11:54:33 UTC
The problem is, that we're catching an exception, but an Error is thrown.
Comment 13 Martin Entlicher 2012-03-22 12:21:32 UTC
Hopefully, you'll not get the exception any more...
changeset:   216098:6b2e01acde1b
http://hg.netbeans.org/main/rev/6b2e01acde1b
Comment 14 Quality Engineering 2012-03-23 10:35:36 UTC
Integrated into 'main-golden', will be available in build *201203230400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6b2e01acde1b
User: mentlicher@netbeans.org
Log: #208751: Assure that no throwable remains uncaught from Class.forName().
Comment 15 Tomas Danek 2012-03-29 09:22:08 UTC
Verified in trunk (20110328)
Please proceed with integration into release71_fixes branch and follow
http://wiki.netbeans.org/NetBeansPatchesProcess , thanks!
Comment 16 Martin Entlicher 2012-03-30 08:11:07 UTC
The fix is pushed into release71_fixes as changeset:   221025:97df2a2470b7
http://hg.netbeans.org/releases/rev/97df2a2470b7
http://hg.netbeans.org/releases/rev/314d713b8ef1
Comment 17 Quality Engineering 2012-04-01 02:22:19 UTC
Integrated into 'releases', will be available in build *201203312205* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/97df2a2470b7
User: mentlicher@netbeans.org
Log: #208751: Assure that no throwable remains uncaught from Class.forName().
(transplanted from 6b2e01acde1b25ad8566a97d374c8b04407adb7a)
Comment 18 Tomas Danek 2012-04-10 12:50:45 UTC
v. in 7.1.2

Product Version: NetBeans IDE 7.1.2 (Build 201204092205)
Java: 1.7.0_04-ea; Java HotSpot(TM) 64-Bit Server VM 23.0-b20
System: Mac OS X version 10.7.3 running on amd64; UTF-8; en_US (nb)
User directory: /Users/tomas/.netbeans/7.1.2
Cache directory: /Users/tomas/.netbeans/7.1.2/var/cache