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
        crazytrain411 added a comment -

        I'm pretty sure I've seen it other cases but these are the ones we have reproduced with consistency.

        Show
        crazytrain411 added a comment - I'm pretty sure I've seen it other cases but these are the ones we have reproduced with consistency.
        Hide
        crazytrain411 added a comment -

        Here are my latest findings regarding this issue. I'm also able to consistently reproduce with the following in addition to the two methods described above.

        1) The debugger gets broken if there is a spring bean definition error and deployment fails. Upon fixing the error and running again the debugger is in a broken state.

        2) If there are breakpoints set in a class and the class signature is changed the debugger will be in the broken state until the breakpoints are removed and the application is run again.

        Show
        crazytrain411 added a comment - Here are my latest findings regarding this issue. I'm also able to consistently reproduce with the following in addition to the two methods described above. 1) The debugger gets broken if there is a spring bean definition error and deployment fails. Upon fixing the error and running again the debugger is in a broken state. 2) If there are breakpoints set in a class and the class signature is changed the debugger will be in the broken state until the breakpoints are removed and the application is run again.
        Hide
        eduardohbcs added a comment -

        I'm also facing the same issue in both ways described.

        My environment is:
        Windows 7
        64-bit JDK 1.6 update 27
        Glassfish 3.1.1 (build 12)
        Eclipse Indigo sr1 (build id 20110615-0604)
        Glassfish Plugin (Oracle Glassfish Server Tools) version 4.2.0.201111040904

        This issue is really painful and hurts productivity ...

        Show
        eduardohbcs added a comment - I'm also facing the same issue in both ways described. My environment is: Windows 7 64-bit JDK 1.6 update 27 Glassfish 3.1.1 (build 12) Eclipse Indigo sr1 (build id 20110615-0604) Glassfish Plugin (Oracle Glassfish Server Tools) version 4.2.0.201111040904 This issue is really painful and hurts productivity ...
        Hide
        sinago added a comment -

        Same environment as eduardohbcs with the same problem. Productivity has been brought to a halt due to this issue.

        Show
        sinago added a comment - Same environment as eduardohbcs with the same problem. Productivity has been brought to a halt due to this issue.
        Hide
        lgraf added a comment - - edited

        We are also facing this issue with the latest version of the Oracle GlassFish Server Tools (1.7.3.201106220649).

        Steps to reproduce:
        1. Debug app on server.
        2. Debugging work as expected.
        3. Undeploy app (remove from server).
        4. Stop server.
        5. Debug app on server again.
        6. Debugging doesn't work properly (thread doesn't get the focus). At this point only manually focusing the thread after each step helps.

        This is really a productivity killer. Any plans when this will get fixed?

        Also iam a bit confused about the glassfish plugin project http://java.net/jira/browse/GLASSFISHPLUGINS. Is this the JIRA for the eclipse pluign: http://marketplace.eclipse.org/node/867? Iam asking because the versioning in JIRA seems to be different (does not contain the latest version (1.7.3) from the marketplace/updatesite).

        Show
        lgraf added a comment - - edited We are also facing this issue with the latest version of the Oracle GlassFish Server Tools (1.7.3.201106220649). Steps to reproduce: 1. Debug app on server. 2. Debugging work as expected. 3. Undeploy app (remove from server). 4. Stop server. 5. Debug app on server again. 6. Debugging doesn't work properly (thread doesn't get the focus). At this point only manually focusing the thread after each step helps. This is really a productivity killer. Any plans when this will get fixed? Also iam a bit confused about the glassfish plugin project http://java.net/jira/browse/GLASSFISHPLUGINS . Is this the JIRA for the eclipse pluign: http://marketplace.eclipse.org/node/867? Iam asking because the versioning in JIRA seems to be different (does not contain the latest version (1.7.3) from the marketplace/updatesite).
        Hide
        kumara added a comment -

        -> ide_integration sub-component

        Show
        kumara added a comment - -> ide_integration sub-component
        Hide
        crazytrain411 added a comment -

        Its been 4 months since the issue was reported. There's 6 participants and 9 votes. Can this at least be looked at?

        If more information is required please specify.

        Show
        crazytrain411 added a comment - Its been 4 months since the issue was reported. There's 6 participants and 9 votes. Can this at least be looked at? If more information is required please specify.
        Hide
        crazytrain411 added a comment -

        Found a workaround for this ridiculous bug. Thanks Glassfish guys for being useless to help with this for 7 months.

        Close the debug view and reopen it, done.

        There is a link between eclipseApps directory and the <application> block in domain.xml. Its horribly broken.

        Goodbye

        Show
        crazytrain411 added a comment - Found a workaround for this ridiculous bug. Thanks Glassfish guys for being useless to help with this for 7 months. Close the debug view and reopen it, done. There is a link between eclipseApps directory and the <application> block in domain.xml. Its horribly broken. Goodbye
        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
        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
        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
        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
        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.

          People

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

            Dates

            • Created:
              Updated: