2 sinat 24420561 sinat_24420561 于 2016.09.07 16:43 提问

java 爬虫 myeclipse启动报错

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.http.conn.ssl.AbstractVerifier.(AbstractVerifier.java:89)
at org.apache.http.conn.ssl.AllowAllHostnameVerifier.(AllowAllHostnameVerifier.java:40)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.(SSLConnectionSocketFactory.java:124)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.getDefaultRegistry(PoolingHttpClientConnectionManager.java:98)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.(PoolingHttpClientConnectionManager.java:105)
at com.crawler.http.HttpQuery.(HttpQuery.java:129)
at com.crawler.http.HttpQuery.getInstance(HttpQuery.java:90)
at com.crawler.App.main(App.java:23)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 8 more

2个回答

zhuzige521888
zhuzige521888   2016.09.07 17:27
已采纳

是不是配置文件中调用到了org.apache.commons.logging.LogFactory,结果找不到

bobyang888
bobyang888   2016.09.07 19:47

缺少jar包,logfactory

Csdn user default icon
上传中...
上传图片
插入图片