Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 177557 - Jersey library not detected and used when available
Jersey library not detected and used when available
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9
PC Windows XP
: P2 (vote)
Assigned To: Vince Kraemer
Depends on:
  Show dependency treegraph
Reported: 2009-11-25 01:01 UTC by michbarsinai
Modified: 2010-01-25 06:29 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT

Log file of glassfish (324.54 KB, application/x-itunes-itlp)
2009-11-25 01:01 UTC, michbarsinai

Note You need to log in before you can comment on or make changes to this bug.
Description michbarsinai 2009-11-25 01:01:47 UTC
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.
Comment 1 michbarsinai 2009-11-25 01:47:11 UTC
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.

Comment 2 Vince Kraemer 2009-11-25 08:22:24 UTC
corrected the component value...
Comment 3 Vince Kraemer 2009-11-25 08:24:54 UTC
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.
Comment 4 Vince Kraemer 2009-11-25 09:43:51 UTC
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?
Comment 5 Vince Kraemer 2009-11-25 11:37:43 UTC
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>
  + Applications
    + Enterprise Applications
      + eBill

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, I assume there is a bug somewhere.
Comment 6 Vince Kraemer 2009-11-25 13:38:59 UTC
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.
Comment 7 Vince Kraemer 2009-11-25 13:39:57 UTC
raising to p2 so it can get considered for inclusion in 6.8 patch 1.
Comment 9 Quality Engineering 2009-11-28 14:23:18 UTC
Integrated into 'main-golden', will be available in build *200911281400* on (upload may still be in progress)
User: vince kraemer <>
Log: #177557: update Jersey library detection
Comment 10 pgebauer 2010-01-20 04:11:01 UTC
The fix has been ported into the release68_fixes repository.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo