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 159095 - NullPointerException at com.sun.tools.javac.model.JavacElements.getTypeElement
Summary: NullPointerException at com.sun.tools.javac.model.JavacElements.getTypeElement
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@profiler
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-24 19:09 UTC by baffyofdaffy
Modified: 2009-03-17 08:30 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 146686


Attachments
stacktrace (10.45 KB, text/plain)
2009-02-24 19:09 UTC, baffyofdaffy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description baffyofdaffy 2009-02-24 19:09:17 UTC
Build: NetBeans IDE Dev (Build 200812180001)
VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Windows XP, 5.1, x86

User Comments:
baffyofdaffy: OK, I just already sent this report once, but I also found that not only checking the box caused the NPE but I could not get the plus sign next to the project (in the root methods area) to expand or blink or anything. It just stuck. I tried with the keyboard also



Stacktrace: 
java.lang.NullPointerException
        at com.sun.tools.javac.model.JavacElements.getTypeElement(JavacElements.java:154)
        at com.sun.tools.javac.model.JavacElements.getTypeElement(JavacElements.java:62)
        at org.netbeans.modules.profiler.j2ee.selector.nodes.web.servlet.ServletsNode$Children$1.run(ServletsNode.java:132)
        at org.netbeans.modules.profiler.j2ee.selector.nodes.web.servlet.ServletsNode$Children$1.run(ServletsNode.java:125)
        at org.netbeans.api.java.source.JavaSource$MimeTask.run(JavaSource.java:513)
        at org.netbeans.modules.parsing.api.ParserManager$MimeTaskAction.run(ParserManager.java:172)
Comment 1 baffyofdaffy 2009-02-24 19:09:30 UTC
Created attachment 77315 [details]
stacktrace
Comment 2 baffyofdaffy 2009-02-25 13:12:07 UTC
"Product feature doesn't work, a workaround may exist but it's difficult to use or impractical"??
Comment 3 Dusan Balek 2009-03-12 14:00:20 UTC
'null' value should not be passed to Elements.getTypeElement(...). Reassigning.
Comment 4 J Bachorik 2009-03-12 16:49:06 UTC
Partially caused probably by a misconfiguration of web.xml.
Fixed by adding sanity checks before calling Elements.getElementType

http://hg.netbeans.org/profiler-main/rev/01f15a67975c
Comment 5 Quality Engineering 2009-03-17 08:30:42 UTC
Integrated into 'main-golden', will be available in build *200903170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/01f15a67975c
User: Jaroslav Bachorik <yardus@netbeans.org>
Log: #159095 - preventing NPE when calling JavacElements.getTypeElement()