NoSuchMethodError in crawler4j CrawelController class

浪子不回头ぞ 提交于 2019-12-24 10:11:14

问题


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.

I am getting this error:

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. .

I am not able to understand the reason of error as there is required function in this file, see line number 75.

Please help me out . I dont have much expertise in Java . Is this problem is related to this. If yes, how to fix it.


回答1:


Yes. The problem is very similar to JBCACHE-1611. It is version incompatibility with Berkeley DB Java Edition.

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.

If it doesn't, try building crawler4j from source with dependency on je-4.0.92.jar.




回答2:


It might be a issue related with revision between libs, you can try this http://www.java2s.com/Code/Jar/j/Downloadje4092jar.htm to find a higher version



来源:https://stackoverflow.com/questions/12160206/nosuchmethoderror-in-crawler4j-crawelcontroller-class

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!