facebook

Configuring Debug with Sun Application Server 8

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #233191 Reply

    kenswa
    Member

    For those of you trying to setup MyEclipse to debug J2EE apps running on Sun Application Server 8, here is hopefully a helpful note:

    All of the MyEclipse documentation lead me to believe that the port to specify when setting up a new debug configuration was the port that you can actually browse to in order to reach your app. Sun AS8 (if you install with the NetBeans bundle as I did, and I think even if you don’t) will default the ‘default server’ to listen on port 8080. But I could not get debug to work when using :8080.

    Instead, I setup AS8 to be an ‘Externally Launched’ application (rather than ‘Remote Java Application’ ) and since I saw in my AS8 domain.xml when enabling debug mode that the ‘address=9009’, I specified port 9009 in my debug configuration.

    Start the app server through the AS8 asadmin.bat or .sh file (which will use your domain.xml Java args for debug mode and port), and then start your debugging – works like a charm for me now.

    I noticed that when I attempted to debug as a ‘Remote Java Application’ (running locally on my machine) that MyEclipse seemed to be opening the debug port on some port such as 2239 or something. I think if I go back and setup a Debug configuration to use that port (rather than the :8080 it runs to serve HTTP requests), I’d be successful in debugging my app as a Remote Java App in MyEclipse.

    Hope this helps,

    KW

    #233243

    Riyad Kalla
    Member

    KW,
    I’d like to point out that if you launch Sun AS through MyEcliupse using our connector, the debugger is transparently attached to the running App server for you, so you just need to start setting breakpoints, no launch configurations, no attaching debuggers or anything like that. It’s all automated.

    NOTE: There is a known bug with Sun AS 8.1 Update 1 that will be fixed in 4.0

    #233246

    kenswa
    Member

    I’m running AS Platform Edition 8_1_02 – what is the known bug? Is it that it returns an error saying Cannot connect to the remote VM when you’re trying to launch and debug through MyEclipse as a Remote Java Application? Because that is what I was seeing and is still what I see, even if I do adjust the debug configuration to use the port that appears after I start AS8 through Eclipse.

    It is able to connect to the VM when I setup the debug configuration as an Externally Launched App, but then I obviously can’t take advantage of some of the seemless integration options MyEclipse offers with other containers.

    #233247

    Riyad Kalla
    Member

    KW,

    I’m running AS Platform Edition 8_1_02 – what is the known bug?

    I believe so.

    Is it that it returns an error saying Cannot connect to the remote VM when you’re trying to launch and debug through MyEclipse as a Remote Java Application?

    This was exactly my point, you don’t need to do this. The way you debug apps in MyEclipse is:

    1) Launch app server
    2) Set break point
    3) Open browser and make execution hit the breakpoint

    There is no additional attaching of anything, we handle all that in the background for you.

    Because that is what I was seeing and is still what I see, even if I do adjust the debug configuration to use the port that appears after I start AS8 through Eclipse.

    You shouldn’t need to know/use/worry about ports when you use the integrated app launcher. Forget about ports, pretend you don’t know what they are 🙂

    Check out section 7.2 here: http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/webprojects/index.html

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Configuring Debug with Sun Application Server 8

You must be logged in to post in the forum log in