2013-10-02 46 views
1

我是新手。我正在使用nutch 1.7並完成抓取。 我的問題是如何檢索抓取數據? 在nutch 1.1中有一個名爲org.apache.nutch.searcher的包提供了這個包。 但如果我導入nutch1.1.jar在我的Java應用程序,並嘗試運行舊代碼org.apache.nutch.searcher in nutch 1.7

http://wiki.apache.org/nutch/JavaDemoApplication(可見在此鏈接)

它給了我這個錯誤:

java.lang.VerifyError: class org.apache.nutch.indexer.NutchSimilarity overrides final method lengthNorm.(Ljava/lang/String;I)F 
    at java.lang.ClassLoader.defineClass1(Native Method) 
    at java.lang.ClassLoader.defineClass(ClassLoader.java:792) 
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) 
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) 
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71) 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361) 
    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:424) 
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 
    at org.apache.nutch.searcher.LuceneSearchBean.init(LuceneSearchBean.java:84) 
    at org.apache.nutch.searcher.LuceneSearchBean.<init>(LuceneSearchBean.java:51) 
    at org.apache.nutch.searcher.NutchBean.<init>(NutchBean.java:103) 
    at org.apache.nutch.searcher.NutchBean.<init>(NutchBean.java:78) 
    at MyCrawler.main(MyCrawler.java:57) 

有任何想法嗎? 謝謝 Danilo

回答