分享

nutch 2.2 org.apache.gora.sql.store.SqlStore

zhanggl 发表于 2014-9-25 21:05:38 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 3 14922
hadoop@hadoop:~/tool/nutch-2.2.1/runtime/local/bin$ ./nutch crawl urls -depth 3 -topN 5
Exception in thread "main" java.lang.ClassNotFoundException: org.apache.gora.sql.store.SqlStore
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    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:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:190)
    at org.apache.nutch.storage.StorageUtils.getDataStoreClass(StorageUtils.java:89)
    at org.apache.nutch.storage.StorageUtils.createWebStore(StorageUtils.java:73)
    at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:221)
    at org.apache.nutch.crawl.Crawler.runTool(Crawler.java:68)
    at org.apache.nutch.crawl.Crawler.run(Crawler.java:136)
    at org.apache.nutch.crawl.Crawler.run(Crawler.java:250)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at org.apache.nutch.crawl.Crawler.main(Crawler.java:257)

我的ivy.xml配置文件该修改的都修改了还是报错呢
  1. <dependency org="org.apache.gora" name="gora-sql" rev="0.1.1-incubating" conf="*->default" />
  2.     <!-- Uncomment this to use MySQL as database with SQL as Gora store. -->
  3.     <dependency org="mysql" name="mysql-connector-java" rev="5.5.8" conf="*->default"/>
  4.     <!-- Uncomment this to use HBase as Gora backend. -->
  5.     <!--
  6.     <dependency org="org.apache.gora" name="gora-hbase" rev="0.3" conf="*->default" />
  7.     -->
  8.     <!-- Uncomment this to use Accumulo as Gora backend. -->
  9.     <!--
  10.     <dependency org="org.apache.gora" name="gora-accumulo" rev="0.3" conf="*->default" />
  11.     -->
  12.     <!-- Uncomment this to use Cassandra as Gora backend. -->
  13.     <dependency org="org.apache.gora" name="gora-cassandra" rev="0.2.1" conf="*->default"-- />
复制代码



已有(3)人评论

跳转到指定楼层
pig2 发表于 2014-9-25 21:30:41
注销的还不够,只留下这行即可,其余都去掉
  1.   <dependency org="org.apache.gora" name="gora-cassandra" rev="0.2.1" conf="*->default"-- />
复制代码



回复

使用道具 举报

zhanggl 发表于 2014-9-26 10:12:20
pig2 发表于 2014-9-25 21:30
注销的还不够,只留下这行即可,其余都去掉

应该不是这个问题:配置你能说具体点吗?
  1.     <dependency org="org.restlet.jse" name="org.restlet" rev="2.0.5" conf="*->default" />
  2.     <dependency org="org.restlet.jse" name="org.restlet.ext.jackson" rev="2.0.5"
  3.       conf="*->default" />
  4.     <!--================-->
  5.     <!-- Gora artifacts -->
  6.     <!--================-->
  7.    <!-- <dependency org="org.apache.gora" name="gora-core" rev="0.2.1" conf="*->default"/>-->
  8.     <!-- Uncomment this to use SQL as Gora backend. It should be noted that the
  9.     gora-sql 0.1.1-incubating artifact is NOT compatable with gora-core 0.3. Users should
  10.     downgrade to gora-core 0.2.1 in order to use SQL as a backend. -->
  11.     <!--dependency org="org.apache.gora" name="gora-sql" rev="0.1.1-incubating" conf="*->default" --/>
  12.    
  13.     <!-- Uncomment this to use MySQL as database with SQL as Gora store. -->
  14.     <!--dependency org="mysql" name="mysql-connector-java" rev="5.5.38" conf="*->default"--/>
  15.    
  16.     <!-- Uncomment this to use HBase as Gora backend. -->
  17.     <!--
  18.     <dependency org="org.apache.gora" name="gora-hbase" rev="0.3" conf="*->default" />
  19.     -->
  20.     <!-- Uncomment this to use Accumulo as Gora backend. -->
  21.     <!--
  22.     <dependency org="org.apache.gora" name="gora-accumulo" rev="0.3" conf="*->default" />
  23.     -->
  24.     <!-- Uncomment this to use Cassandra as Gora backend. -->
  25.     <dependency org="org.apache.gora" name="gora-cassandra" rev="0.2.1" conf="*->default"/>
  26.     <!--global exclusion -->
  27.     <exclude module="ant" />
  28.     <exclude module="slf4j-jdk14" />
复制代码



回复

使用道具 举报

pig2 发表于 2014-9-26 12:36:25
zhanggl 发表于 2014-9-26 10:12
应该不是这个问题:配置你能说具体点吗?
没有接触你的环境,你可以自己试验,我的建议是,在你的这个配置里
<dependency org="org.apache.gora" name="gora-sql" rev="0.1.1-incubating" conf="*->default" />

    <!-- Uncomment this to use MySQL as database with SQL as Gora store. -->

    <dependency org="mysql" name="mysql-connector-java" rev="5.5.8" conf="*->default"/>

    <!-- Uncomment this to use HBase as Gora backend. -->
    <!--
    <dependency org="org.apache.gora" name="gora-hbase" rev="0.3" conf="*->default" />
    -->
    <!-- Uncomment this to use Accumulo as Gora backend. -->
    <!--
    <dependency org="org.apache.gora" name="gora-accumulo" rev="0.3" conf="*->default" />
    -->
    <!-- Uncomment this to use Cassandra as Gora backend. -->

    <dependency org="org.apache.gora" name="gora-cassandra" rev="0.2.1" conf="*->default"-- />
只留下这个配置:
  1.   <dependency org="org.apache.gora" name="gora-cassandra" rev="0.2.1" conf="*->default"-- />
复制代码

其余都去掉。

如果你有更好的方案或则方法,你可以按照你自己的思路,这里只是给你一些提示和建议。


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条