- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
当我启动服务器时,它正在启动,但出现错误。因此无法进行 API 调用。这些是错误。
Jul 18, 2018 11:05:36 PM com.mongodb.ServerMonitor$ServerMonitorRunnable run
WARNING: Exception in monitor thread during notification of server state change
java.lang.NoClassDefFoundError: com/mongodb/ChangeEvent
at com.mongodb.ServerMonitor$ServerMonitorRunnable.sendStateChangedEvent(ServerMonitor.java:136)
at com.mongodb.ServerMonitor$ServerMonitorRunnable.run(ServerMonitor.java:119)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Illegal access: this web application instance has been stopped already. Could not load [com.mongodb.ChangeEvent]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1362)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1219)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180)
... 3 more
Caused by: java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [com.mongodb.ChangeEvent]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1372)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1360)
... 5 more
Jul 18, 2018 11:05:36 PM org.apache.catalina.loader.WebappClassLoaderBase checkStateForResourceLoading
INFO: Illegal access: this web application instance has been stopped already. Could not load [java.util.concurrent.locks.Condition]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [java.util.concurrent.locks.Condition]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1372)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1360)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1219)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180)
at com.mongodb.ServerMonitor$ServerMonitorRunnable.waitForSignalOrTimeout(ServerMonitor.java:177)
at com.mongodb.ServerMonitor$ServerMonitorRunnable.waitForNext(ServerMonitor.java:158)
at com.mongodb.ServerMonitor$ServerMonitorRunnable.run(ServerMonitor.java:124)
at java.lang.Thread.run(Unknown Source)
Exception in thread "cluster-2-34.214.191.171:27017" java.lang.NoClassDefFoundError: java/util/concurrent/locks/Condition
at com.mongodb.ServerMonitor$ServerMonitorRunnable.waitForSignalOrTimeout(ServerMonitor.java:177)
at com.mongodb.ServerMonitor$ServerMonitorRunnable.waitForNext(ServerMonitor.java:158)
at com.mongodb.ServerMonitor$ServerMonitorRunnable.run(ServerMonitor.java:124)
at java.lang.Thread.run(Unknown Source)
最佳答案
问题出在这个类上
@Component
公共(public)类 APIsAuthentications 实现 Filter
用于 API 身份验证
。在这个类中有一个方法叫做:
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse 响应,
FilterChain链)抛出IOException、ServletException
这是验证 API
并期望 请求 header
中的 token/authentication
。这里的 doFilter
方法还验证基本 URL 的 API 并给出响应 401
。 tomcat 没有问题。
最后,我将一个条件放在 doFilter
方法中,如果它是 base URLs/Open URLs
则不会对这些 API 进行验证。
我的本地机器的基本 URL:http://localhost:8080/projects/
问题解决了!!! :)
关于java - 如何解析 WebappClassLoaderBase,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51408173/
当我启动服务器时,它正在启动,但出现错误。因此无法进行 API 调用。这些是错误。 Jul 18, 2018 11:05:36 PM com.mongodb.ServerMonitor$ServerM
我们最近将 tomcat 从 8.0.32 更新到 8.5.6,在尝试加载 /opt/apache-tomcat-8.5.6_1/webapps/example/时遇到了 AccessControlE
问题: 问题是我在 Tomcat 的 WebappClassLoaderBase 中得到了一个 NullPointerException,但没有过多解释为什么会发生这种情况。据我所知,它从 8.0.3
当我尝试在 Tomcat 8.0.24 上运行 Scada-Lts 时,出现以下错误: 23-Sep-2016 11:03:27.228 INFO [Timer-0] org.apache.catal
这是什么原因造成的?这似乎是一个非常常见的错误,原因有很多。 HTTP Status 500 - type Exception report message description The serve
我是一名优秀的程序员,十分优秀!