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 143053 - [65cat] NullPointerException at org.netbeans.modules.j2ee.sun.share.configbean.SunONEDeploymentConfiguration.getMessageDestinations
Summary: [65cat] NullPointerException at org.netbeans.modules.j2ee.sun.share.configbea...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: David Konecny
URL: http://statistics.netbeans.org/except...
Keywords:
: 143054 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-06 14:08 UTC by rajivderas
Modified: 2009-10-16 00:26 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 87160


Attachments
stacktrace (1.11 KB, text/plain)
2008-08-06 14:08 UTC, rajivderas
Details
stacktrace (1.11 KB, text/plain)
2008-08-06 14:46 UTC, rajivderas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rajivderas 2008-08-06 14:08:36 UTC
Build: NetBeans IDE Dev (Build 200808060201)
VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b21
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.j2ee.sun.share.configbean.SunONEDeploymentConfiguration.getMessageDestinations(SunONEDeploymentConfiguration.java:351)
        at org.netbeans.modules.j2ee.sun.ide.j2ee.ModuleConfigurationImpl.getMessageDestinations(ModuleConfigurationImpl.java:275)
        at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getMessageDestinations(ConfigSupportImpl.java:480)
        at org.netbeans.modules.j2ee.ejbcore.ejb.wizard.mdb.MessageDestinationUiSupport$1.run(MessageDestinationUiSupport.java:96)
        at org.netbeans.modules.j2ee.core.api.support.progress.ProgressSupport$ActionInvoker.invokeNextActionsOfSameKind(ProgressSupport.java:267)
        at org.netbeans.modules.j2ee.core.api.support.progress.ProgressSupport$ActionInvoker.access$100(ProgressSupport.java:115)
Comment 1 rajivderas 2008-08-06 14:08:55 UTC
Created attachment 66692 [details]
stacktrace
Comment 2 rajivderas 2008-08-06 14:11:56 UTC
*** Issue 143054 has been marked as a duplicate of this issue. ***
Comment 3 rajivderas 2008-08-06 14:45:48 UTC
Build: NetBeans IDE Dev (Build 200808060201)
VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b21
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.j2ee.sun.share.configbean.SunONEDeploymentConfiguration.getMessageDestinations(SunONEDeploymentConfiguration.java:351)
        at org.netbeans.modules.j2ee.sun.ide.j2ee.ModuleConfigurationImpl.getMessageDestinations(ModuleConfigurationImpl.java:275)
        at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getMessageDestinations(ConfigSupportImpl.java:480)
        at org.netbeans.modules.j2ee.ejbcore.ejb.wizard.mdb.MessageDestinationUiSupport$1.run(MessageDestinationUiSupport.java:96)
        at org.netbeans.modules.j2ee.core.api.support.progress.ProgressSupport$ActionInvoker.invokeNextActionsOfSameKind(ProgressSupport.java:267)
        at org.netbeans.modules.j2ee.core.api.support.progress.ProgressSupport$ActionInvoker.access$100(ProgressSupport.java:115)
Comment 4 rajivderas 2008-08-06 14:46:03 UTC
Created attachment 66702 [details]
stacktrace
Comment 5 _ pcw 2008-08-08 20:07:33 UTC
To anyone who submitted this exception report: 

What were you doing when this happened?  (wizard? which one?  insert code action?  which one?  Services/runtime tab?  etc.)

What project type do you have and what JavaEE version is it?

What is the current selected server for your project?
Comment 6 rajivderas 2008-08-08 20:25:34 UTC
happened in - Send jms message dialog
insert code action = "send jms message"
project type - java EE ejb module Project 
JavaEE version - javaee5
selected server - v3 prelude
Comment 7 _ pcw 2008-08-08 21:07:50 UTC
How did you manage to select GlassFish V3 Prelude as a candidate server for an EJB Module project in the first place?

That's not supposed to be possible.
Comment 8 rajivderas 2008-08-08 21:22:47 UTC
I know that GlassFish V3 Prelude is blocked for ejb for the moment but at the time i came up with this error i didnt
know that but if u want to reproduce it just open a ejb module project and register GlassFish V3 Prelude and remove v2
node from server register and then try to use insert code action to "send jms message"
Comment 9 _ pcw 2008-08-08 21:32:59 UTC
I had V2 UR2 and V3 Prelude installed as servers.
I have an EJB Module project using V2 open.
Inside the EJB Module project, I can only select V2 as the server (good).
If I remove V2, the module turns red (unresolved server).
Project | Properties | Run does not show any available servers that can be selected.
Project | Resolve Missing Server does not show any available servers either.

Can you tell me if you can reproduce this (getting V3 as selected server for ejb module) and how to do it?
Comment 10 rajivderas 2008-08-08 21:43:55 UTC
What i did was i had v3 as my server and their was the missing server notification as well.
I didn't try to deploy it since i cannot register v3.
What i did was just using the insert code action to get the send jms message dialog
Comment 11 _ pcw 2008-08-08 21:52:25 UTC
Once V3 is the selected server, it makes sense that Insert Code would allow actions that are not supported (such as this
one).

What I'm trying to figure out is the process by which you were able to select (or cause the IDE to select) V3 as the
server for an EJB Module.  I'm not able reproduce any mechanism for this.

Do you remember how you did it?  Can you reproduce what the steps are?
Comment 12 rajivderas 2008-08-08 22:11:25 UTC
forget about v3 server just open the ejb module project and try to perform insert action to "send jms message" 
Comment 13 _ pcw 2008-08-08 23:02:57 UTC
Thanks, got it.  <Send JMS> when there is no (resolved) server will reproduce this.
Comment 14 _ pcw 2008-08-09 01:09:36 UTC
NPE is fixed

http://hg.netbeans.org/main?cmd=changeset;node=d1bd1f7f6723

However, this scenario should never have happened.  Transferring issue to j2eeserver for proper resolution.

To demonstrate:

Add GlassFish V2 (likely any other full JavaEE server, e.g. JBoss)
Create new EJB module project and create some java file, e.g. Session bean or something.
Remove the Server (module will turn red due to unresolved server)

Now open the aforementioned java file and in some valid context, right click in the editor and select <Insert Code...>

The menu will show the JavaEE context items supported by the previously available server (call JMS, EJB, Mail, etc) 
They will not work properly, though I don't think there are anymore _visible_ exceptions (plenty in messages.log though).

The reason these menu items won't work properly is because they rely on a valid server context for information and since
the server is unresolved, there isn't one.  In several cases, this aspect isn't properly accounted for.

I see a few different solutions:

1) Don't show these menu items when server is unresolved
2) Show the menu items, but if they are used, put up a message box indicating a valid server must be selected to use
that action
3) If the action can run in some form (even a useless form) without a server, let it do that, but be sure to post
messages of all errors encountered -- e.g. if the user invokes SendJMS and tries to add a Message Destination, it fails,
but no notification is ever displayed of this failure.)

My preference is for #2.  #1 negatively impacts discoverability and #3 is downright confusing.

Reassigning to j2eeserver.
Comment 15 _ pcw 2008-08-09 01:11:17 UTC
Wrong diff for fix shown above, here is the correct one.

http://hg.netbeans.org/main?cmd=changeset;node=8ed9db47c389
Comment 16 Quality Engineering 2008-08-09 15:36:28 UTC
Integrated into 'main-golden', available in build *200808091401* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/8ed9db47c389
User: pcw@netbeans.org
Log: #143053 fixed NPE when invoking <call JMS> inside an ejb module project after target server was removed (and is therefore unresolved)
Comment 17 Vince Kraemer 2008-09-04 00:05:33 UTC
symptom from serverplugin.... root cause seems to be in j2eeserver. please evaluate
Comment 18 _ jyothivasa 2008-11-17 22:06:41 UTC
Changing the component to j2eeserver for further evaluation.
Comment 19 Vince Kraemer 2008-12-02 20:13:00 UTC
none of these TM values are valid at this point
Comment 20 Petr Hejl 2009-10-14 16:09:29 UTC
It is a project thing imo.
Comment 21 David Konecny 2009-10-16 00:26:51 UTC
No other exception reports since 2008-08-06. Most likely fixed by pcw.