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 227718 - Wrong web.xml for REST samples and GlassFish 4
Summary: Wrong web.xml for REST samples and GlassFish 4
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks: 244109
  Show dependency tree
 
Reported: 2013-03-20 13:03 UTC by Jiri Skrivanek
Modified: 2014-04-27 15:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2013-03-20 13:03:35 UTC
Similar to bug #227712. web.xml in Hello World sample and other samples uses classes from com.sun.jersey package which are not available in GlassFish 4. To reproduce:

- register GlassFish 4 to IDE
- open new project wizard
- choose "Samples|Web Services|REST: Hello World" and click Next
- click Next
- 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)
Comment 1 David Konecny 2013-04-04 04:02:30 UTC
This should get resolved as part of the issue 227712.

*** This bug has been marked as a duplicate of bug 227712 ***
Comment 2 Jiri Skrivanek 2013-04-08 11:01:37 UTC
Not fixed in web-main-javaee7-216-on-20130408.
Comment 3 David Konecny 2013-04-18 02:55:56 UTC
ee95eae9997c

I removed explicit Jersey servlet from web.xml as vanilla JAX-RS can be used from the samples. I updated some very dated code used in samples.

The Spring example was not updated as I have no idea what is the replacement for com.sun.jersey.spi.spring.container.servlet.SpringServlet in Jersey 2.0
Comment 4 Jiri Skrivanek 2013-04-18 08:55:13 UTC
Verified in javaee7 build 240. I filed bug 228683 and 228684 for remaining samples.
Comment 5 Quality Engineering 2013-04-23 00:08:55 UTC
Integrated into 'releases', will be available in build *201304222201* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/ee95eae9997c
User: David Konecny <dkonecny@netbeans.org>
Log: #227718 - Wrong web.xml for REST samples and GlassFish 4
Fixing sample projects by removing explicit dependency on Jersey - regular JAX-RS is sufficient in all cases. Also regenerating some very dated code.
Comment 6 Quality Engineering 2013-04-23 02:12:06 UTC
Integrated into 'main-golden', will be available in build *201304222301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/ee95eae9997c
User: David Konecny <dkonecny@netbeans.org>
Log: #227718 - Wrong web.xml for REST samples and GlassFish 4
Fixing sample projects by removing explicit dependency on Jersey - regular JAX-RS is sufficient in all cases. Also regenerating some very dated code.
Comment 7 Marian Mirilovic 2013-05-03 11:18:36 UTC
It is already fixed in release73, isn't it ?
Comment 8 David Konecny 2013-05-05 19:18:04 UTC
Yes, this is the same case as issue 227712 and was resolved as part of EE7 support.