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 49961 - IDE sometimes fails to stop the server.
Summary: IDE sometimes fails to stop the server.
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: RANDOM
: 43305 50124 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-05 17:52 UTC by Sherold Dev
Modified: 2008-12-23 08:43 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
MissingResourceException (2.32 KB, text/plain)
2004-10-05 17:53 UTC, Sherold Dev
Details
MRE.txt once more (2.83 KB, text/plain)
2004-10-07 13:41 UTC, Sherold Dev
Details
messages.log (69.31 KB, text/plain)
2004-11-02 13:00 UTC, Sherold Dev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sherold Dev 2004-10-05 17:52:26 UTC
IDE sometimes, very rarely, fails to stop the
server, which it previously started.
Comment 1 Sherold Dev 2004-10-05 17:53:10 UTC
Created attachment 18057 [details]
MissingResourceException
Comment 2 Pavel Buzek 2004-10-06 01:24:24 UTC
No idea why (is it related to the fact that the IDE is shutting down?)
but it should be avoided and servers should still be stopped if the
message cannot be retrieved from bundle. I will move access to bundle
in constructor where it should not fail. Reopen if you see it again.

Checking in org/netbeans/modules/j2ee/deployment/impl/Install.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/Install.java,v
 <--  Install.java
new revision: 1.3; previous revision: 1.2
done
Comment 3 Sherold Dev 2004-10-06 09:27:21 UTC
Yes, it seems so be related.
Comment 4 Sherold Dev 2004-10-06 09:27:58 UTC
*** Issue 43305 has been marked as a duplicate of this issue. ***
Comment 5 Sherold Dev 2004-10-07 13:41:30 UTC
Created attachment 18123 [details]
MRE.txt once more
Comment 6 Sherold Dev 2004-10-07 13:56:27 UTC
The same MissingResourceException again, this should be better fixed 
on the module system level. Changing component to core/modules. 
Comment 7 Jesse Glick 2004-10-07 14:18:29 UTC
Please use "Reassign issue to owner of selected subcomponent" when
changing components.

No idea whether the problem is in the module system or NbBundle. There
is no way to reproduce this? How rare is it in practice? I don't see
anything wrong in the code so I don't think there is any way to fix it
without using runtime logging and just trying to get it to happen.
Comment 8 Sherold Dev 2004-10-07 15:06:14 UTC
Sorry, I will.

I'm not able to reproduce it intentionally. I think it occurs really
very rarely. However since Pavel made his fix, it could take
approximately 30-50 retries before it occurred again, but I am not
really sure of those numbers. It could have been also just a luck/bad
luck and in the next hundreds of retries it might not happen again. I
am not aware of noticing such error message ever before, so I think it
really occurs very rarely.

If this won't be easy to fix on the core level, we should at least
make a fix in the j2eeserver to ensure that servers will be properly
stopped.
Comment 9 Jesse Glick 2004-10-07 15:08:52 UTC
Certainly you should do what you can in j2eeserver to recover more
gracefully.
Comment 10 Sherold Dev 2004-10-08 14:32:40 UTC
When looking at this more closely, fixing this in the j2eeserver
module doesn't seem to me to be very realistic anymore, since
NbBundle.getMessage() is used almost everywhere and it would be needed
to modify the tomcatint module as well. Btw, it seems to me it would
be more convenient if NbBundle.getMessage() had just reported error
and returned resourceName, instead of throwing MRE.
Comment 11 Jesse Glick 2004-10-08 14:56:37 UTC
Well I'll see if I can add some diagnostic code or the like.
Comment 12 Jesse Glick 2004-10-08 17:40:54 UTC
Let's see the log file if it happens again.

committed   * Up-To-Date  1.4        
j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/Install.java
committed   * Up-To-Date  1.55       
openide/src/org/openide/util/NbBundle.java
Comment 13 Sherold Dev 2004-10-18 14:12:43 UTC
*** Issue 50124 has been marked as a duplicate of this issue. ***
Comment 14 athompson 2004-10-22 18:26:36 UTC
sorry about the delay following up.

i problem i just encountered which is likely related: i just wrote a
program where the JVM doesn't stop upon exiting the main() method (i
created a non-daemon thread which never exited, but that's not
relavent). i had to manually right-click the processes in the
execution window and select 'terminate process'. the processes went
away as far as netbeans was concerned, but they were still there as
far as my OS was concerned.

java-1.5
linux-2.6.8-nptl (gentoo)
gnome 2.6 and 2.8
latest CVS
Comment 15 Jesse Glick 2004-10-22 20:24:12 UTC
Alvin - the last problem you mentioned is very likely totally
unrelated to this. File separately if you can reproduce.
Comment 16 Jesse Glick 2004-10-26 03:49:50 UTC
Haven't heard another report on it. Reopen with your log file if it
happens again.
Comment 17 Sherold Dev 2004-11-02 13:00:25 UTC
Created attachment 18667 [details]
messages.log
Comment 18 Sherold Dev 2004-11-02 13:02:11 UTC
Reopening this issue, since it occurred again (see the attached log 
file). 
Comment 19 Jesse Glick 2004-11-09 20:57:18 UTC
This shows that opening the actual stream is the problem, but not why;
ClassLoader.getResourceAsStream swallows IOException's quietly.
Improved diagnostics, reopen if it happens again.

committed     Up-To-Date  1.56       
openide/src/org/openide/util/NbBundle.java