1

I am trying to setup crawler4j via eclipse(juno). When I run it, I am getting the below exception(even though the program keeps running without logging anything):

"Exception in thread "main" java.lang.NoSuchMethodError: com.sleepycat.je.EnvironmentConfig.setAllowCreate(Z)Lcom/sleepycat/je/EnvironmentConfig; at edu.uci.ics.crawler4j.crawler.CrawlController.(CrawlController.java:90) at packCrawler.BasicCrawlController.main(BasicCrawlController.java:81)" error?. I am also getting the same error. When I clicked on (CrawlController.java:90)"

I could see that there is no source attached for CrawlController in crawler4j-3.4.jar. So I can't make out whether there is method "setAllowCreate" or not.

There is similar post at : NoSuchMethodError in crawler4j CrawelController class

But it does not exactly say how the problem got fixed. Does anybody have any suggestion?

Thanks very much for your time. Neha

Community
  • 1
  • 1
neha
  • 11
  • 2
  • Also,I have added the jar crawler4j-3.0-sources having CrawlController.java with setAllowCreate method. But still getting the error. – neha Nov 24 '12 at 23:34
  • It got solved, surely it was some version error. I can not pin point exactly but I created afresh the crawler4j project using crawler4j-3.3.zip and crawler4j-3.x-dependencies.zip.I built the project, added my source folder with 2 classes which I wanted to run and that is all. – neha Nov 24 '12 at 23:56
  • hi, if you find my answer ok, may I ask you to accept it please ? – Chaiavi Aug 26 '15 at 14:16

1 Answers1

1

Look at the new crawler4j github: https://github.com/yasserg/crawler4j

Use the maven dependency system and all of your trouble will be gone!:

<dependency>
    <groupId>edu.uci.ics</groupId>
    <artifactId>crawler4j</artifactId>
    <version>4.2</version>
</dependency>

You will get the latest version (now on github instead of google code)

Using an Dependency Management Tool such as Maven, you will automatically escape all classpath hell...

Chaiavi
  • 769
  • 9
  • 23