我的程序包含以下行,只是掛起在這一點上,我不太清楚爲什麼。無法創建新PoolingHttpClientConnectionManager
java.lang.NoClassDefFoundError: org/apache/http/config/Lookup
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
...omitted - referring to specific lines in code...
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.http.config.Lookup
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 10 more
我使用httpclient.jar版本4.3.1來自:
PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager();
當在Eclipse中調試,如果我嘗試評價「新PoolingHttpClientConnectionManager()」查看顯示屏中我得到這些錯誤org.apache.httpcomponents。
任何人都會遇到這個問題嗎?任何解決方案還是我在做一些愚蠢的事情?