问题描述
我使用的示例是此处,并从[here](http://code.google.com/p/我的构建路径和运行路径中的crawler4j/downloads/list).
I am using example given here And included necessary files(crawler4j-3.3.zip &crawler4j-3.x-dependencies.zip) from [here] (http://code.google.com/p/crawler4j/downloads/list) in my build path and run path.
我收到此错误:
Exception in thread "main" java.lang.NoSuchMethodError: com.sleepycat.je.EnvironmentConfig.setAllowCreate(Z)Lcom/sleepycat/je/EnvironmentConfig; at edu.uci.ics.crawler4j.crawler.CrawlController.<init>(CrawlController.java:90) at edu.uci.ics.crawler4j.examples.basic.BasicCrawlController.main(BasicCrawlController.java:100)log4j:WARN No appenders could be found for logger (org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager).log4j:WARN Please initialize the log4j system properly.
.
Exception in thread "main" java.lang.NoSuchMethodError: com.sleepycat.je.EnvironmentConfig.setAllowCreate(Z)Lcom/sleepycat/je/EnvironmentConfig; at edu.uci.ics.crawler4j.crawler.CrawlController.<init>(CrawlController.java:90) at edu.uci.ics.crawler4j.examples.basic.BasicCrawlController.main(BasicCrawlController.java:100)log4j:WARN No appenders could be found for logger (org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager).log4j:WARN Please initialize the log4j system properly.
.
我无法理解错误的原因,因为此文件,请参见第75行.
I am not able to understand the reason of error as there is required function in this file, see line number 75.
请帮帮我.我在Java方面没有很多专业知识.此问题是否与此有关.如果是,如何解决.
Please help me out . I dont have much expertise in Java . Is this problem is related to this. If yes, how to fix it.
推荐答案
是.该问题与 JBCACHE-1611 非常相似.它与 Berkeley DB Java版版本不兼容.
Yes. The problem is very similar to JBCACHE-1611. It is version incompatibility with Berkeley DB Java Edition.
只需检查您是否具有正确依赖项的 crawler4j 的最新版本( crawler4j-3.3.zip
和crawler4j-3.x-dependencies.zip
).这应该可以揭示问题所在.
Just check that you have the latest version of crawler4j with proper dependencies (crawler4j-3.3.zip
and crawler4j-3.x-dependencies.zip
).This should reveal the problem.
如果没有,请尝试从依赖于je-4.0.92.jar的源代码构建crawler4j.
If it doesn't, try building crawler4j from source with dependency on je-4.0.92.jar.
这篇关于crawler4j CrawelController类中的NoSuchMethodError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!