简体   繁体   English

Tomcat 7和8无法在YOSEMITE和Java JDK SE 8下启动-缺少ExtendedPlatformComponent

[英]Tomcat 7 & 8 do not start under YOSEMITE and Java JDK SE 8 - missing ExtendedPlatformComponent

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. 在使用Yosemite的macbook pro上,我通过JDK安装了Java 8“ 1.8.0_40-ea”。

My $JAVA_HOME is /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home 我的$JAVA_HOME/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. 然后,我从http://tomcat.apache.org/download-80.cgi下载了一个tomcat 8内核。启动此tomcat 8时,出现以下Java异常-参见下文。

With this Java 8 also my older tomcat 7 throws the same exception. 使用此Java 8,我的较早的tomcat 7也会引发相同的异常。

It seems that sun/management/ExtendedPlatformComponent be not part of tomcat 8 nor java 8 似乎sun/management/ExtendedPlatformComponent不是tomcat 8或java 8的一部分

The method ExtendedPlatformComponent should be inside a rt.jar file but is not. 方法ExtendedPlatformComponent应该在rt.jar文件中,但不是。 This seems to be a bug in JDK SE 8 for mac :( 这似乎是针对Mac的JDK SE 8中的错误:(

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... 我无法弄清楚我们的错在哪里...我只是将该类添加到rt.jar但是甚至找不到该类...

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). jre / jdk8(1.8.0_40)的更新40 Early Access版本似乎存在问题。 Compared with update 20 of jre/jdk8 release, you will see following lines of code has been added to getPlatfromMBeanServer: 与jre / jdk8版本的更新20相比,您将看到以下代码行已添加到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. 但是,如果您查看jre随附的rt.jar,则找不到此新引入的类(ExtendedPlatformComponent)。

This issue, seems to be there across all the JAVA_VERSION="1.8.0_40" EA release, irrespective of platform. 与平台无关,所有JAVA_VERSION =“ 1.8.0_40” EA版本中似乎都存在此问题。

Your remedy is to move back to a stable release. 您的补救措施是移回稳定版本。 Latest stable release seems to be Java SE 8u25. 最新的稳定发行版似乎是Java SE 8u25。

我遇到了同样的问题,升级到1.8.0_40 ea build 20(于2014年12月31日发布),并修复了该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM