hprose / hprose-java

Hprose is a cross-language RPC. This project is Hprose 2.0 for Java
MIT License
550 stars 187 forks source link

idea中测试hprose tomcat 关闭时 hprose报错误信息 #56

Open ammonzhang opened 4 years ago

ammonzhang commented 4 years ago

hprose-php 做服务端,hprose-java做客户端 结合 springmvc idea里能正常启动tomcat,没有错误信息,并且可以访问到hprose-php服务端的数据。 但关闭tomcat时,提示如下: 严重 [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [hprose.io.ByteBufferStream$1] (value [hprose.io.ByteBufferStream$1@5f3a4b84]) and a value of type [hprose.io.ByteBufferStream.ByteBufferPool] (value [hprose.io.ByteBufferStream$ByteBufferPool@670b40af]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

信息 [Thread-11] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [java.util.concurrent.ScheduledExecutorService]. 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.ScheduledExecutorService]. 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:1383) at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1371) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1224) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186) at hprose.util.concurrent.Promise$1.run(Promise.java:40) at hprose.util.concurrent.Threads$2.run(Threads.java:98) at hprose.util.concurrent.Threads$1.run(Threads.java:73)

Exception in thread "Thread-11" 是什么原因呢?

andot commented 4 years ago

可能是线程没执行完吧,被强制退出来吧。这种问题忽略就行,反正 tomcat 都关了。