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.
Configuration: Windows 2K Professional Tomcat 4.0.4 FFJ 4.0 CE JDK 1.4.0 Install Tomcat 4.0.4. Add this server instance to the IDE in full integration mode. Bring up the server instance in the runtime tab and go to the properties window. Try to switch mode from Full to Minimum. It fails, bringing up a dialog which states that the httpmonitor or monitor- valve.jar library cannot be removed. If you repeat the process a couple of times, it eventually succeeds. I'd file this as a P3 normally but it's a P2 given that the full integration does not work.
The reason that switching from Full mode to Minimum is impossible is this : httpmonitor.jar (and other jars) are not possible to remove,because they are locked by the external Tomcat process. (Access is denied message occurs). What does it mean : Full integration doesn't work ? The error message may be more propriate, but I don't think its a P2 bug.
I see this even if the external server is not running. Note that I have only seen this on Windows 2000. The remark about full integration not working is a reference to issuezilla 25641. Apologies, I should have been more clear about that one. What I was referring to was that I had initially tried to add the server instance in full integration mode, but that does not work (per the bug). Then I could only switch over to minimum mode by trying to change the property several times.
So the root cause is the fact that the jars copied into Tomcat installation can not be deleted, as they are held by someone else. I suggest the fix could be not to attempt to delete these files - it's no big deal if they just continue to be there, is it ? Should we attempt to fix this for NB 3.4 ? I believe the fix could be reasonably simple, so I vote for fixing it for NB 3.4.
I really cannot reproduce the issue (when the Tomcat is not running). I think - the better solution is to give user a hint - to stop the Tomcat and then switch the Ide Integration Mode to minimum. Or - the second solution is to lower the priority to P3(P4) and not to fix for Netbeans3.4 - as the issue is in Orion as well. In case of Petr sugested solution there could be a state that Ide integration mode is set to minimum, but some "strange" jars are still left in the Tomcat installation directory. User could not be satisfied with this.
I can reproduce this bug consistently even when the server is not running (Windows 2000 Pro). Here is what I do: 1) Stop the server by using the "Stop Server" action on the server instance on the runtime tab. 2) Go to the properties dialog. Try to change "Full" to "Minimum" 3) You see a dialog to the effect that a jar file (monitor- valve these days, I've seen this with httpmonitor before) can not be removed. The action fails, the property reverts to full. 4) Repeat (2) 5) (3) happens again 5) Repeat (2) 6) Success! I assume that there is something wrong with the code that removes the jar files, in such a way that exactly one jar is removed each cycle (there are three jars). When all three jars have been deleted, the action succeeds. I would suggest evaluating this code to see if there is an easy fix. As Petr points out, successfully removing the jar files is not a condition for switching to minimum mode, so the action should succeed anyway. I would prefer it if we try to clean up the jar deleting code anyway though. As for the case when the server is running, if users try to switch from full to minimum mode, I would like to see a dialog as follows: "This action will restart the server. Continue?"; then we stop the server before proceeding.
Yes, it takes a second or more until Tomcat unlocks those jars while it is stopping. As the behaviour is the same as for Orion and Ana agrees with lowering the priority - I am changing it to P3. I like the solution Ana sugested (ask user to stop Tomcat before switching from Full to Minimum).
Fixed in trunk. The dialog message was changed to : This action requires the Tomcat server not to be running. Please stop the Tomcat 4.0 server and wait a moment until the Tomcat process unlocks the files that need to be removed from the installation.
Verified in NetBeans dev build 200301310100.