SimpleHttpConnectionManager being used incorrectly. Be sure that HttpMethod.releaseConnection() is a
来源:互联网 发布:dnf卡史诗软件 编辑:程序博客网 时间:2024/06/05 02:50
Common HttpClient 工具包 执行GetMethod或PostMethod方法时,报如下信息提示:
SimpleHttpConnectionManager being used incorrectly. Be sure that HttpMethod.releaseConnection() is always called and that only one thread and/or method is using this connection manager at a time.
原因是上一个HttpMethod方法未关闭,就又执行了HttpMethod的方法导致。
例如以下形式:
GetMethod getMethod1 = new GetMethod(uri1);
GetMethod getMethod2 = new GetMethod(uri2);
getMethod2.releaseConnection();
getMethod1.releaseConnection();
有时会报以上信息提示,
规范的形式如以下,用完HttpMethod就关闭,如果要获取网页内容,在关闭前获取并存在临时变量里,以便后面操作用:
GetMethod getMethod1 = new GetMethod(uri1);
getMethod1.releaseConnection();
GetMethod getMethod2 = new GetMethod(uri2);
getMethod2.releaseConnection(); 0 0
- SimpleHttpConnectionManager being used incorrectly. Be sure that HttpMethod.releaseConnection() is a
- How to: Determine if a Package that is About to be Compiled is Being Used Currently (文档 ID 1054939.6
- Gson is a Java library that can be used to convert Java Objects into their JSON representation.
- (codes)a program that could be used to restart computer
- The context cannot be used while the model is being created
- Check if a port is being used on a Windows machine
- to be or not to be, that is a question...
- To be or not to be that is a question
- 对Run-Time Check Failure #3 - The variable 'a' is being used without being initialized.的处理以及理解
- 对Run-Time Check Failure #3 - The variable 'a' is being used without being initialized.的处理以及理解
- 解决QWidget: Cannot create a QWidget when no GUI is being used
- Qt错误:QWidget: Cannot create a QWidget when no GUI is being used
- How is jstack being used to find the bottlenect of a java program
- 解决QWidget: Cannot create a QWidget when no GUI is being used
- 解决:QWidget: Cannot create a QWidget when no GUI is being used 程序异常结束
- QWidget: Cannot create a QWidget when no GUI is being used
- SerialPort comstat is being used without defining
- The variable 'str' is being used without being defined 问题
- python挑战之level 23
- hxy系列2-图像分类与KNN
- Adobe 官方公布的 RTMP 规范
- 搭建 AngularJS+Ionic+Cordova 开发环境并运行一个demo
- 论文笔记《Fully Convolutional Networks for Semantic Segmentation》
- SimpleHttpConnectionManager being used incorrectly. Be sure that HttpMethod.releaseConnection() is a
- hibernate 更新 具体操作示例
- 【UML】— 实现图
- linux wget 命令用法详解(附实例说明)
- C++ 中 虚拟继承 的概念
- 【WEB开发】centos搭建Apache的https服务
- jquery checkbox重复调用attr('checked',true/false) 失效 只有第一次生效
- hxy系列3-SVM与softmax分类器
- json去重