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.
Summary: | NullPointerException at org.netbeans.modules.server.ui.wizard.ServerWizardVisual.isServerValid | ||
---|---|---|---|
Product: | serverplugins | Reporter: | pearl21304 <pearl21304> |
Component: | Infrastructure | Assignee: | Petr Hejl <phejl> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | 1986verma, adminadmin, ahmedmakki, aitorzena, anjushr, annamoto, apotema, ariborneo, atehrani, avithalani, blskyli, buls, bu_final, chanty, charyk, chechunawer, corey1981, csukasl, devendiran, diab1o, donglix, dprasanth, edwardc118, elenanewjersey, ellcyo, emiddio, endre04, gangqiang8710, gianoglio, gncelectronic, gsteyn, halil, hockey9876, hsa, issac23, ivodenwag, jaapbril, javax88, jayrandom, jbecicka, jcachia, jeanyvesmoysan, jega_ms, jleofm, joeuyuni, jungmat, koteshforu, lehoa85, leiyu, leone1983, lfjohn, lifeng9891, locbet, lzgrillo, mal, manujsabarwal, markharrod, markport, maxsap, melling, mm-nb, mzin, netrogerio, Nikita-Gour, non_migrated_user, nuviriu, oithoi, ouribeb930, o_wan_o, pallabi, parampreet17, pecas, pingudownunder, qtviet2000, queresclub, rahulbuzz, ramdvs, ricoriki, rkare, sabob, sandrikov, sergefonville, silvanus, snijkerm, sternix, tchubs, tharangahewa, tjessome, totiyt9317, ubriela, uprooter, vavasthi, vrtata, wakonet, wangke0611, xin3003, zaccarelliasbun, zakan, zarons |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=123180 | ||
Issue Type: | DEFECT | Exception Reporter: | 123180 |
Bug Depends on: | |||
Bug Blocks: | 154624 | ||
Attachments: |
stacktrace
stacktrace stacktrace java.lang.NullPointerException |
Description
pearl21304
2008-10-15 13:56:36 UTC
Created attachment 71855 [details]
stacktrace
Build: NetBeans IDE 6.1 (Build 200805300101) VM: Java HotSpot(TM) Client VM, 14.0-b05, Java(TM) SE Runtime Environment, 1.7.0-ea-b38 OS: Linux, 2.6.24-21-generic, i386 User Comments: Stacktrace: java.lang.NullPointerException at org.netbeans.modules.server.ui.wizard.ServerWizardVisual.isServerValid(ServerWizardVisual.java:155) at org.netbeans.modules.server.ui.wizard.ServerWizardVisual.isValid(ServerWizardVisual.java:146) at java.awt.Component.invalidateIfValid(Component.java:2711) at java.awt.Component.setLocale(Component.java:1780) at javax.swing.JComponent.<init>(JComponent.java:600) at javax.swing.JPanel.<init>(JPanel.java:82) Created attachment 72801 [details]
stacktrace
it looks like this is an issue when the IDE is running in jdk 7.... we may be able to fix this by changing the name of the method isValid, to avoid overriding the java.awt.Component isValid method... which appears to have become a problem. PterH: did you override isValid purpose or was it just coincidental? please comment and re-assign.... this search finds lots of hits that imply that the coding pattern used in ServerWizardVisual.java is error-prone. http://www.google.com/search?q=java+virtual+method+in+constructor Posting my comments from nbdev here in case they are missed: You don't need to file a JDK issue. What's happening is you are implementing WizardDescriptor.Panel over a Component. So your implementation of WizardDescriptor.Panel.isValid() is accidentally overriding Component.isValid(). Depending on the look and feel or JDK it can easily be called from the superclass constructor, before your instance fields are initialized. The fix is not to ever implement WizardDescriptor.Panel directly on a component. I've seen this one enough times that we should probably throw an exception if a wizard ever encounters a panel that *is* a component. It's fairly non-obvious what is wrong, and will appear pretty randomly depending on JDK, etc. this is actually a p2 issue when someone uses jdk 7 builds Integrated into 'main-golden', will be available in build *200812050201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/22651c94d707 User: Vince Kraemer <vkraemer@netbeans.org> Log: #150223: improper override of Component.isValid triggers NPE during panel initialization. I'm disappointed this fix wasn't integrated in the 6.5 Patch2 release. I'm unable to add any server instances in 6.5. So, this is a blocking bug for the Java EE tutorial team (we're targeting 6.5 for the first release of the Java EE 6 Tutorial). This has become a larger problem... it looks like folks using JDK 6 are also running into this. Please consider this for a 6.5 patch 3... if there is one. Please solve this issue. Issue has been already fixed. If you can reproduce it with latest daily build please provide the steps to reproduce. Fix will be part of 65patch3. To the folks that have been bitten by this issue.... try running the IDE under JDK 6 update 10.... It looks like this bug bites those running JDK 7 builds and JDK 6 update 12... HTH To those interested in a workaround of this bug that simply want to add a server: I needed to add the JBoss server to an existing project. In trying to work around this bug, I tried various flavors of JDK 6 and netbeans 6 - all to no avail. I was able to add the server in the latest 20090205 netbeans build; however, when I invoked the latest released netbeans client I have (20081111), the JBoss server was not there, and the 'add server' functionality was, of course, still broken. In order to work around this, I installed netbeans 5.5 and jdk 1.5. I successfully added my JBoss server using netbeans 5.5. Then I ran netbeans 6.5 (20081111), and the JBoss server was there. NOTE: My netbeans 6.5 is currently using the 1.5 jdk (as a result of earlier attempts to work around this bug). Mike Relac A much simpler workaround: Took vkraemer's suggestion, installed JDK 1.6.11 and reinstalled netbeans 6.5, and now the server links and buttons work. Thanks, vkraemer! One more additional note: you should not need to reinstall NetBeans to work-around the issue... You can use the command-line flag --jdkhome to specify the JDK to use for running the IDE... If you want to make that 'permanent', you can change the value of the netbeans_jdkhome variable, which is defined in %NBINSTALL%\etc\netbeans.conf See http://blogs.sun.com/vkraemer/entry/netbeans_jdk_update_12_and for a bit more info. *** Issue 158158 has been marked as a duplicate of this issue. *** *** Issue 158340 has been marked as a duplicate of this issue. *** alexandrerocha: why have you marked this issue as closed... did you mean to mark it as verified? Same fix done for j2eeserver itself - main 3caf7410e83f. If I try to add a new server in NB6.5 and then submit the exception, the analytics site tells me, that the bug is fixed. Which is not true for NB6.5, because no patch containing this fix has been released yet. I am working in manufacturing, and whenever something breaks and causes significant impact (which is true for this issue, as it really affects a lot of users in the field, just wait a bit until users really start to notice 1.6.0_12 and install it in masses), we do a "lesson learned". So what is the NetBeans team doing to avoid such a pitfall in the future? Testing with upcoming releases of the JDK is not a nice to have, but a bare necessity... workaround: Windows and Ubuntu The is only an issue for 6.5 with the 1.6.0_12 JDK release, if you continue to use 1.6.0_11 there is no issue. in <netbeans_install_dir>/etc/netbeans.conf change netbeans_jdkhome="<java_jdk_install>\Java\jdk1.6.0_11". As release 7 is not going to be around until Jun/Jul 2009 a backwards compatible fix needs to be made, otherwise no JDk updates for the next 6 months can be installed, not a good solution at all. I realize that you mean well, but by reopening this issue you have made it certain that the fix will not go into the next patch of 6.5. that is why I am going to mark the issue as fixed... since it is fixed in the trunk... Once QA verifies that the fix is good in the trunk, we can push it into the branch that will be used to create the next patch for 6.5... I am very disappointed。 Because of of this exception, I can not work with netbeans now. When i add a new server,or click the right mouse button on one project,this exception kiss me. why you fixed it in 7.0m1?why not a patch for 6.5? See status whiteboard. By reopening the issue you prevent it to be 65 patch. Integrated into 'main-golden', will be available in build *200902180201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/3caf7410e83f User: phejl@netbeans.org Log: #150223 NullPointerException at org.netbeans.modules.server.ui.wizard.ServerWizardVisual.isServerValid just a note: running Netbeans 6.5 with openjdk 6 is also fine and you are able to add a server and than switch back to sun jdk 6 build 12 (use --jdkhome as suggested above or change netbeans.conf) Is there an estimate on when a patch for NB 6.5 will be available for this issue? This is major usability problem and should be pushed out asap. *** Issue 158942 has been marked as a duplicate of this issue. *** *** Issue 158960 has been marked as a duplicate of this issue. *** *** Issue 159390 has been marked as a duplicate of this issue. *** *** Issue 159393 has been marked as a duplicate of this issue. *** verified in NB6.5.1 with Win Vista and JDK1.6.0_13 *** Issue 159885 has been marked as a duplicate of this issue. *** *** Issue 159964 has been marked as a duplicate of this issue. *** *** Issue 160240 has been marked as a duplicate of this issue. *** *** Issue 160115 has been marked as a duplicate of this issue. *** *** Issue 160217 has been marked as a duplicate of this issue. *** *** Issue 156374 has been marked as a duplicate of this issue. *** Build: NetBeans IDE 6.5 (Build 200811100001) VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04 OS: Windows XP, 5.1, x86 User Comments: Stacktrace: java.lang.NullPointerException at org.netbeans.modules.server.ui.wizard.ServerWizardVisual.isServerValid(ServerWizardVisual.java:155) at org.netbeans.modules.server.ui.wizard.ServerWizardVisual.isValid(ServerWizardVisual.java:146) at java.awt.Component.invalidateIfValid(Component.java:2740) at java.awt.Component.setLocale(Component.java:1810) at javax.swing.JComponent.<init>(JComponent.java:595) at javax.swing.JPanel.<init>(JPanel.java:65) Created attachment 78793 [details]
stacktrace
*** Issue 161962 has been marked as a duplicate of this issue. *** How to fix this issue please update date me on this. use the update center or download NB 6.5.1 reopening an issue is not an appropriate method to ask this kind of question. Please use nbusers@netbeans.org in the future. *** Issue 162130 has been marked as a duplicate of this issue. *** *** Issue 170285 has been marked as a duplicate of this issue. *** *** Issue 171530 has been marked as a duplicate of this issue. *** this issue is not fixed in my view --- i filed a bug report that was marked as a duplicate of this one; the substance of the report is pasted below; this issue affects all netbeans versions 6.1 and earlier -- please read the rest of my report; you developers seem to have the luxury of not caring about backward compatability -- most real work is done with older tools -- rather than bleeding edge ones. many times newer releases of netbeans break old features -- they should continue to work; thats a reason to not by into unit testing -- since no one is writing unit tests for bug fixes to validate newer code. like i say below -- this is either a very old bug -- and apparently will not be fixed for older releases of netbeans -- or its a JDK 1.6.05++ bug -- since the bug does not exist if using jdk1.6.05 or earlier. if its not going to be fixed(for earlier netbeans version users) -- then it should be pointed out to reporters that jdk1.6.0_5 or earlier will fix the issue. *** This issue has been marked as a duplicate of 150223 *** ------- Additional comments from emiddio Fri Sep 4 21:07:14 +0000 2009 ------- have tested with netbeans 5.0, 5.5, 5.5.1 6.0.1, 6.1, 6.5.1, 6.7.1 will not test with netbeans 4.1 -- since netbeans 4.1 will not work correctly with any jdk1.6.x. only nb6.5.1 and nb6.7.1 will work with jdk1.6.0_16 for add server plugin nb 5.0 thru 6.1 will fail; if i change them to jdk1.6.0_05 they all work -- execpt nb4.1 wont work with jdk6 maybe this should be a jdk bug? since the jdk breaks all the older releases of netbeans *** Issue 173217 has been marked as a duplicate of this issue. *** *** Issue 175174 has been marked as a duplicate of this issue. *** *** Issue 175730 has been marked as a duplicate of this issue. *** Created attachment 99108 [details]
java.lang.NullPointerException
An error occurs when adding a new server for NetBeans 5.5.1 is error java.lang.NullPointerException
*** Bug 212155 has been marked as a duplicate of this bug. *** *** Bug 217117 has been marked as a duplicate of this bug. *** |