[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-1891) Error when stopping JBoss
Gene Gretter (JIRA)
jira-events at lists.jboss.org
Wed Mar 26 14:57:42 EDT 2008
[ http://jira.jboss.com/jira/browse/JBIDE-1891?page=comments#action_12404891 ]
Gene Gretter commented on JBIDE-1891:
-------------------------------------
For me, this problem happens everytime I stop the JBoss server by right-clicking the server in the Server View and selecting Stop, which is not at all helpful for you.
I have stepped through the code to get a better understanding of what may be causing this problem, so maybe I can describe what I am seeing and it will help you to understand the cause.
Above I had mentioned that commenting out pollServer(IServerStatePoller.SERVER_DOWN); in the JBossServerBehavior.serverStopping() seemed to fix the problem. I added back in this line of code so that I could locate the statement that causes the JBoss process to be blown away.
The problem seems to start in the pollServer() method on the last statement, which is a call to pollThread.start(). This causes the PollThread.run() method to be executed. The last statement in the run() method is a call to alertBehavior(). The code drops through to the last 'else' statement in alertBehavior(), which is a call to behavior.forceStop(false). Executing this statement causes the JBoss process to be blown away.
I appears that another process is started to execute the shutdown code. What I am seeing is that the JBoss process is already gone by the time the shutdown attempts to stop JBoss. This results in the error I mentioned above.
I am wondering why another PollThread is started in pollServer when the JBoss server is being shut down? I made the following code change at the end of the pollServer() method that also seems to solve the problem I see:
if ( expectedState != IServerStatePoller.SERVER_DOWN ) {
this.pollThread = new PollThread("Server Poller", expectedState, this);
pollThread.start();
}
Hope that helps.
> Error when stopping JBoss
> -------------------------
>
> Key: JBIDE-1891
> URL: http://jira.jboss.com/jira/browse/JBIDE-1891
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: JBossAS
> Affects Versions: 2.0.0.GA
> Environment: Windows XP, Eclipse 3.3.1.1, JBoss Tools 2.0.0GA, JBoss 4.2.0
> Reporter: Gene Gretter
> Assigned To: Rob Stryker
>
> When stopping JBoss from the Eclipse Server view, I receive the following error: "Could not obtain connection to any of these urls: localhost:1099". I found that this problem occurs because the process in which JBoss is running is terminated before shutdown is executed. I found that eliminating the call to pollServer(IServerStatePoller.SERVER_DOWN); in the JBossServerBehavior.serverStopping() method resolves the problem, though I am not sure that this is the final fix.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list