could to find or load main class org.apache.nutch.crawl.InjectorJob

十年热恋 提交于 2020-01-23 05:35:14

问题


I'm using Linux with Hadoop, Cloudera and HBase.

Could you tell me how to correct this error?

Error: could to find or load main class org.apache.nutch.crawl.InjectorJob

The following command gave me the error:

src/bin/nutch inject crawl/crawldb dmoz/

if you need any other information ask for me.


回答1:


I think you probably missed a step or two. Please confirm:

  1. Did you install Apache ANT and then navigate to the nutch folder and type in "ant"?
  2. Did you set the environment variables:
    • NUTCH_JAVA_HOME: The java implementation to use. Overrides JAVA_HOME.
    • NUTCH_HEAPSIZE: The maximum amount of heap to use, in MB. Default is 1000.
    • NUTCH_OPTS: Extra Java runtime options.Multiple options must be separated by white space.
    • NUTCH_LOG_DIR: Log directory (default: $NUTCH_HOME/logs)
    • NUTCH_LOGFILE: Log file (default: hadoop.log)
    • NUTCH_CONF_DIR: Path(s) to configuration files (default: $NUTCH_HOME/conf). Multiple paths must be separated by a colon ':'.
    • JAVA_HOME
    • NUTCH_JAVA_HOME
    • NUTCH_HOME

If you install using "ant", then you will get a new folder in /nutch called /nutch/runtime/local and this is from where you must actually run nutch.

Tip: Try reading this page.



来源:https://stackoverflow.com/questions/28938612/could-to-find-or-load-main-class-org-apache-nutch-crawl-injectorjob

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