1 Reply Latest reply on Oct 5, 2012 5:12 AM by erasmo2 marciano2

    Failed to enable hprof in as7

    Cheng Fang Master

      I added -agentlib:hprof to standalone.conf JAVA_OPTS, and start the server, and failed with the following errors.  I then added the classes reported missing to sun.jdk module, and even made it a global module in standalone.xml, to no avail.

       

      Looks like we need these classes at jvm init phase, but jboss modules' boot loader doesn't include them, maybe for performance reason.  Any ideas?

       

      Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/demo/jvmti/hprof/Tracker

          at org.jboss.logmanager.LogManager$1.run(LogManager.java:65)

          at org.jboss.logmanager.LogManager$1.run(LogManager.java:52)

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

          at org.jboss.logmanager.LogManager.<init>(LogManager.java:52)

          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

          at java.lang.Class.newInstance0(Class.java:355)

          at java.lang.Class.newInstance(Class.java:308)

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

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

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

          at org.jboss.modules.Main.main(Main.java:278)

      Caused by: java.lang.ClassNotFoundException: com.sun.demo.jvmti.hprof.Tracker from [Module "org.jboss.logmanager:main" from local module loader @1de45e2 (roots: /Users/cfang/as/modules)]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

          ... 14 more

      Exception in thread "Thread-2" java.lang.NoClassDefFoundError: Could not initialize class java.util.logging.LogManager

          at java.util.logging.LogManager$Cleaner.run(LogManager.java:211)

      Dumping Java heap ... allocation sites ... done.

      474