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 217977

Summary: Adding a new Web RESTful Service
Product: webservices Reporter: saga995
Component: RESTAssignee: Denis Anisimov <ads>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 7.2   
Hardware: PC   
OS: Windows Vista   
Issue Type: DEFECT Exception Reporter:

Description saga995 2012-09-07 08:41:50 UTC
Sometimes when I add RESTful Web services from database in my NetBeans' Web Application project, the JPA Controller and REST Facade are not creating, only the entity class is added. 
I am mapping table by table, because the database is quite big and when I try to add all at once something goes wrong and the REST Facades are not created. So when I create a new REST service from a table that is not connected with others - everything is ok. But when the table is connected with others that I already added earlier and they need to be updated - only the entity class is created, there is no REST Facade.

Netbeans returns an exception:

java.lang.NullPointerException
    at org.netbeans.modules.websvc.rest.codegen.EntityResourcesGenerator.generate(EntityResourcesGenerator.java:175)
[catch] at org.netbeans.modules.websvc.rest.wizard.EntityResourcesIterator$1.run(EntityResourcesIterator.java:130)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1411)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1991)



Please, help me, I can't map my database.
Comment 1 Denis Anisimov 2012-09-07 09:08:06 UTC
It's too generic description.
I can't realize what's the problem based only on NPE.
Please provide detailed steps to reproduce with tables description.
Comment 2 Denis Anisimov 2012-09-07 09:43:25 UTC
OK, I've found the reason of NPE .
It is a consequence of unresolved table dependencies.
I don't know how it happens in your specific case ( why such unresolved 
dependencies exist ) but this is the same issue as #214662.

*** This bug has been marked as a duplicate of bug 214662 ***