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 91701 [details] a project that demonstrates the problem tested against clean build of release68 clone, pulled 2009-11-25 11:43 am PST steps to reproduce 0. start the IDE with a new userdir. 1. register GF v2.1 2. create an ear that includes a web app that targets the server registered in step 1. 3. Add the Jersey 1.1 and JAX-RS 1.1 libraries to the web app project. Verify that the Package check box is 'ticked' for both libraries in the project properties dialog. 4. clean and build the ear project. If you look in the lib directory of the EAR file, the jar jersey-server-1.1.4.jar is missing.... this seems to cause the ClassNotFound reported by the server in bug 177557. 5. if you clean and build the war file for stand-alone deployment (right-click Clean and Build on the web app project's node) the jersey-server-1.1.4.jar is included in the war file, as expected.
jersey-server-1.1.4.jar is copied to WEB-INF/lib folder in WAR instead of EAR's lib folder. Reason for that is that jersey-server-1.1.4.jar contains TLD file. I don't know why but that's how it's been for a while - copyfiles Ant task has dedicated attribute to set destination in case JAR file contains TLD file, eg.: <copyfiles files="${libs.restlib.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/> Unfortunately, fix for bug 173195 (http://hg.netbeans.org/web-main/rev/3bc2aa4358cb) causes that jersey-server-1.1.4.jar is removed from WEB-INF/lib. I'm going to resolve this by amending fix for 173195 to preserve jersey-server-1.1.4.jar there. That should resolve ClassNotFound exception.
ab1ce87afb23 Target "-clean-webinf-lib" was running too late and was causing removal of WEB-INF/lib folder after libraries were copied there.
I verify that the fix does preserve the inclusion of jersey-server-1.1.4.jar in the war's lib directory
Increasing priority to resolve this for 68. For users with this setup this issue is showstopper as their deployed app does not work.
Integrated into 'main-golden', will be available in build *200911261400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ab1ce87afb23 User: David Konecny <dkonecny@netbeans.org> Log: #177629 - Some libraries are skipped. Target "-clean-webinf-lib" was executed too late and deleted files copied to WEB-INF/lib folder.
QA, do you agree with integration to release68 or not?
Martine, please look at this issue and let David know whether it's stopper or not. Thanks in advance.
Verified at the trunk build. Please integrate into the release68.
Transplanted to release68 as 17cfdf6b6cd6
Was this fixed just for the jersey jar, or for all jars in general? I'm having a similar problem with struts deployment to 3.1 from NetBeans 7.
Martin, can you please try this out?
(In reply to comment #10) > Was this fixed just for the jersey jar, or for all jars in general? I'm having > a similar problem with struts deployment to 3.1 from NetBeans 7. Yes for all jars in general. Please file a new issue with steps how to reproduce as it is very likely a different issue. Thx.