Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

jdk1.8.0_40 java.lang.NoClassDefFoundError: com/sun/management/GarbageCollectorMXBean ?

Avatar

Level 1

Is this a Mac OS X "feature" with the 64 bit newer JDKs ?    The jdk1.8.0_31.jdk  still worked but 40 or 45 seem to have problems.     -thanks, benny

/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/    

tail -100 crx-quickstart/logs/stderr.log 

Low-memory action set to fork

Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork arguments=[-Xmx1024m, -XX:MaxPermSize=256m]

**** WARNING: insufficent heap memory ******************************************

The JVM reports 910 MB but we recommend at least 1024 MB +/- 20

Use your JVM's heap size option (like -Xmx1024M) to set that size.

Will fork a JVM to get enough memory.

********************************************************************************

No console, will fork to get enough memory

Not forking JVM as -nofork option is set

Setting properties from filename '/Users/BYih/work/lds-moTab-aem/author/aem-author-p4502.jar'

Option '-quickstart.server.port' set to '4502' from filename aem-author-p4502.jar

Verbose option not active, closing stdin and redirecting stdout and stderr

Redirecting stdout to /Users   /...   /author/crx-quickstart/logs/stdout.log

Redirecting stderr to /Users/ ...   /author/crx-quickstart/logs/stderr.log

ResourceProvider paths=[/gui, /gui/default]

loadProperties: found /gui/default/gui.properties

loadProperties: found /gui/gui.properties

getResourceURL: found /gui/cq55icon_round_WIN_512x512.gif

getResourceURL: found /gui/cq55icon_round_WIN_256x256.gif

getResourceURL: found /gui/cq55icon_round_WIN_128x128.gif

getResourceURL: found /gui/cq55icon_round_WIN_64x64.gif

getResourceURL: found /gui/cq55icon_round_WIN_48x48.gif

getResourceURL: found /gui/cq55icon_round_WIN_32x32.gif

getResourceURL: found /gui/cq55icon_round_WIN_16x16_block.gif

getResourceURL: found /gui/gui_bg_start.png

getResourceURL: found /gui/gui_bg_on_blank.png

getResourceURL: found /gui/gui_bg_off.png

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/management/GarbageCollectorMXBean

    at sun.management.ManagementFactory.createGarbageCollector(ManagementFactory.java:53)

    at sun.management.MemoryImpl.getMemoryManagers0(Native Method)

    at sun.management.MemoryImpl.getMemoryManagers(MemoryImpl.java:98)

    at sun.management.ManagementFactoryHelper.getGarbageCollectorMXBeans(ManagementFactoryHelper.java:130)

    at java.lang.management.PlatformComponent$4.getMXBeans(PlatformComponent.java:117)

    at java.lang.management.PlatformComponent.getMXBeans(PlatformComponent.java:377)

    at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:472)

    at com.adobe.granite.quickstart.base.impl.Quickstart.run(Quickstart.java:261)

    at com.adobe.granite.quickstart.base.impl.Main.<init>(Main.java:824)

1 Accepted Solution

Avatar

Correct answer by
Level 10

Incompatibilities details at [1]. Try with system property jdk.jmx.mbeans.allowNonPublic to revert to the old behavior

[1]  http://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html#A999198

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Incompatibilities details at [1]. Try with system property jdk.jmx.mbeans.allowNonPublic to revert to the old behavior

[1]  http://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html#A999198

Avatar

Level 1

Thanks !     java -Djdk.jmx.mbeans.allowNonPublic=true  -jar aem-author-p4502.jar           seems to do the trick.