启动tomcat异常:java.lang.ClassNotFoundException: sun.misc.GC

2018-9-17

工具eclipse、tomcat7.0.52、jdk9.0.1

在eclipse中启动tomcat报一下错误:

java.lang.NoSuchFieldException: loaderRef
    at java.base/java.lang.Class.getDeclaredField(Class.java:2368)
    at org.apache.catalina.loader.WebappClassLoader.clearReferencesResourceBundles(WebappClassLoader.java:2785)
    at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:2024)
    at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1906)
    at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:661)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5702)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1575)
    at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1564)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.base/java.lang.Thread.run(Thread.java:844)

在myeclipse中可以正常启动,没有找到原因。
更换为tomcat8.5.34,在eclipse中正常启动。

你可能感兴趣的:(我的异常)