jQuery in Action, 2nd edition*
The moose likes JBoss/WildFly and the fly likes JBoss 5.0.1 and Eclipse Helios Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss 5.0.1 and Eclipse Helios" Watch "JBoss 5.0.1 and Eclipse Helios" New topic
Author

JBoss 5.0.1 and Eclipse Helios

Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
Eclipse Helios 3.6.2
JBoss 5.0.1.GA
MAC OS X Snow Leopard

When Eclipse freezes and I must exit Eclipse and restart it, the JBoss instance that is running is stopped but the ports are not closed. It's not a clean shutdown. Therefore, when I open Eclipse again and try to start JBoss, there is one port conflict after the other. I went to bindings.xml and changed all the ports one time; but, of course, that's not reasonable each time Eclipse crashes.

In shutdown.sh, JBOSS_BOOT_CLASSPATH="$JBOSS_HOME/bin/shutdown.jar:$JBOSS_HOME/client/jbossall-client.jar"

eclipse.ini:
-showsplash org.eclipse.platform
-vm /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java
-vmargs -Xms512M -Xmx1024M -XX:PermSize=512M -XX:MaxPermSize 1024M


What can I do to cleanly shutdown JBoss after it is stopped? I've been working on this for a couple of weeks reinstalling JBoss several times, trying several releases of Eclipse and JBoss.

My goal is to execute the tutorial at http://www.codeproject.com/KB/java/webservice-for-jboss.aspx

What is the best way to handle this?

Thank you very much!
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5830
    
    7

Are you sure that JBoss AS is stopped? My guess is that even if Eclipse crashes that JBoss AS will still be running (it is a separate process). If it is not running, then the OS is screwing up - it should never leave ports in use from terminated processes no matter how the process is terminated.


JBoss In Action
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
Peter,

Thank you so much for the prompt response.

The ports are definitely still left open. Can you tell me how to work with this? Inside Eclipse at least, it is showing that JBoss is stopped. When I go to start it again, of course I run into all those port conflicts.

I am a recent MAC OS X user and am finding some problems when I google different aspects of this problem. I've worked on this as I reported earlier for a couple or weeks and am just wondering if there is a problem with my process or the versions I'm trying to use.

Mary
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5830
    
    7

Inside Eclipse at least, it is showing that JBoss is stopped.

This does not count if Eclipse crashed and you restarted it. JBoss AS could very well still be running, but Eclipse would not know - Eclipse doesn't look for things already running, it knows only of things that it started up during its current run.

Try looking for an existing java process that is running and if there is only one, kill it. If there are multiple java processes you will have to determine the command used to start each - then look for the one that has org.jboss.Main as the startup class. And kill it. BTW, JBoss AS will perform a clean shutdown when you kill it.
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
Will try as soon as I can. This is bringing back memories or Oracle Tech Support days when I solved problems all day regarding their app server!
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
I find no Java processes running; yet the ports are not freed even when I reboot...
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5830
    
    7

Do you mean after rebooting your Mac that the ports are still in use? Is netstat available and can you use it to see which process is using which ports? Someone who has a Mac might have to jump in to help you, since I don't have one and thus cannot help debug the problem at this level.
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
I have to talk with some recruiters this morning/early afternoon so can't focus on this right now. However, I used netstat previously, and it did not list the ports that were causing a conflict as if they were not in use. Yet JBoss thought they were in use and produced an error condition. It might take someone with a Mac , at least someone using Helios and JBoss. Let me get back to this when I can spend a little more concentrated time on it. Thanks.
 
 
subject: JBoss 5.0.1 and Eclipse Helios