facebook

WebSphere and remote debugging

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

    tsmith
    Member

    Hello

    I’ve read article about remote debugging in MyEclipse (http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/remotedebugging/index.html). Tried it with Tomcat 5.5 and works good. But now i have a problem with Websphere 6. Steps:

    – I edited /bin/startServer.bat file in WebSphere directory and enabled debug options, it looks like:
    set WAS_DEBUG=-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7777
    – run startServer.bat in command line, suspend=y so server waits for debugger
    – I start debugging with MyEclipse, looks good, debugger connected, some threads spawned
    – now worse – batch file (serverStart.bar) finished his works, and returns control to command line, it looks like server is running, but debugger is terminated and can’t connect to server anymore (message ‘Failed connect to remote VM. Connection refused”)

    When I run Tomcat batch file (catalina.bat) new window is spawned and while server is running its never closed.

    #229779 Reply

    Scott Anderson
    Participant

    This is because of the startup sequence of WebSphere, IIRC. The first script launches a WebSphere Java Launcher and that is apparently being launched with the debug options. However, that launcher is responsible for configuring and starting the *actual* WebSphere server, and it doesn’t look like those debug options are being propogated through to the server itself. So, you’re actually connecting to the startup process, not the server itself, which is why the debug session terminates when the startup process does. The question then becomes how do you configure WebSphere’s startup process so that the *server* will be configured for remote debugging when it’s launched?

    First, to see how the server is started, you can specify that you’d like the startup process to generate a startup script that you can use directly. Here’s the gist of it:

    
       1. Launch the server with the -script option to generate a startup script that you can use directly:
    
    WEBSPHERE_HOME/bin/startserver -script
    
          This command should write a script called start_<server name> in the WEBSPHERE_HOME/bin directory.
    
       2. Edit the launch script and add the following remote debug parameters to the java command line:
    
    -Xdebug -Xnoagent -Djava.compiler=NONE
    -Xrunjdwp:transport=dt_socket,server=y,address=7777,suspend=y
    
       3. Launch the server using the script.
    

    Use the new script to start the server and then connect to it using the remote debugging tools as you did before.

    #229785 Reply

    tsmith
    Member

    I found solution ;-). I enabled debug options using WebSphere Administrative Console. Now debugger can connect to running server. Of course now I have another problem (life isn’t easy…):

    I deploy my app in “c:\test_app” using MyEclipse. Now – how I can make this app visible to WebSphere? I can’t deploy it now with Administrative Console (it require WAR or EAR format anyway). I just need to tell WebSphere – “Hey, there is an application in ‘c:\test_app’, check it and make it accessible from web browser”. Is it possible?

    BTW: thx for Tapestry support in 4.0 M1 🙂

    #229795 Reply

    Riyad Kalla
    Member

    I deploy my app in “c:\test_app” using MyEclipse. Now – how I can make this app visible to WebSphere? I can’t deploy it now with Administrative Console (it require WAR or EAR format anyway). I just need to tell WebSphere – “Hey, there is an application in ‘c:\test_app’, check it and make it accessible from web browser”. Is it possible?

    You’d have to check with the Webspehere folk, they have their own way of doing things 🙂

    #229804 Reply

    Scott Anderson
    Participant
    #229886 Reply

    tsmith
    Member

    Ok, i figured it out… to some degree. WebSphere is so weird :|. Thx for help 😉

    #229921 Reply

    Scott Anderson
    Participant

    WebSphere is so weird

    That really sums it up. 🙂

    #230362 Reply

    dlliucz
    Member

    I support you! websphere is so weird! and ibm’s products is unuseful!

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: WebSphere and remote debugging

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