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 214662 - NullPointerException at org.netbeans.modules.websvc.rest.codegen.JavaEE6EntityResourcesGenerator.generate
Summary: NullPointerException at org.netbeans.modules.websvc.rest.codegen.JavaEE6Entit...
Status: RESOLVED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Denis Anisimov
URL:
Keywords:
: 217977 218743 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-23 16:41 UTC by Exceptions Reporter
Modified: 2012-09-21 09:41 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 189968


Attachments
stacktrace (429 bytes, text/plain)
2012-06-23 16:41 UTC, Exceptions Reporter
Details
stacktrace (429 bytes, text/plain)
2012-09-06 00:59 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2012-06-23 16:41:39 UTC
This bug was originally marked as duplicate of bug 206609, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201206230002)
VM: Java HotSpot(TM) Client VM, 20.5-b03, Java(TM) SE Runtime Environment, 1.6.0_30-b12
OS: Windows Vista

User Comments:
GUEST: generate a rest ws from entity bean

GUEST: When trying to create rest services from entity classes it fails silently




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.websvc.rest.codegen.JavaEE6EntityResourcesGenerator.generate(JavaEE6EntityResourcesGenerator.java:78)
   at org.netbeans.modules.websvc.rest.wizard.EntityResourcesIterator$1.run(EntityResourcesIterator.java:165)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1452)
   at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2032)
Comment 1 Exceptions Reporter 2012-06-23 16:41:44 UTC
Created attachment 121253 [details]
stacktrace
Comment 2 Denis Anisimov 2012-09-04 12:15:50 UTC
Please provide exact steps to reproduce.
NPE is a result of some parsing issue and data is required to identify 
it's reason.
Comment 3 David Konecny 2012-09-06 00:59:03 UTC
Created attachment 123969 [details]
stacktrace

I generated services for all entity classes and then removed all services and tried to generate service for single entity only (I'm using Jersey libraries)
Comment 4 Exceptions Reporter 2012-09-06 00:59:14 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=189968
Comment 5 Denis Anisimov 2012-09-07 09:43:25 UTC
*** Bug 217977 has been marked as a duplicate of this bug. ***
Comment 6 Denis Anisimov 2012-09-07 10:23:55 UTC
web-main#bc56d723b02a
Comment 7 Denis Anisimov 2012-09-07 10:31:33 UTC
I'm able to reproduce the issue but it requires very specific source data:
I've deleted all generated services as David suggest.
Also I've deleted all entities except one.
In the result I had a compilation error because there is a reference to dropped 
entity.
Such reference introduces the unresolved closure for the entity and this is the 
reason of NPE.
I can't imagine the other cases where the unresolved entities are discovered.
Comment 8 Quality Engineering 2012-09-08 02:06:02 UTC
Integrated into 'main-golden', will be available in build *201209080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bc56d723b02a
User: Denis Anisimov <ads@netbeans.org>
Log: Fix for BZ#214662 - NullPointerException at org.netbeans.modules.websvc.rest.codegen.JavaEE6EntityResourcesGenerator.generate
Comment 9 Denis Anisimov 2012-09-21 09:41:18 UTC
*** Bug 218743 has been marked as a duplicate of this bug. ***