简体   繁体   中英

Apache nutch inject urls

I am new to Apache Nutch(2.3.1) and mongodb(3.4.7). After instalation steps I want to inject urls and crawl wikipedia website. when I run "./nutch inject urls" in terminal I faced to this error.

~/apache-nutch-2.3.1/runtime/local/bin$ ./nutch inject urls InjectorJob: starting at 2017-11-26 19:07:35 InjectorJob: Injecting urlDir: urls InjectorJob: org.apache.gora.util.GoraException: java.lang.NullPointerException at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:167) at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:135) at org.apache.nutch.storage.StorageUtils.createWebStore(StorageUtils.java:78) at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:218) at org.apache.nutch.crawl.InjectorJob.inject(InjectorJob.java:252) at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:275) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.nutch.crawl.InjectorJob.main(InjectorJob.java:284) Caused by: java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936) at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:964) at org.apache.gora.mongodb.store.MongoStore.getDB(MongoStore.java:192) at org.apache.gora.mongodb.store.MongoStore.initialize(MongoStore.java:122) at org.apache.gora.store.DataStoreFactory.initializeDataStore(DataStoreFactory.java:102) at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:161) ... 7 more

Actually I had set wrong Mongo database'name in $NUTCH_HOME/conf/gora.properties file. After fix it , Apache nutch work correctly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM