glassfish
  1. glassfish
  2. GLASSFISH-17719

Debugger is broken for deployed Glassfish Application

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 3.1.1
    • Fix Version/s: None
    • Component/s: ide-integration
    • Labels:
      None
    • Environment:

      Glassfish 3.11
      Windows 7
      JDK 1.6 update 29 both 32 and 64 bit

      Description

      When deploying a glassfish application through the Eclipse, the debugger is not working in the following ways:

      -Does not highlight and bring up the current thread and code for the breakpoint
      -Can not step through code

      This happens only when running the application AFTER:
      -Deleting the contents of the folder folder glassfish\domains\<domainname>\eclipseApps
      -Right clicking the domain and selecting X Remove while the application is running and stopping the application
      -Possibly when Running the application for the very first time (did not reproduce)

      This is an extremely frustrating bug and a potential blocker, re-posted here because of no response on Eclipse plugins and help is needed.

        Activity

        Hide
        arjan tijms added a comment -

        Just for everyone's information, this issue is still current with GlassFish 4.0 and the latest server runtime as of the time of writing. Tested on OS X and Ubuntu.

        Show
        arjan tijms added a comment - Just for everyone's information, this issue is still current with GlassFish 4.0 and the latest server runtime as of the time of writing. Tested on OS X and Ubuntu.
        Hide
        xiul added a comment -

        Idob from stackoverflow.com found a workaround, I test it and it works for me, I'm using glassfish 3.1.2.1 with the eclipse (STS) extension 3.1.2 and jdk 7

        source: http://stackoverflow.com/questions/10685361/eclipse-skipping-breakpoints

        "Set remote debug

        1. Go to your glassfish admin console and set your glassfish to work on debug mode.
        Click on configuration --> server-config --> JVM settings, and check debug enabled check box.
        Restart server

        2. In eclipse - start server on normal mode (not debug - it is useless).

        3. Go to Debug configurations and locate "Remote Java Application"

        4. Create a new Remote java app debug config

        5. Enter name (lets say Glassfish-Debug)

        6. Choose project to debug

        7. Enter your own IP address in the host section and set the port to 9009

        That's it. Now all you have to do is always start your Glassfish in normal mode and then go to Debug configurations and run This Glassfish remote debugging you just set.

        And now I'm getting to the annoying part: After rebuild your project, sometimes you might get again out of sync. You just need to disconnect the remote debugging session and run it again. Small price to pay.

        I hope it helps."

        Show
        xiul added a comment - Idob from stackoverflow.com found a workaround, I test it and it works for me, I'm using glassfish 3.1.2.1 with the eclipse (STS) extension 3.1.2 and jdk 7 source: http://stackoverflow.com/questions/10685361/eclipse-skipping-breakpoints "Set remote debug 1. Go to your glassfish admin console and set your glassfish to work on debug mode. Click on configuration --> server-config --> JVM settings, and check debug enabled check box. Restart server 2. In eclipse - start server on normal mode (not debug - it is useless). 3. Go to Debug configurations and locate "Remote Java Application" 4. Create a new Remote java app debug config 5. Enter name (lets say Glassfish-Debug) 6. Choose project to debug 7. Enter your own IP address in the host section and set the port to 9009 That's it. Now all you have to do is always start your Glassfish in normal mode and then go to Debug configurations and run This Glassfish remote debugging you just set. And now I'm getting to the annoying part: After rebuild your project, sometimes you might get again out of sync. You just need to disconnect the remote debugging session and run it again. Small price to pay. I hope it helps."
        Hide
        adi3000 added a comment -

        4- Choose GlassFish Server Open Source Edition 3 (Java EE 6)

        Excuse me for this mistake but I was using a 3.0.1 server first and then upgrade it to 3.1.2. It does not seem to be the same thing as when I just erase my server to perform my tutorial, I found that glassfish modules lib are not the same. So instead of using Open Source Edution 3, use the Glassfish 3.1.2 (obvious isn't it ?)

        Good luck for the rest

        Show
        adi3000 added a comment - 4- Choose GlassFish Server Open Source Edition 3 (Java EE 6) Excuse me for this mistake but I was using a 3.0.1 server first and then upgrade it to 3.1.2. It does not seem to be the same thing as when I just erase my server to perform my tutorial, I found that glassfish modules lib are not the same. So instead of using Open Source Edution 3, use the Glassfish 3.1.2 (obvious isn't it ?) Good luck for the rest
        Hide
        adi3000 added a comment - - edited

        For information this issue seems to be cross platform. With my platform (from Sun) , debugging is very painfull. Even with removing the Debug view and reopen it

        Eclipse 3.8
        Sun JDK 7u3 (even with openJDK 6u29)
        Glassfish 3.1.2
        Eclipse Glassfish Server Tools 2.0.1

        I can't trace properly my debugging, just approximatively follow with random F8/F6 and close reopen debug view. It not helping at all. Seems to be the same issue than idididid
        If somebody could help on it or find a workaround

        Thanks

        EDIT : Find a better workaround : using another glassfish server (not the one included with Glassfish plugin ), I've maid a proc on my redmine :

        http://code.a-dream-zone.com/redmine/issues/26

        Workaround : Use another glassfish server than the one include on eclipse plugin
        1- Download http://dlc.sun.com.edgesuite.net/glassfish/3.1.2/release/glassfish-3.1.2.zip
        2- Unzip anywhere you want (ie : on your workspace)
        3- On Window > Preference > Server > Runtime Environment clic on Add...
        4- Choose GlassFish Server Open Source Edition 3 (Java EE 6)
        5- Check Create a new local server (to display it below Internal Glassfish Server
        6- Use the proper JDK (jdk1.7.0_03)
        7- Application Server Directory : /path-to-your-workspace/glassfishv3/glassfish (must be the glassfishv3/glassfish directory of the place where you unzip your glassfish server), then click next
        8- Leave Administration Id and password as default (admin and blank password), check than Domain Directory follow path to glassfishv3/glassfish/domains/domain1
        9- Click on finish, the new server should have appeared as GlassFish Server Open Source Edition 3 (Java EE 6) on your Server view

        Deploy your application as you've done under Internal Glassfish 3.1.2 (dont forget to check the runtime environment of each project to be using the right server libraires)

        Show
        adi3000 added a comment - - edited For information this issue seems to be cross platform. With my platform (from Sun) , debugging is very painfull. Even with removing the Debug view and reopen it Eclipse 3.8 Sun JDK 7u3 (even with openJDK 6u29) Glassfish 3.1.2 Eclipse Glassfish Server Tools 2.0.1 I can't trace properly my debugging, just approximatively follow with random F8/F6 and close reopen debug view. It not helping at all. Seems to be the same issue than idididid If somebody could help on it or find a workaround Thanks EDIT : Find a better workaround : using another glassfish server (not the one included with Glassfish plugin ), I've maid a proc on my redmine : http://code.a-dream-zone.com/redmine/issues/26 Workaround : Use another glassfish server than the one include on eclipse plugin 1- Download http://dlc.sun.com.edgesuite.net/glassfish/3.1.2/release/glassfish-3.1.2.zip 2- Unzip anywhere you want (ie : on your workspace) 3- On Window > Preference > Server > Runtime Environment clic on Add... 4- Choose GlassFish Server Open Source Edition 3 (Java EE 6) 5- Check Create a new local server (to display it below Internal Glassfish Server 6- Use the proper JDK (jdk1.7.0_03) 7- Application Server Directory : /path-to-your-workspace/glassfishv3/glassfish (must be the glassfishv3/glassfish directory of the place where you unzip your glassfish server), then click next 8- Leave Administration Id and password as default (admin and blank password), check than Domain Directory follow path to glassfishv3/glassfish/domains/domain1 9- Click on finish , the new server should have appeared as GlassFish Server Open Source Edition 3 (Java EE 6) on your Server view Deploy your application as you've done under Internal Glassfish 3.1.2 (dont forget to check the runtime environment of each project to be using the right server libraires)
        Hide
        idididid added a comment - - edited

        Hello, I am facing the same problem.

        I noticed few more things:

        On the Debug view, in my stack trace, I found the exact class with the breakpoint is paused and it had this comment: "(Suspended breakpoint at line XX)". When I clicked the line, suddenly the green line appeared. Yet, as soon as I clicked F6 to continue, It went out of sync again, just the next line became suspended. Weird.

        I checked the processes running on my computer and found that there are several "java.exe" processes running at the same time. (eclipse runs on javaw.exe). After further investigation I found out that when there is only one "java.exe" running - everything works fine and I am able to debug. Then, restarting the server creates sometimes a new "java.exe" and this is the point where I can't debug anymore. Maybe eclipse got confused...

        Any thoughts?

        Ido

        Show
        idididid added a comment - - edited Hello, I am facing the same problem. I noticed few more things: On the Debug view, in my stack trace, I found the exact class with the breakpoint is paused and it had this comment: "(Suspended breakpoint at line XX)". When I clicked the line, suddenly the green line appeared. Yet, as soon as I clicked F6 to continue, It went out of sync again, just the next line became suspended. Weird. I checked the processes running on my computer and found that there are several "java.exe" processes running at the same time. (eclipse runs on javaw.exe). After further investigation I found out that when there is only one "java.exe" running - everything works fine and I am able to debug. Then, restarting the server creates sometimes a new "java.exe" and this is the point where I can't debug anymore. Maybe eclipse got confused... Any thoughts? Ido

          People

          • Assignee:
            vince kraemer
            Reporter:
            crazytrain411
          • Votes:
            14 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

            • Created:
              Updated: