Created attachment 91646 [details]
Log file of glassfish
Deploying an .ear project to a Glassfish 2.1. The deployment of the .war part fails (can't find the JAX-RS jars) but NetBeans reports success.
I'm using the Jersey lib for some REST-based WS in the war. The jars are marked for packaging in the project details tab, and are indeed packed in the .ear.
When building the -ejb and the -war modules separately, and deploying them using the web ui, they deploy fine.
Also, the Glassfish is "Sun GlassFish Enterprise Server v2.1 (9.1.1) (build b60e-fcs)", not Glassfish 3.
corrected the component value...
is there a set of steps that I should follow to recreate this problem? It is a lot easier to fix your particular issue, if I know exactly how to reproduce your situation.
I need to have you answer some questions for me, so I can make progress evaluating this issue:
1. have you turned off deploy-on-save?
2. have you turned off directory deployment?
3. Are you using the 'Deploy' item from the right-click menu on the ear project to do the deployment?
OK. I have been able to reproduce the deployment errors that you are seeing.
The following steps resolve the issue for me...
1. undeploy the ear file.
I used the Undeploy item from the right click menu of the node that represents the ear that you find in the Services explorer window. The path to that node is (probably)
+ <name of server>
+ Enterprise Applications
2. stop the server
3. use the update tool to install Jersey support on the server...
i. start the updatetool
<GF Install Dir>/updatecenter/bin/updatetool
ii. go to the Available Software tab
iii. select Jersey (RESTful Web Services), version 1.1.4
iv. Press the install button
4. restart the server.
5. The deploy operation should not trigger 'java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer'
Since I do not see any notes about this in http://netbeans.org/kb/docs/websvc/rest.html, I assume there is a bug somewhere.
there are a couple bugs here...
1. The serverplugin should detect the presence of the jersey jars if they are installed on the server. It looks like folks added code to do that but did not update it recently. I can probably get this resolved for nb 6.8 patch 1. So, will escalate this issue to be a p2...
2. It looks like the web app project has jersey-server-1.1.4.jar in the list of libraries for the project. That jar is not getting put in the ear file. Most of the other jars that are part of a library end up in the lib directory of the ear file. I opened bug 177629 to track the problem.
raising to p2 so it can get considered for inclusion in 6.8 patch 1.
http://hg.netbeans.org/web-main/rev/96ad3d7edb0f for https://netbeans.org/bugzilla/show_bug.cgi?id=177557#c6, item 1.
Integrated into 'main-golden', will be available in build *200911281400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: vince kraemer <firstname.lastname@example.org>
Log: #177557: update Jersey library detection
The fix has been ported into the release68_fixes repository.