8 Replies Latest reply on May 6, 2005 12:03 PM by kylewburke

    Starting JBoss 4 in debug mode???

    kylewburke

      Using WinXP + jboss-4.0.1sp1 + j2sdk1.4.2_08:

      After uncommenting the JAVA_OPTS for debug mode the server never starts. All I get is this message:

      Warning: classic VM not supported; client VM will be used

      This is a fresh install and I changed nothing else. Any clues?

      Thanks

        • 1. Re: Starting JBoss 4 in debug mode???
          starksm64

          No one running on windows actually uses the run.bat script apparently so this debug setting is out of date. The run.conf setting used by the run.sh has the correct jpda options. They translate to:

          set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS%
          



          • 2. Re: Starting JBoss 4 in debug mode???
            kylewburke

            Hi Scott,
            Did you try these params? It seems the only thing it did was load the classes from rt.jar and then hang.

            P.S.
            It's good to see a CTO cruising the boards.

            Thanks

            • 3. Re: Starting JBoss 4 in debug mode???
              starksm64

              Yes, I use these all the time. The vm is 'hanging' waiting for a debugger to attach to it as requested due to the suspend=y parameter.

              • 4. Re: Starting JBoss 4 in debug mode???
                mlybarger

                that suspend=y seems only usefull if you're debugging jboss itself, or if you're debuggin a startup servlet that'll be run when the app is deployed on startup. i'd guess most folks would rather the default be suspend=n. took me a bit to find this "bug" in the run.bat.

                • 5. Re: Starting JBoss 4 in debug mode???
                  kylewburke

                  Thanks mlybarger (and Stark). I ultimately came to figuring that out. I'm sure "suspend=y" is useful in developing the server but the JBoss user/developer is usually interested in debugging their owns apps from within their IDE. Now I'm dying to know what JBoss+Windows users use instead of the run.bat.

                  • 6. Re: Starting JBoss 4 in debug mode???
                    darranl

                    The suspend=y can also be useful when developing your own applications. I use this option when trying to debug an MBean that is started on deployment.

                    Also I have been using this script on Windows for debugging my code, I get the warning but it has no negative side effects for me so I never got round to setting the alternative.

                    A lot of windows users probably start JBoss in their development environment directly which means they do not need the run script for debugging.

                    • 7. Re: Starting JBoss 4 in debug mode???
                      mazz

                      I use JBoss Eclipse IDE as opposed to run.bat to start JBoss instancese on my box. This allows me to debug using the Eclipse debugger and also allows me to just start JBoss without having to go to a command line and type "run.bat" (7 characters to type is too much :-)

                      • 8. Re: Starting JBoss 4 in debug mode???
                        kylewburke

                        I too use Eclipse (w/o JBossIDE version), but just create an external tool to fire up run.bat.