1 Reply Latest reply on Mar 19, 2012 12:10 PM by Darran Lofthouse

    JConsole and AS7.

    Jeremy Whiting Expert

      Hi,

      I want to use JConsole with AS7. When I attempted to run AS7 with the properties and setup I see this error when the server starts.

       

      =========================================================================

       

        JBoss Bootstrap Environment

       

        JBOSS_HOME: /home/whitingjr/java/jboss/as7.1

       

        JAVA: /home/whitingjr/java-home/bin/java

       

        JAVA_OPTS:  -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx768m -XX:MaxPermSize=168m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver

      .warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headles

      s=true -Djboss.server.default.config=standalone.xml -Dhibernate.enable_specj_proprietary_syntax=true -Dcom.sun.management.jmxremote.port=12345  -Dcom.sun.mana

      gement.jmxremote.password.file=/home/whitingjr/jmxremote.password  -Djava.util.logging.manager=org.jboss.logmanager.LogManager  -Xrunjdwp:transport=dt_socket,

      address=8000,server=y,suspend=n

       

      =========================================================================

       

      Listening for transport dt_socket at address: 8000

      Could not load Logmanager "org.jboss.logmanager.LogManager"

      java.lang.ClassNotFoundException: org.jboss.logmanager.LogManager

              at java.net.URLClassLoader$1.run(URLClassLoader.java:217)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.net.URLClassLoader.findClass(URLClassLoader.java:205)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:321)

              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:266)

              at java.util.logging.LogManager$1.run(LogManager.java:186)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.util.logging.LogManager.<clinit>(LogManager.java:176)

              at java.util.logging.Logger.getLogger(Logger.java:307)

              at com.sun.jmx.remote.util.ClassLogger.<init>(ClassLogger.java:55)

              at sun.management.jmxremote.ConnectorBootstrap.<clinit>(ConnectorBootstrap.java:739)

              at sun.management.Agent.startAgent(Agent.java:147)

              at sun.management.Agent.startAgent(Agent.java:289)

      No module specified

      Usage: java [-jvmoptions...] -jar jboss-modules.jar [-options...] <module-spec> [args...]

             java [-jvmoptions...] -jar jboss-modules.jar [-options...] -jar <jar-name> [args...]

             java [-jvmoptions...] -jar jboss-modules.jar [-options...] -cp <class-path> <class-name> [args...]

             java [-jvmoptions...] -jar jboss-modules.jar [-options...] -class <class-name> [args...]

      where <module-spec> is a valid module specification string

       

       

      The instructions I followed to setup JConsole are here

       

      http://docs.oracle.com/javase/6/docs/technotes/guides/management/agent.html#gdenl

       

      This involved coping a template password file and adding some properties to the JAVA_OPTS in standalone.conf.

       

      Additionally to the jconsole setup instructions I

      1. set the "java.util.logging.manager" property. Without it as7 failed to start and recommended I set the property.
      2. Added the -logmodule flag. This was suggested in another forum discussion which is related but I am using the command line to start the server. https://community.jboss.org/message/715578#715578

       

      My standalone.sh looks like this

       

      ....

               -jaxpmodule "javax.xml.jaxp-provider" \

               -logmodule "org.jboss.logmanager" \

               org.jboss.as.standalone \

      ....

       

      Now I see the exception above.

       

      Is there something else I should be doing ?

       

      Regards,

      Jeremy

       

      OpenJDK 6, AS7.1.1