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.
web.xml added to project for Jersey REST web service uses classes from com.sun.jersey package which are not available in GlassFish 4. To reproduce: - create web project with GlassFish 4 - 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" - click Finish - try to deploy project but it fails with message Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer. Please see server.log for more details. Product Version: NetBeans IDE 7.3 (Build 201302132200) Java: 1.7.0_17; Java HotSpot(TM) 64-Bit Server VM 23.7-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b02 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
This is GlassFish 4 compatibility issue. I was just talking to Jersey team about <servlet> <servlet-name>ServletAdaptor</servlet-name> <servlet-class> com.sun.jersey.spi.container.servlet.ServletContainer </servlet-class> <load-on-startup>1</load-on-startup> </servlet> and looks like this works only in Glassfish 3. It may be also problem if those samples are for both Glassfish 3 and 4 because it was changed in GlassFish 4.
*** Bug 228187 has been marked as a duplicate of this bug. ***
In GF4 Jersey 2.0 is used and it is not backward compatible. The web.xml for Jersey 2.0 should use org.glassfish.jersey.servlet.ServletContainer API instead.
Jakub, what happened to configuration parameters like com.sun.jersey.api.json.POJOMappingFeature in Jersey 2.0? Are they just renamed to org.glassfish.*?
Some small progress in ddd2013086f1 but not complete. There will be more work necessary once I know how things supposed to work in Jersey 2.0.
*** Bug 227718 has been marked as a duplicate of this bug. ***
BTW, why is this a 73patch-candidate? GF 4 is not supported in NB 7.3.
Although GlassFish 4 is not supported it is possible to register it. And my understanding was 7.3.1 will be patch release of 7.3.
Regarding parameters, there were some more changes then just renaming, and we still do not have everything documented (docs should be improved with the next Jersey 2 release). Jersey 2 takes advantage of the new JAX-RS 2.0 API in order to configure certain things. Regarding JSON, (please note that we recommend MOXy providers for Jersey 2 in GF), there you need to rely on the following feature: http://jersey.java.net/nonav/apidocs/snapshot/jersey/org/glassfish/jersey/moxy/json/MoxyJsonFeature.html I.e. you register the above feature with your application.
> And my understanding was 7.3.1 will be patch release of 7.3. From this standpoint, you are right. But after all, all P1-P2 bugs must be fixed in 7.3.1 anyway.
In pre 7.3.1 there was nothing to check that GlassFish version is >= 4.0 so wizard allows to register it.
Re patch - the amount of changes to support this is quite big and spans several modules. Fixing this in 7.3.1. should be sufficient. If not I would suggest to simply disallow GF 4.0 or something like that. few more changes: b9e7bf4d4436, 20524852e86d While I fixed this particular issue I need to look more thoroughly at the code and review it and possibly find other cases to fix.
For Java EE 7 project it works. The check box "Use Jersey specific feature" is gone which is intended as I suspect. For Java EE 5 and 6 project I filed a new bug 228369.
So, where exactly is this issue fixed ? Is it already in release73 repository ? If so, please change SW to '73patch2-fixed', If not, please backport the fix into release73 ASAP Thanks in advance.
This was resolved as part of EE7 work for 7.3.1.