我更新了我们的微服务以使用OpenJDK11。一切正常,启动似乎正常,但是我们所有的API端点都返回404。我检查了Tomcat日志并看到此错误:
16-Jan-2019 22:27:33.929 FINE [main] org.apache.catalina.core.StandardContext.filterStart Starting filter 'Tomcat WebSocket (JSR356) Filter'
16-Jan-2019 22:27:33.932 SEVERE [main] org.apache.catalina.core.StandardContext.filterStart Exception starting filter [Tomcat WebSocket (JSR356) Filter]
java.lang.NoClassDefFoundError: javax/xml/ws/WebServiceRef
at org.apache.catalina.core.DefaultInstanceManager.populateAnnotationsCache(DefaultInstanceManager.java:303)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:142)
我认为启动日志中还有与上述异常相关的内容:
16-Jan-2019 22:27:33.933 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/usr/local/tomcat/lib/catalina.jar) to field java.lang.Thread.threadLocals
我知道有些软件包已被弃用。对于更新,我必须添加回javax.bind程序包才能进行项目编译。我还用谷歌搜索了这个javax/xml/ws/WebServiceRef
并添加了那个jar,但它仍然显示该错误。
因此,我总共向我们的项目添加了四个jar库:
我还应该包括其他软件包吗?