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.
Build: NetBeans IDE 6.8 Beta (Build 200910212001) VM: Java HotSpot(TM) 64-Bit Server VM, 14.1-b02-90, Java(TM) SE Runtime Environment, 1.6.0_15-b03-219 OS: Mac OS X, 10.6.2, x86_64 User Comments: GUEST: try to create new file with restful webservice and select tables add all then occured carljmosca: RESTful web services from database Stacktrace: java.lang.NullPointerException at org.netbeans.modules.websvc.rest.support.DOMHelper.findElement(DOMHelper.java:134) at org.netbeans.modules.websvc.rest.support.PersistenceHelper.getPersistenceUnit(PersistenceHelper.java:101) at org.netbeans.modules.websvc.rest.wizard.Util.getPersistenceUnit(Util.java:421) at org.netbeans.modules.websvc.rest.wizard.fromdb.DatabaseTablesWizardPanel.isValid(DatabaseTablesWizardPanel.java:98) at org.openide.WizardDescriptor.updateStateOpen(WizardDescriptor.java:907) at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:851)
Created attachment 91060 [details] stacktrace
The issue seem to be rather serious. I got another exception: java.lang.NullPointerException at org.netbeans.modules.websvc.rest.codegen.model.TypeUtil.getSimpleAnnotationValues(TypeUtil.java:160) at org.netbeans.modules.websvc.rest.codegen.model.TypeUtil.getAnnotationValueName(TypeUtil.java:175) at org.netbeans.modules.websvc.rest.wizard.fromdb.DatabaseResourceWizardIterator.getEntities(DatabaseResourceWizardIterator.java:422) at org.netbeans.modules.websvc.rest.wizard.fromdb.DatabaseResourceWizardIterator.generate(DatabaseResourceWizardIterator.java:268) at org.netbeans.modules.websvc.rest.wizard.fromdb.DatabaseResourceWizardIterator.access$000(DatabaseResourceWizardIterator.java:109) at org.netbeans.modules.websvc.rest.wizard.fromdb.DatabaseResourceWizardIterator$1.run(DatabaseResourceWizardIterator.java:168) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1084) Caused: org.openide.util.RequestProcessor$FastItem: task failed due to
Fixed. See: http://hg.netbeans.org/main/rev/0a8c4d8f917
Integrated into 'main-golden', will be available in build *200911170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/0a8c4d8f9170 User: mkuchtiak@netbeans.org Log: #176866: display warning if persistence unit is broken, resolve annotations from runUserActionTask
v. in 6.8
(In reply to comment #5) > v. in 6.8 Tested...very nice and thanks much for such a fast reply and fix!!
I am not sure if this is an NB or the GAE plugin issue but the code which is generated when the "RESTful Web Services from Database" is done for apps which use the Google App Engine, the code which is generated in the PersistenceService.java file uses javax.naming.InitialContext which is not available on the Google App Engine. I think the required/valid generated code should be something like this: EntityManagerFactory emf = Persistence.createEntityManagerFactory("PERSISTENCE_UNIT_NAME"); EntityManager em = emf.createEntityManager();