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 177629 - Some libraries are skipped
Summary: Some libraries are skipped
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EAR (show other bugs)
Version: 6.x
Hardware: All All
: P1 normal (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-25 13:36 UTC by Vince Kraemer
Modified: 2011-06-07 18:02 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
a project that demonstrates the problem (26.56 KB, application/octet-stream)
2009-11-25 13:36 UTC, Vince Kraemer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vince Kraemer 2009-11-25 13:36:34 UTC
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.
Comment 1 David Konecny 2009-11-25 18:12:56 UTC
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.
Comment 2 David Konecny 2009-11-25 19:03:20 UTC
ab1ce87afb23

Target "-clean-webinf-lib" was running too late and was causing removal of WEB-INF/lib folder after libraries were copied there.
Comment 3 Vince Kraemer 2009-11-25 20:53:58 UTC
I verify that the fix does preserve the inclusion of jersey-server-1.1.4.jar in the war's lib directory
Comment 4 David Konecny 2009-11-26 14:03:10 UTC
Increasing priority to resolve this for 68. For users with this setup this issue is showstopper as their deployed app does not work.
Comment 5 Quality Engineering 2009-11-26 19:32:36 UTC
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.
Comment 6 David Konecny 2009-11-29 14:05:11 UTC
QA, do you agree with integration to release68 or not?
Comment 7 Marian Mirilovic 2009-11-30 04:49:32 UTC
Martine, 
please look at this issue and let David know whether it's stopper or not. Thanks in advance.
Comment 8 Martin Schovanek 2009-11-30 06:47:19 UTC
Verified at the trunk build. Please integrate into the release68.
Comment 9 David Konecny 2009-11-30 15:19:14 UTC
Transplanted to release68 as 17cfdf6b6cd6
Comment 10 crued 2011-06-06 19:54:28 UTC
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.
Comment 11 Petr Jiricka 2011-06-07 07:51:39 UTC
Martin, can you please try this out?
Comment 12 David Konecny 2011-06-07 18:02:55 UTC
(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.