This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes JBoss Debug Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss Debug" Watch "JBoss Debug" New topic
Author

JBoss Debug

Himalay Majumdar
Ranch Hand

Joined: Sep 28, 2008
Posts: 324
I use intelliJ IDE to develop applications. After I start JBoss initially, on trying to start JBoss clicking the debug button in IntelliJ gives me the error. "Error Running Remote: Unable to connect to localhost:1099". So I stop and restart the server and then the debug works, it annoys me because the debug never works the first time, it needs to be restarted atleast once to make the debug work.

Thanks,
-Himalay


SCJP 1.6, SCWCD 5.0, SCBCD 5.0 [loading..]
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 643
Are you starting JBoss from within the IDE?

Are you starting the Debug version of the server? I don't use that IDE, but I think there are two different ways to start the application server: One standard and one debug. Perhaps you're starting the standard version?
Himalay Majumdar
Ranch Hand

Joined: Sep 28, 2008
Posts: 324
I use Windows command line to start the server..i.e using run.bat and Ctrl+C to stop it. Once its started I click the debug button in the IDE, that fails for the first time. So I stop the server (Ctrl+C) and start (run.bat), and it works when I click the debug button the next time from the IDE.
Anil Vupputuri
Ranch Hand

Joined: Oct 31, 2000
Posts: 527
Himalay Majumdar wrote:I use intelliJ IDE to develop applications. After I start JBoss initially, on trying to start JBoss clicking the debug button in IntelliJ gives me the error. "Error Running Remote: Unable to connect to localhost:1099". So I stop and restart the server and then the debug works, it annoys me because the debug never works the first time, it needs to be restarted atleast once to make the debug work.


I never had problem, this is what I have in start script of AS for WebLogic but should be the same for JBoss except for CA key store option.



And sequence is, start Application Server first and then start debug option from IDE.


SCJP 1.5, SCEA, ICED (287,484,486)
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 643
Himalay Majumdar wrote:I use Windows command line to start the server..i.e using run.bat and Ctrl+C to stop it. Once its started I click the debug button in the IDE, that fails for the first time. So I stop the server (Ctrl+C) and start (run.bat), and it works when I click the debug button the next time from the IDE.

Before you can debug, the application server must be launched with the proper debug arguments to the JVM. I'm guessing that when you start the application server with run.bat, you're not starting it with the debug arguments.

I don't use IntelliJ, so perhaps it works differently, but when I use Eclipse to start an application server, it wants to start its own instance, so I can't start the server myself using run.bat (or if I can, I haven't figured out how to do that).

Best Regards,
Vyas Sanzgiri
Ranch Hand

Joined: Jun 16, 2007
Posts: 686

Have you tried using the JBoss plugin to start it from the IDE : http://www.jetbrains.com/idea/training/demos/JBoss_server.html


===Vyas Sanzgiri===
My Blog
Francesco Marchioni
author
Ranch Hand

Joined: Sep 22, 2003
Posts: 191
Himalay Majumdar wrote:I use intelliJ IDE to develop applications. After I start JBoss initially, on trying to start JBoss clicking the debug button in IntelliJ gives me the error. "Error Running Remote: Unable to connect to localhost:1099". So I stop and restart the server and then the debug works, it annoys me because the debug never works the first time, it needs to be restarted atleast once to make the debug work.

Thanks,
-Himalay

Hi Himalay,
I know the choice of the IDE it's usual a matter of personal tastes, however if you want to develop Java EE applications with JBoss you might benefit from the complete set of plugins available for Eclipse (JBoss Tools) available here: http://www.jboss.org/tools
it could be worth giving it a try.....
regards
Francesco


WildFly 8 Administration Book - JBoss Tutorials
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBoss Debug