3 Replies Latest reply on Apr 14, 2008 9:04 AM by jaikiran pai

    How can debug Jboss AS in Eclipse?

    Junguo LI Newbie

      Apologize for asking a naive problem.
      I want to dubug JBoss AS (AS, instead of applications) in Eclipse, so I filled the arguments that come from run.jar in Eclipse. However, it does not work. So, I want to know are you develop or debug JBoss AS in Eclipse? What could I do to be able to debug it?

        • 1. Re: How can debug Jboss AS in Eclipse?
          jaikiran pai Master

          Have you enabled the debug options in run.bat/run.conf file, like this:

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


          The bat/conf already contains a similar line in the form of a comment. Just uncomment it and restart the server. You might even want to change suspend=y to suspend=n.


          • 2. Re: How can debug Jboss AS in Eclipse?
            Junguo LI Newbie

            Many thanks for your reply. I think I do not describe my question clear befor. I want to modify some code in JBoss AS, so I want to set a breakpoint in some code of Jboss AS classes to see its process. I filled the required argument in Eclipse debug configuration for org.jboss.Main. However, it cannot be started and print following messages. I tried in commondline, it's ok. Can you give me some advices? Many thanks in advance.

            Failed to boot JBoss:
            java.lang.NullPointerException
            at java.util.Properties$LineReader.readLine(Unknown Source)
            at java.util.Properties.load(Unknown Source)
            at org.jboss.Version.loadProperties(Version.java:291)
            at org.jboss.Version.(Version.java:72)
            at org.jboss.Version.getInstance(Version.java:84)
            at org.jboss.system.server.ServerImpl.(ServerImpl.java:89)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
            at java.lang.reflect.Constructor.newInstance(Unknown Source)
            at java.lang.Class.newInstance0(Unknown Source)
            at java.lang.Class.newInstance(Unknown Source)
            at org.jboss.system.server.ServerLoader.createServer(ServerLoader.java:289)
            at org.jboss.system.server.ServerLoader.load(ServerLoader.java:268)
            at org.jboss.Main.boot(Main.java:194)
            at org.jboss.Main$1.run(Main.java:508)
            at java.lang.Thread.run(Unknown Source)

            • 3. Re: How can debug Jboss AS in Eclipse?
              jaikiran pai Master

               

              "Jonah" wrote:
              I filled the required argument in Eclipse debug configuration for org.jboss.Main. However, it cannot be started and print following messages. I tried in commondline, it's ok. Can you give me some advices? Many thanks in advance.

              Failed to boot JBoss:
              java.lang.NullPointerException
              at java.util.Properties$LineReader.readLine(Unknown Source)
              at java.util.Properties.load(Unknown Source)
              at org.jboss.Version.loadProperties(Version.java:291)
              at org.jboss.Version.<init>(Version.java:72)
              at org.jboss.Version.getInstance(Version.java:84)
              at org.jboss.system.server.ServerImpl.<init>(ServerImpl.java:89)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
              at java.lang.reflect.Constructor.newInstance(Unknown Source)
              at java.lang.Class.newInstance0(Unknown Source)
              at java.lang.Class.newInstance(Unknown Source)
              at org.jboss.system.server.ServerLoader.createServer(ServerLoader.java:289)
              at org.jboss.system.server.ServerLoader.load(ServerLoader.java:268)
              at org.jboss.Main.boot(Main.java:194)
              at org.jboss.Main$1.run(Main.java:508)
              at java.lang.Thread.run(Unknown Source)


              A similar issue was discussed at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=132901. See if it helps.