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.
I appears to be impossible to clean a web project without stopping GlassFish. This problem persists since GlassFish V2. As suggested in issue 156019, I have used a workaround to copy library jars to the lib directory of the server. However, this workaround causes classloader problems in some cases - it is quite dangerous. Please refer to the attached project that I created with the following script: - Start NetBeans with an empty userdir - File|New Project|Java|Java Web|Samples|Java Web|Servlet Stateless (Java EE6)|Next|Finish - Files Window|ServletStateless|New|Folder|lib - Copy jasypt-1.5.jar, commons-codec-1.4.jar, commons-lang-2.4.jar into lib folder - Project Window|ServletStateless|Properties|Run|Uncheck "Deploy on Save" - Project Window|ServletStateless|Properties|Libraries|Add JAR/Folder|jasypt-1.5.jar, commons-codec-1.4.jar, commons-lang-2.4.jar - Project Window|ServletStateless|Source Packages|servlet.stateless|StatelessSessionBean.java Add one line and fix import: public String sayHello(String name) { BasicPasswordEncryptor passwordEncryptor = new BasicPasswordEncryptor(); return "Hello, " + name + "!\n"; } - Project Window|ServletStateless|Run - Try the app - should be ok - Services Window|Servers|GlassFish Server 3.x|Applications|ServletStateless|Undeploy - Project Window|ServletStateless|Clean and Build init: undeploy-clean: Undeploying ... deps-clean: do-clean: Deleting directory ...\ServletStateless\build ...\ServletStateless\nbproject\build-impl.xml:1047: Unable to delete file ...\ServletStateless\build\web\WEB-INF\lib\commons-codec-1.4.jar BUILD FAILED (total time: 8 seconds) The same happens if Clean and Build is executed without Undeploy.
Created attachment 111231 [details] Testcase
Is this the same as bug 202419, i.e. caused by this root cause in GlassFish? http://java.net/jira/browse/GLASSFISH-17339
See the notes and info attached to http://java.net/jira/browse/GLASSFISH-17339 to verify that it is not a defect in the libraries that you are using. *** This bug has been marked as a duplicate of bug 202419 ***