-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DefaultApacheHttpClientBuilder总是报错? #285
Comments
能否进行解答?谢谢。 |
什么情况下会报这个错误 |
在eclipse中,通过debug模式运行web项目,这段代码就会在后台不停的运行。如果Tomcat自动重启一次,这段代码就开始不停的报错,提示stopped,但项目本身还是可以正常运行的。 抱歉,不知道是否能表达清楚,如果你本地有环境的话,重复一次到两次,这个错误就会不停出现。 |
感觉没表达清楚,本地没遇到过此问题 |
大概明白是什么意思了,如果不是tomcat自动重启会报错么? P.S. 不推荐使用tomcat的自动重载功能,最好还是关闭再重启。开发环境为了节省时间建议使用JRebel |
DefaultApacheHttpClientBuilder里面的写法方式会造成线程无法回收,这个类最好修改调整下。 |
DefaultApacheHttpClientBuilder按道理这个类应该是保持单例的 |
能力有限,发现问题但还没有解决问题的能力,一直就这么将就着用,Tomcat自动重启惯了,只要一自动重启,就会报错,报错后就把Tomcat关了,感觉真的不好,关键是自己还写不来改造的方法。希望有高手可以改造一个出来。 |
我的也报错了,用好久了,之前一直正常的,今天突然报错了, 项目启动时间达到7m,之前是不到30s |
@jlions 错误内容是什么呢? |
@binarywang ,恩,不过,tomcat内部debug自动重启的时候依然会报错。
错误的栈为以下这段代码:
|
因为没有环境,没办法测试你这个问题 |
我的问题解决了,错误和上面写的基本一样,但好像是其他问题引起的。
我用的框架是spring+mybatis,由于 一个mapper.xml写的有问题,应该是内部出错了,但我用的mybatis版本较低,没有打印出来,造成项目卡死,无法调试或热部署,直接运行启动时间超长。
然后我更新了最新的mybatis版本,还有我们最新的正式版2.7.0,修复mapper.xml,就一切正常了。
谢谢(*°∀°)=3
来自 魅蓝 2
…-------- 原始邮件 --------
发件人:kakotor <[email protected]>
时间:周一 8月14日 09:31
收件人:Wechat-Group/weixin-java-tools <[email protected]>
抄送:jleopard <[email protected]>,Mention <[email protected]>
主题:Re: [Wechat-Group/weixin-java-tools] DefaultApacheHttpClientBuilder总是报错? (#285)
@jlions 错误内容是什么呢?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/Wechat-Group/weixin-java-tools","title":"Wechat-Group/weixin-java-tools","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in ***@***.*** in #285: @jlions 错误内容是什么呢?"}],"action":{"name":"View Issue","url":"#285 (comment)"}}}
|
如果是debug自动重启的问题,我觉得可以忽略掉,毕竟只是开发模式才出现的,而且也不会影响实际功能 @QingGee |
暂时关闭,至于kakotor提到的办法,如果有人验证过没问题的话请提交PR。 |
不知道为什么?
DefaultApacheHttpClientBuilder的以下代码位置总是报错。
@Override public void run() { try { while (!this.shutdown) { synchronized (this) { wait(this.checkWaitTime); this.connMgr.closeExpiredConnections(); this.connMgr.closeIdleConnections(this.idleConnTimeout, TimeUnit.MILLISECONDS); } } } catch (InterruptedException ignore) { } }
信息: Illegal access: this web application instance has been stopped already. Could not load org.apache.http.pool.AbstractConnPool$4. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at org.apache.http.pool.AbstractConnPool.closeExpired(AbstractConnPool.java:558)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.closeExpiredConnections(PoolingHttpClientConnectionManager.java:409)
at me.chanjar.weixin.common.util.http.apache.DefaultApacheHttpClientBuilder$IdleConnectionMonitorThread.run(DefaultApacheHttpClientBuilder.java:302)
DEBUG 2017-07-20 14:40:59,462 org.apache.http.impl.conn.PoolingHttpClientConnectionManager: Closing expired connections
The text was updated successfully, but these errors were encountered: