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 193718 - NullPointerException: The fo parameter cannot be null
Summary: NullPointerException: The fo parameter cannot be null
Status: VERIFIED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Ide (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-22 03:38 UTC by David Konecny
Modified: 2011-01-09 23:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 175249


Attachments
stacktrace (11.45 KB, text/plain)
2010-12-22 03:38 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2010-12-22 03:38:26 UTC
Build: NetBeans IDE Dev (Build 101216-e2ba331bdf10)
VM: Java HotSpot(TM) 64-Bit Server VM, 17.1-b03, Java(TM) SE Runtime Environment, 1.6.0_22-b04
OS: Linux

Stacktrace: 
java.lang.NullPointerException: The fo parameter cannot be null
   at org.openide.util.Parameters.notNull(Parameters.java:89)
   at org.netbeans.modules.j2ee.dd.api.web.DDProvider.getDDRoot(DDProvider.java:114)
   at org.netbeans.modules.profiler.j2ee.selector.nodes.web.servlet.ServletsNode$Children.enumerateServlets(ServletsNode.java:119)
   at org.netbeans.modules.profiler.j2ee.selector.nodes.web.servlet.ServletsNode$Children.prepareChildren(ServletsNode.java:107)
   at org.netbeans.modules.profiler.j2ee.selector.nodes.web.servlet.ServletsNode$Children.prepareChildren(ServletsNode.java:83)
   at org.netbeans.modules.profiler.selector.spi.nodes.SelectorChildren.getNodes(SelectorChildren.java:112)
Comment 1 David Konecny 2010-12-22 03:38:29 UTC
Created attachment 104380 [details]
stacktrace
Comment 2 Tomas Hurka 2010-12-22 10:22:40 UTC
Can you provide steps how to reproduce it? Thanks.
Comment 3 David Konecny 2010-12-22 20:37:27 UTC
Sorry, here they are:
I have EJB project and Web Project open in the IDE. I open a test from EJB project in editor and Profile -> Profile Other -> Profile MyTest.java -> Part of application -> Define -> Add From project. Now you should see EJB View and EJB project; tick the project and tick Show All Projects -> exception. And you can see that EJB Project was removed from the list and replaced with Web project and selected view is "Web Applications View". HTH.
Comment 4 J Bachorik 2011-01-07 14:02:51 UTC
Couldn't reproduce it on my EJB and Web apps. Probably depends on a particular configuration.
However, the main reason seems to be the fact that JavaEE infrastructure happily provides "null" values as deployment descriptors where asked for them through API.

Adding a small sanity check not to accept those null values in the profiler code - http://hg.netbeans.org/profiler-main/rev/2af64bbb1481
Comment 5 Quality Engineering 2011-01-09 06:23:55 UTC
Integrated into 'main-golden', will be available in build *201101090000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/2af64bbb1481
User: Jaroslav Bachorik <yardus@netbeans.org>
Log: #193718: Do not try to process "null" deployment descriptors returned by the JavaEE infrastructure
Comment 6 David Konecny 2011-01-09 23:12:23 UTC
Tested with your fox and it works fine now. Thanks.

Not sure about nulls - it is valid from EE 6 to not have deployment descriptor files (and use annotations instead).