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 25644 - Switching from full mode to minimum mode does not work for external 4.0.4
Summary: Switching from full mode to minimum mode does not work for external 4.0.4
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: -FFJ-
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-15 20:27 UTC by Ana.von Klopp
Modified: 2003-02-03 04:59 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 Ana.von Klopp 2002-07-15 20:27:54 UTC
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.
Comment 1 Milan Kuchtiak 2002-07-16 18:11:45 UTC
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.
Comment 2 Ana.von Klopp 2002-07-16 18:16:29 UTC
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. 

Comment 3 Petr Jiricka 2002-07-17 08:41:46 UTC
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.
Comment 4 Milan Kuchtiak 2002-07-17 09:48:42 UTC
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.

Comment 5 Ana.von Klopp 2002-07-17 18:22:15 UTC
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. 
Comment 6 Milan Kuchtiak 2002-07-18 07:50:53 UTC
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).
Comment 7 Milan Kuchtiak 2002-07-20 09:41:19 UTC
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.
Comment 8 Jason Rush 2003-02-03 04:59:07 UTC
Verified in NetBeans dev build 200301310100.