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 202724 - GlassFish does not release JAR File
Summary: GlassFish does not release JAR File
Status: RESOLVED DUPLICATE of bug 202419
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.0.1
Hardware: PC Windows Vista
: P2 normal (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-27 10:04 UTC by bht
Modified: 2011-09-27 13:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Testcase (415.79 KB, application/octet-stream)
2011-09-27 10:13 UTC, bht
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bht 2011-09-27 10:04:04 UTC
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.
Comment 1 bht 2011-09-27 10:13:23 UTC
Created attachment 111231 [details]
Testcase
Comment 2 Petr Jiricka 2011-09-27 12:24:16 UTC
Is this the same as bug 202419, i.e. caused by this root cause in GlassFish? http://java.net/jira/browse/GLASSFISH-17339
Comment 3 Vince Kraemer 2011-09-27 13:00:37 UTC
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 ***