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.
If the user has an ear project that has a web app and a ejb-jar archive, the iterator returned by getArchiveContents is NOT supposed to return a value for web app archive or the ejb-jar according to its javadoc and usage when doing directory deployment. The unnecessary presence of the EJBModule2.jar may be contributing to issue 114728. The jar file is being copied because of the error in the implementation of ProjectEar.getArchiveContents()..
change the way the iterator is created, so that the J2eeModule archives are very likely to not be included in the set of file objects returned... Implement a heuristic in the patch that I will attach.. if the name, extension and size match a jar file that implements a J2eeModule, the jar is not returned by the iterator. This seems like a 90% solution. There may be a 100% solution for this, but this better than the current implementation, which is just plain wrong.
Created attachment 48523 [details] a first pass implementation of a solution for this.
i just tested issue 114728 with this patch applied and I cannot reproduce it...
*** Issue 114728 has been marked as a duplicate of this issue. ***
can you let me know whether you are going to review this patch or do you just want me to check it in...
Because it's related to the directory-based deployment, feel free to fix this issue (but please be sure that 'normal' deployment keeps working). So reassigning to you, Vince.
http://www.netbeans.org/source/browse/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/ProjectEar.java?r1=1.25&r2=1.26 differs from original patch... avoid an O(n^2) search to filter the iterator content...
NB 6.0 daily 200710231200 & GF v2 ur1-b06 on windows/xp : have only clean error when the app is still deployed which normal, if ear app is undeployed from services, a clean action just after undeploy will fail, a second "clean & build" ok, (undeploy & deploy many times ok). (clean & build ) many times: can have two successive failures and after success, ...etc. Better than before.