自从我迁移到 Oracle JDK 9 后,我遇到了 Tomee 的问题。
我的 tomee 不会以这些错误消息开头:
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at org.apache.openejb.config.ConfigurationFactory.<init>(ConfigurationFactory.java:222)
at org.apache.openejb.config.ConfigurationFactory.<init>(ConfigurationFactory.java:177)
at org.apache.openejb.config.ConfigurationFactory.<init>(ConfigurationFactory.java:158)
at org.apache.tomee.catalina.TomcatWebAppBuilder.<init>(TomcatWebAppBuilder.java:331)
at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:212)
at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:168)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:395)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:108)
... 8 more
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 17 more
24-Sep-2017 12:40:14.287 INFO [main] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Initialization processed in 1525 ms
24-Sep-2017 12:40:14.288 SEVERE [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke The required Server component failed to start so Tomcat is unable to start.
所以我该怎么做?
顺便说一句,我把答案和应该