问题
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