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 110109 - 0716: clean ear with ejb/war fails to remove ejb jar
Summary: 0716: clean ear with ejb/war fails to remove ejb jar
Status: RESOLVED DUPLICATE of bug 114728
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-18 10:01 UTC by nouar38
Modified: 2007-09-11 23:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nouar38 2007-07-18 10:01:01 UTC
NB 6.0 2007071612000 & GF v2 b55 bundled.

an EE project, with ejb-project 
and war-project cannot be cleaned any more if the required
projects (ejb and war) are deployed /war-project run / browser still having access to servlet
that calls the ejb code.

got this while trying to verfiy full fix for JMS: 109463 and 109146

How to reproduce:
-------------------
with IDE:
1) GlassFish V2 node is present and server started in normal mode.

2) Create a new EE project with ejb-project and a war-project
3) in ejb-project add SessionBean Stateless/Local int, add MessageDrivenBean with project destination added as queue.
4) update the MSDB code for method onMessage() to get the Timestamp.
5) in war-project add Servlet and call inside it Send JMS
as nothing can be selected, cancel.
5.1) deploy the ejb-project to have access to the Queue resource
verify deploy of the jms resources
5.2) in war-project/servlet call again Send JMS and check the server destination box and back the project destination
to have access to OK button. (I'll do an issue for this)
5.3) update the servlet code to set in the Message the timestamp and text
5.4) build/deploy the war-project
6) verify deployment of war-project
7) Run war-project and verify in browser when servlet is called, that in the server.log get the text
from the OnMessage method()
8) undeploy war-project (from services)
9) undeploy ejb-project (from services)

10) try to clean the EE project and will get the error:

clean:

clean-ear:

do-clean:

Deleting directory C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\EnterpriseApplication2\dist

C:\Documents and Settings\Administrator\My
Documents\NetBeansProjects\EnterpriseApplication2\nbproject\build-impl.xml:353: Unable to delete file C:\Documents and
Settings\Administrator\My Documents\NetBeansProjects\EnterpriseApplication2\dist\gfdeploy\EnterpriseApplication2-ejb.jar

BUILD FAILED (total time: 0 seconds)


when trying to delete this file in folder dist/gfdeploy I'm getting the windows 
"Error Deleting File or Folder":
<< cannot delete EnterpriseApplication2-ejb:It is being used by another person or program.
Close any programs that might be using the file and try again.
>>

if I close IDE, the file is still locked.
if I close the browser where my servlet is called, I can delete this file.
Comment 1 nouar38 2007-07-18 10:09:57 UTC
after removing the file, and removing the dist/build folders was able to do "clean and build" over the ear project
3 times, after the file was locked again.
Comment 2 nouar38 2007-07-18 10:18:55 UTC
forget about the last comment, the error was because I deployed the ear application, may be additional checking can be
helpful for the end-user (if possible.)
Comment 3 Vince Kraemer 2007-07-19 00:54:44 UTC
I can reproduce this issue.

I am going to lower the priority, since other significant operations are able to proceed. The build directory is cleaned
for the ent app.  The ear is deleted.  If the user needs to build a clean ear.. they will be able to do that... by
calling build.

If they call Run/Debug/Undeploy&Deploy: the build and deploy happens. 
Comment 4 Vince Kraemer 2007-09-11 23:26:23 UTC
another instance of extra, unnecessary jar files getting put into the deployment directory and interfering with
operations like clean.

*** This issue has been marked as a duplicate of 114728 ***