facebook

Please help – remote debugging with JBoss 3.2

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

    vincentyeung
    Member

    Dear Experts,

    I am a newbie to MyEclipse, JBoss. I got a problem in doing remote debugging with JBoss. Please kindly help.

    1) I downloaded and installed MyEclipse 3.8.4 and JBoss 3.2;
    2) I properly configured MyEclipse such that I can start up JBoss directly through MyEclipse;
    3) After starting up the server, I successfully deployed my web project to JBoss through MyEclipse;
    4) I clicked RUN–>DEBUG… and did the following settings at MyEclipse Externally Launched Server:
    – Name: JBoss
    – Project: myWebProject <– this is my project
    – Connection Type: Standard (Socket attached)
    – Connection Properties:
    Host: localhost
    Port: 8080
    5) When I started debug, an error message was prompted:
    “Exception occured during launch. Reason: Failed to connect to remote VM.”;
    6) I checked that JBoss was started up properly by visiting http://localhost:8080 – the welcome page of JBoss server. I really don’t know what’s going wrong.

    Could you please help me solving this problem? What should I do to locate and fix this error? Please help.

    Many thanks.
    Vincent

    #228494 Reply

    Riyad Kalla
    Member

    4) I clicked RUN–>DEBUG… and did the following settings at MyEclipse Externally Launched Server:
    – Name: JBoss
    – Project: myWebProject <– this is my project
    – Connection Type: Standard (Socket attached)
    – Connection Properties:
    Host: localhost
    Port: 8080
    5) When I started debug, an error message was prompted:
    “Exception occured during launch. Reason: Failed to connect to remote VM.”;
    6) I checked that JBoss was started up properly by visiting http://localhost:8080 – the welcome page of JBoss server. I really don’t know what’s going wrong.

    You are making this much harder than it needs to be… once you started JBoss from MyEclipse (assuming you left the Launch settings alone) all you need to do is start setting break points in your files and that’s it, it is already connected and ready to debug.

    PLEASE NOTE: That JBoss 3.2 (IIRC) ships with Tomcat 4.x, that does not support the JSR 45 spec which is needed for full (JSP) debugging. If you want full debugging be sure to be running atleast Tomcat 5 as the servlet container for JBoss.

    #228524 Reply

    vincentyeung
    Member

    Thank you so much Riyad. I got it. Have a good day.

    #230312 Reply

    Dear experts!

    on a gentoo linux box (1)

    i am running a J2EE AS 
    jboss Version: 3.2.5  
    VM: Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-01) Java HotSpot(TM) Client VM (build Blackdown-1.4.2-01, mixed mode)
    

    on a windows machine(2) iam runnung

     eclipse : Version: 3.0.2 Build id: 200503110845  
    JBossIDE 1.4.1.e30
    VM : java version "1.5.0_03"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
    Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)
    

    iam trying to do some remote debugging from the XP (2) machin to the gentoo box(1) and each time i try i get this error message:

    
    Failed to connect to remote VM. Connection refused.
    java.net.ConnectException: Connection refused: connect
    java.net.PlainSocketImpl.socketConnect(Native Method)
    java.net.PlainSocketImpl.doConnect(Unknown Source)
    java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    java.net.PlainSocketImpl.connect(Unknown Source)
    java.net.SocksSocketImpl.connect(Unknown Source)
    java.net.Socket.connect(Unknown Source)
    java.net.Socket.connect(Unknown Source)
    java.net.Socket.<init>(Unknown Source)
    java.net.Socket.<init>(Unknown Source)
    org.eclipse.jdi.internal.connect.SocketTransportImpl.attach(SocketTransportImpl.java:47)
    org.eclipse.jdi.internal.connect.SocketAttachingConnectorImpl.attach(SocketAttachingConnectorImpl.java:103)
    org.eclipse.jdt.internal.launching.SocketAttachConnector.connect(SocketAttachConnector.java:131)
    org.jboss.ide.eclipse.launcher.core.configuration.RemoteServerLaunchConfigurationDelegate.launch(RemoteServerLaunchConfigurationDelegate.java:87)
    org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:569)
    org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:788)
    org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlugin.java:955)
    org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
    

    on the remote machine i started jboss with

    
     JAVA_OPTS="-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4142,suspend=n"

    and on the client machin where eclipse is running i created a “debug launch configuration” where i sprecified the IP number in hostname field and the same port number used in the JAVA_OPTS 4142

    i expected at least when i did this thta i could see that the port 4142 is Listning but when runing netstat -l this port is not listning at all

    please excuse my english skills and thanks for any kind of help

    Yassine ELassad

    #230314 Reply

    Scott Anderson
    Participant

    Yassine,

    First, it appears that you’re using both JBoss IDE and MyEclipse, so you’ll likely have a confusing overlap of functionalty.
    That said, you can find how to configure MyEclipse for proper remote debugging by reading our Remote Debugging quickstart.
    It’s available in the Help section of the product in Help > Help Contents > MyEclipse Application Developer Guide or on
    the website in the Documentation section here:
    http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/remotedebugging/index.html

    #230330 Reply

    Dear Scott,
    first thanks for your add ! i tried to read the documentation you points me to and i am afraid i could not finde something that explains what you told me

    it appears that you’re using both JBoss IDE and MyEclipse

    i found in the documentation more informations and options to start the JVM in the debugging mode and this is what i tried:
    1 i seted the JAVA_OPTS of my envirement to

    export  JAVA_OPTS="-Xdebug-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
    and then :
    root@remote yel # export | grep JAVA_OPTS
    declare -x JAVA_OPTS="-Xdebug-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
    
    
    
    
    root@remote yel # /usr/share/jboss/bin/run.sh
    =========================================================================
    
      JBoss Bootstrap Environment
    
      JBOSS_HOME: /usr/share/jboss
    
      JAVA: /opt/blackdown-jdk-1.4.2.01/bin/java
    
      JAVA_OPTS: -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -Dprogram.name=run.sh
    
      CLASSPATH: /usr/share/jboss/bin/run.jar:/opt/blackdown-jdk-1.4.2.01/lib/tools.jar
    
    =========================================================================
    

    right now i checked the server if its listning to the port 8000:

    root@remote yel # netstat --numeric -l
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State
    tcp        0      0 0.0.0.0:8009            0.0.0.0:*               LISTEN
    tcp        0      0 0.0.0.0:1098            0.0.0.0:*               LISTEN
    tcp        0      0 0.0.0.0:1099            0.0.0.0:*               LISTEN
    tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN
    tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
    tcp        0      0 0.0.0.0:8083            0.0.0.0:*               LISTEN
    tcp        0      0 0.0.0.0:4444            0.0.0.0:*               LISTEN
    tcp        0      0 0.0.0.0:4445            0.0.0.0:*               LISTEN
    
    [b]Note the port 8000 is not listed above[/b]
    

    and then i tried to start debugging from eclipse after setting this :

    and gets the same error msg

    Failed to connect to remote VM. Connection refused.
    java.net.ConnectException: Connection refused: connect
    java.net.PlainSocketImpl.socketConnect(Native Method)
    java.net.PlainSocketImpl.doConnect(Unknown Source)
    java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    java.net.PlainSocketImpl.connect(Unknown Source)
    java.net.SocksSocketImpl.connect(Unknown Source)
    java.net.Socket.connect(Unknown Source)
    java.net.Socket.connect(Unknown Source)
    java.net.Socket.<init>(Unknown Source)
    java.net.Socket.<init>(Unknown Source)
    org.eclipse.jdi.internal.connect.SocketTransportImpl.attach(SocketTransportImpl.java:47)
    org.eclipse.jdi.internal.connect.SocketAttachingConnectorImpl.attach(SocketAttachingConnectorImpl.java:103)
    org.eclipse.jdt.internal.launching.SocketAttachConnector.connect(SocketAttachConnector.java:131)
    org.jboss.ide.eclipse.launcher.core.configuration.RemoteServerLaunchConfigurationDelegate.launch(RemoteServerLaunchConfigurationDelegate.java:87)
    org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:569)
    org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:788)
    org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlugin.java:955)
    org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
    

    well i really dont know what the problem could be and i dont know if i did missconfigure some thing on both sides server and workstation ill be glad for any help of yours thanks

    Yassine ELassad

    #230333 Reply

    Riyad Kalla
    Member

    Yassine,
    First check to make sure your firewall is allowing incomming connections on the machine hosting “developers.de”, I doubt it is. Additionally you are using JBossIDE to debug, you really should check with the JBoss support forums on what is going wrong, we don’t work on that project.

    #230338 Reply

    Dear Riyad,

    well i have only some iptables rules which are not bloacking any incomming connections and i dont think that its a matter of firewall since the AS not listning to the specified port nr 8000 so your right im going to try in the jboss forum and see what they will advise me to do and i will post what i get there here too 🙂
    thanks all!

    Yassine ELassad

    #230371 Reply

    dhariyan
    Member

    Riyad,

    Can you please clarify the difference between the MyEclipse IDE and the JBossIDE? I thought MyEclipse is the IDE and JBoss is simply the application server that contains EJBs and things of that sort. So, shouldn’t the MyEclipse IDE be able to attach to a process that is running in JBoss and debug the code from there? thanks.

    #230373 Reply

    Riyad Kalla
    Member

    dhariyan,
    Yes you are correct, however the JBoss team does have an Eclipse based product called “JBossIDE”, and the screenshots and information Yassine was posting was all in regards to *that* plugin, they weren’t for MyEclipse’s functionality.

    #231681 Reply

    chenff
    Member

    Is it possible to use JbossIDE along side with MyEclipse then is my question? I am using Hibernate 3 so would like some help from JBossIDE before MyEclipse can provide that function in 4.1 (maybe). Thanks.

    #231688 Reply

    Riyad Kalla
    Member

    Hibernate 3 functionality will be in our 4.0 release.

    However, as far as if JBossIDE and MyEclipse work with eachother, there may be some overlap, but if you are aware of which plugin does what, I think they should work fine… don’t take my word on it though, that is not a tested configuration.

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: Please help – remote debugging with JBoss 3.2

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