Maybe someone did have this before (and possibly solved it)
On a mac book pro with Yosemite I installed Java 8 "1.8.0_40-ea" with JDK.
My $JAVA_HOME
is /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home
Then I downloaded a tomcat 8 core from http://tomcat.apache.org/download-80.cgi When I start this tomcat 8 I get the following Java exception - see below.
With this Java 8 also my older tomcat 7 throws the same exception.
It seems that sun/management/ExtendedPlatformComponent
be not part of tomcat 8 nor java 8
The method ExtendedPlatformComponent
should be inside a rt.jar
file but is not. This seems to be a bug in JDK SE 8 for mac :(
Does anyone have some hints for me? I cannot figure our what is wrong ... I would simply add that class to rt.jar
but cannot even find that class...
PS: The exception on start (/bin/startup.sh):
22-Nov-2014 18:43:02.218 SEVERE [main]
org.apache.tomcat.util.digester.Digester.startElement Begin event threw
error * java.lang.NoClassDefFoundError: sun/management/ExtendedPlatformComponent*
at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:494)
at org.apache.tomcat.util.modeler.Registry.getMBeanServer(Registry.java:443)
at ...
There seems to be an issue with update 40 Early Access release of jre/jdk8(1.8.0_40). Compared with update 20 of jre/jdk8 release, you will see following lines of code has been added to getPlatfromMBeanServer:
for (final PlatformManagedObject o :
ExtendedPlatformComponent.getMXBeans()) {
if (!platformMBeanServer.isRegistered(o.getObjectName())) {
addMXBean(platformMBeanServer, o);
}
But if you look into the accompanied rt.jar of the jre, this newly introduced class(ExtendedPlatformComponent) can NO-WHERE be found.
This issue, seems to be there across all the JAVA_VERSION="1.8.0_40" EA release, irrespective of platform.
Your remedy is to move back to a stable release. Latest stable release seems to be Java SE 8u25.
我遇到了同样的问题,升级到1.8.0_40 ea build 20(于2014年12月31日发布),并修复了该问题。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.