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.
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)
Created attachment 121253 [details] stacktrace
Please provide exact steps to reproduce. NPE is a result of some parsing issue and data is required to identify it's reason.
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)
This bug already has 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=189968
*** Bug 217977 has been marked as a duplicate of this bug. ***
web-main#bc56d723b02a
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.
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
*** Bug 218743 has been marked as a duplicate of this bug. ***