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.
Nb trunk standard installer 20070702000 XP JDK1.6.0_02 1. New userdir 2. Created a VWP EE5 project and deployed it to Glassfish 3. Renamed the project via context menu and also checked Rename Project Folder >first error: Deleting directory C:\Documents and Settings\Krystyna Polomski\My Documents\NetBeansProjects\WebApplication869\build C:\Documents and Settings\Krystyna Polomski\My Documents\NetBeansProjects\WebApplication869\nbproject\build- impl.xml:766: Unable to delete file C:\Documents and Settings\Krystyna Polomski\My Documents\NetBeansProjects\WebApplication869 \build\web\WEB-INF\lib\appbase.jar BUILD FAILED (total time: 9 seconds) >second error: Deleting directory C:\Documents and Settings\Krystyna Polomski\My Documents\NetBeansProjects\WebApplication869\build C:\Documents and Settings\Krystyna Polomski\My Documents\NetBeansProjects\WebApplication869\nbproject\build- impl.xml:766: Unable to delete file C:\Documents and Settings\Krystyna Polomski\My Documents\NetBeansProjects\WebApplication869 \build\web\WEB-INF\lib\appbase.jar BUILD FAILED (total time: 9 seconds) >third error Project is in continuous scanning state "Refreshing Workspace". Thread dumps attached. >webapp name does not change in project view
Created attachment 44638 [details] messages log with thread dumps
Assigning to Tomas.
After some investigation it is hard to say what's wrong - no deadlock found in the log. I also wasn't able to reproduce it (nb 070711, linux, jdk 1.6.0_01-b06). I'm going to try it (and debug) on windows. According to Bug Priority Guidelines changing to P2.
With installer build 07101200 I did reproduce the "refreshing workspace" continuous scan switching to jdk1.6.0_01 on Windows XP -- AssertionError to log and then the build fails unable to delete appbase.jar. I went ahead and re-deployed but I am still see the refreshing workspace scan. The project is *not* renamed in project view. I agree that it is not 100% reproducible but I think there is a problem renaming a project after it has been once deployed.
Do you see this symptom even after 'undeploy' your project, or stop your server? As I remember that some servers will lock some jar files in the project and make it cannot be deleted.
I just undeployed all my apps and renamed project and the build failed with same appbase.jar error. The webapp was not renamed in project view, but I was able to redeploy and see "renamedWebApp" in the lower right hand name. The app when deployed came up with the old name. I closed the project and on "Open Recent Project" I see two WebApp922 projects listed - same name - and I can open them. I then deployed an app, stopped the server, then renamed the project, and then I did see the webapp renamed in project view, but I got the continuous refresh workspace error. Ignored it and redeployed and it did, with the new project name in the browser, but I'm still getting this refresh workspace. (If you are here in mpk16, drop on by!) At least in this case the project was renamed.
Testing with 07160000 on XP. Behavior has changed. I no longer see the continuous scan error but get IllegalStateExceptions: 1. stopping the server before the rename now throws an IllegalStateException when the project is redeployed.I do not see the continuous scanning. 2. NOT stopping the server has the same effect to throw and IllegalStateException ("project is open") but I am still waiting for renamed project to open in designer. it appears to have been renamed in proejct view, ok and builds, ok, and redeploys OK, but the designer is inactive and shows Loading, please wait.
So is this an issue in the core web features? Sounds like the remaining problem is in visual web, correct?
Now the issue is the 'IllegalStateExceptions'. Please attach the stack trace of this exception.
Different exceptions in testing with 08030000 build, XP, JDK1.5.0_12, 3 scenarios, the first two fail in renaming the project, the third is successful. 1: Re-testing using original scenario, I reproduced the continuous refresh workspace scan. Attaching logger exceptions(AssertionError) and thread dumps. 2: Re-testing but undeployed the app before the rename, attaching exceptions from logger (NPE) 3. Re-testing but undeployed the app and stopped the appserver before the rename. Rename succeeded but did throw NPE to logger (attaching)
Created attachment 46143 [details] Continuous scan
Created attachment 46144 [details] thread dumps
Created attachment 46145 [details] rename undeploy
Created attachment 46146 [details] undeployandstop
I filed an issue for NPE, see issue 112018.
So, for me, after some investigation, it looks like that the solution would be to undeploy the application before renaming it. But unfortunately this is not doable for NB 6.0 because there's no possibility to call 'undeploy' action from a module (now, undeploy is done only via the context menu for a server in Services tab). But that wouldn't be still enough I guess because the module doesn't know if it's currently deployed or not (this is important for the case when the server is not running - it would have to be started in order to undeploy the application). Any ideas? Any comments please? Thanks.
Just FYI I've found another issue (issue 112017) while investigating this one.
If we want to continue to provide the project rename feature we should provide sufficient information dialogs to direct users to undeploy, etc. Get HIE to help with contents and style of that message. (We do something similar for VWP when changing themes where we need user to restart appserver).
The problem is that there's no API for detecting if the application is deployed and if the server is running - so the dialog would have to be shown every time.
In VWP we couldn't detect either, but put up an Informational dialog asking user to restart appserver. (Create VWP 1.4 project and switch theme to see this dialog. ) Rename of a project is not going to occur on a high frequency.
First of all - I've discussed this issue with Petr Jiricka and he told me that 'undeploy' action is not necessary - 'clean' action has to be enough and GlassFish *has to* free all the resources after this action. So if such exception occurs please file a bug against serverplugins, sunappserver9. I've done some tests with the latest versions and here are the results: Scenarios: 1) create project -> rename 2) create project -> build & clean -> rename 3) create project -> run -> rename 4) create project -> run -> undeploy -> stop the server -> rename (after each scenario IDE has been restarted) All 4 scenarios have been tested with both 'pure' Web project and Visual Web project. Web project: ------------ 1) OK 2) OK 3) OK 4) OK In all 4 scenarios NPE occurs - see issue 112018 - but the rename action has been successful. Visual Web project: ------------------- 1) OK (NPE) 2) OK (NPE) 3) *KO* 4) OK (NPE) As can be seen only one scenario has failed - only if the application has been deployed the rename operation has failed - 'cannot delete prototype.1.5.0.jar' so I filed issue 112529 against serverplugins. Remaining 3 scenarios were successful (but again see issue 112018). During this testing I've discovered one more bug, see issue 112530. So I suggest to close this issue as FIXED. If any error related to this issue occurs reopen it please. Thank you. Environment: Product Version: NetBeans IDE Dev (Build 070810) 'FULL IDE' Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06 System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb) GlassFish V2 build b58-rc1
Verified that can rename a deployed app on Windows. NetBeans IDE Dev (Build 200710220000) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b02
The rename works for an already deployed app only if you are not renaming the project folder. Only rename of project.