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.
I've just installed NetBeans 6.0 M8 and VWP M8 on Ubuntu Linux with JDK 1.6. I created a new visual web application, opend Page1 and drag/dropped a Calendar component onto the page. Right away I was shown an exception. java.lang.NullPointerException at sun.awt.X11.XSelection.checkChange(XSelection.java:749) at sun.awt.X11.XSelection.access$200(XSelection.java:30) at sun.awt.X11.XSelection$SelectionEventHandler.dispatchEvent(XSelection.java:758) at sun.awt.X11.XToolkit.dispatchEvent(XToolkit.java:482) at sun.awt.X11.XToolkit.run(XToolkit.java:626) In fact, every single component I drop onto a page causes this problem. at sun.awt.X11.XToolkit.run(XToolkit.java:560) [catch] at java.lang.Thread.run(Thread.java:619)
Not a designer bug. Passing to platform. There was already such issue filled before (I don't remember the number). Note this reported JDK bug, which might be the actual problem: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6182905
raising visibility for M9. If this is component specific please let me know so I can get it to the woodstock folks.
Is this still reproducible in M9 and with JDK 1.5? I'm trying to install GlassFish on the ubuntu test machine in the lab (rave-opteron1) but not successful. I sent a email to users@glassfish.dev.java.net already and haven't gotten a reply yet. Can you provide a ubuntu system that I can look at? The error I got when trying to extracting the bits from the jar (I'm using jdk1.5.0_11): java -Xmx256m -jar glassfish-installer-v2-b33.jar Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70) at java.awt.Font.tk(libgcj.so.70) at java.awt.Font.getPeerFromToolkit(libgcj.so.70) at java.awt.Font.<init>(libgcj.so.70) at javax.swing.plaf.FontUIResource.<init>(libgcj.so.70) at javax.swing.plaf.metal.DefaultMetalTheme.<clinit>(libgcj.so.70) at java.lang.Class.initializeClass(libgcj.so.70) at java.lang.Class.initializeClass(libgcj.so.70) at javax.swing.plaf.metal.MetalLookAndFeel.createDefaultTheme(libgcj.so.70) at javax.swing.plaf.metal.MetalLookAndFeel.<init>(libgcj.so.70) at javax.swing.UIManager.<clinit>(libgcj.so.70) at java.lang.Class.initializeClass(libgcj.so.70) at com.sun.tools.xjc.installer.Main.setUILookAndFeel(Main.java:83) at com.sun.tools.xjc.installer.Main.main(Main.java:50) Caused by: java.lang.UnsatisfiedLinkError: libgtkpeer: libgtkpeer.so: cannot open shared object file: No such file or directory at java.lang.Runtime._load(libgcj.so.70) at java.lang.Runtime.loadLibrary(libgcj.so.70) at java.lang.System.loadLibrary(libgcj.so.70) at gnu.java.awt.peer.gtk.GtkToolkit.<clinit>(libgcj.so.70) at java.lang.Class.initializeClass(libgcj.so.70) at java.lang.Class.forName(libgcj.so.70) at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70) ...13 more
Also, can the IDE still function normally even though the exception is thrown?
NB 070420 Glassfish: build b41c-beta2 I'm able to reproduce this problem on my ubuntu system. Every drop of any component also throws this error. I deploy the app with the calendar component and it runs fine.
Peter, can you use the suggestion as described in this http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6182905 ? It does sound like the same issue. The suggestion says to not use Toolkit.getDefaultToolkit().getSystemClipboard().addFlavorListener() but it doesn't say what can be used in place of this. Can you catch this particular exception and not to show to error as another option? I'm reassigning this bug to you since you're the owner of the designer and just now raised the related JDK issue to P1. I hope we hear something soon.
*** Issue 95457 has been marked as a duplicate of this issue. ***
Designer doesn't use the flavor listener. I believe it is used by NB code or other code (try to find it).
This issue is now resolved in jdk 1.7.0 ea b7 or later. There is no patch in jdk 1.6 or 1.5 for this issue AFAIK since it's not a serious bug. It shouldn't be a P1 either.
It would be nice if the JDK guys add this fix to JDK 1.5 and 1.6 in the next release because requiring developers use JDK 1.7 which isn't released yet to use Visual Web Pack on Linux without getting an error every single time they drop a component onto a page is serious enough to make me consider not using Visual Web Pack. However, I don't plan on using NB 6 at work until the release candidates, so this may not be an issue by then.
Chau, the code using the flavor listener is core/src/org/netbeans/core/NbClipboard.java (you can grep addFlavorListener to see). If it is the case, depending on the use, maybe that code could avoid the flavor listener usage. At least for the linux platform (especially if it doesn't work).
Can someone in core take a look to see if the suggested workaround is an easy fix for M9? The exception is harmless but quite annoying for Visual web. Every time a component is dropped into the designer, the Warning dialog pops up with this exception. Thanks.
*** Issue 102683 has been marked as a duplicate of this issue. ***
change to P1 because it happens every time when drag and drop a component and it happens on more platforms(ubuntu and solaris).
hlu, please look at the http://qa.netbeans.org/bugzilla/bug_priority_guidelines.html none of there mentioned cases for P1 fits to this issue. This issue is JDK bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511815 fixed in JDK 6.0_u2 (02) & JDK 7.0(09) . If you want them to fix this for JDK 1.5.0, please escalate this bug. (WONTFIX) As I understand it, this happens only if you DnD (drag and drop) component from palette to designer. So if you just select component in palette and click into the designer - does it work ? It works for me NB BigIDE 200704260000 JDK1.5.0_11, Linux (WORKSFORME)
Selecting component in palette and clicking into the designer work. Lower it to P2 because it is a critical usability problem. The NPE seems harmless, so is it possible to catch it and not to throw? or is it possible throw it in the log file so that user does not need to close the NPE window every time drag and drop a component? The NPE also happens when DnD a file from one directory to another directory within a java project.
Tonda already checked in a quick workaround for this and going through nb-tech review of the changes. If things go well with the review, you can verify it using the next NBI build.
Tonda, did I miss something ? Hiding exceptions dialog is the workaround ? Agreed with hiding, but it is not a workaround of this issue! Look at issue 82142 (with bunch of duplicates), also it has been already added to RN for M9 - see issue 97558. *** This issue has been marked as a duplicate of 82142 ***
Using nbi build200704280000. The NPE window does not pop up, and instead a small red dot at right bottom of ide window appears. see attachment for the snapshot.
Created attachment 41934 [details] snapshot
> Tonda, did I miss something ? Hiding exceptions dialog is the workaround ? > Agreed with hiding, but it is not a workaround of this issue! Not a workaround for the issue, but a way to make the functionality demoable with the Preview (M9).
I mistated it. It was not a workaround for the issue. The issue is still there, it's just hidden.