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.
Created attachment 133366 [details] Stack trace from Java EE 5 project. It is not possible to create REST services in Java EE 5,6 project with GlassFish 4. To reproduce: - create web project with GlassFish 4 (Java EE 5 or 6) - open new file wizard - choose "Web Services|RESTful Web Services from Patterns" and click Next - click Next - provide package name - select "Use Jersey specific feature" (for Java EE 6) - confirm REST Resources Configuration dialog {for Java EE 5) - click Finish - it sometimes creates web service, sometimes not and if project is deployed service is not available. The following exception is thrown (see also attachment for stack trace when creating service in Java EE 5 project): java.lang.IllegalStateException: this should not be needed! at org.netbeans.modules.websvc.rest.spi.WebRestSupport.addResourceConfigToWebApp(WebRestSupport.java:641) at org.netbeans.modules.websvc.rest.spi.WebRestSupport.configRestPackages(WebRestSupport.java:1086) at org.netbeans.modules.websvc.rest.spi.WebRestSupport.configure(WebRestSupport.java:574) [catch] at org.netbeans.modules.websvc.rest.wizard.PatternResourcesIterator$1.run(PatternResourcesIterator.java:153) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1454) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2048)
The same problem is also in Maven projects. java.lang.IllegalStateException: this should not be needed! at org.netbeans.modules.websvc.rest.spi.WebRestSupport.addResourceConfigToWebApp(WebRestSupport.java:641) at org.netbeans.modules.maven.jaxws.MavenProjectRestSupport.ensureRestDevelopmentReady(MavenProjectRestSupport.java:134) [catch] at org.netbeans.modules.websvc.rest.wizard.PatternResourcesIterator.instantiate(PatternResourcesIterator.java:124)
This should be resolved now. There were many changes which contributed to resolution of this problem. web-main#c9cfd3e372ce web-main#c1db726d58c7 web-main#d64660cdfb26
Verified in javaee7 build 240. Filed bug 228688 for Maven EE 5 project.