hbase和solr独立示例图形示例化错误

xa9qqrwz  于 2021-06-09  发布在  Hbase
关注(0)|答案(1)|浏览(196)

我第一次尝试使用janusgraph。我设置了一个hbase和solr的本地会话,但是当我尝试运行hbase和solr独立示例时:

mvn exec:java -pl :example-hbase -Dexample.config="\${project.basedir}/conf/jgex-hbase-solr-http.properties"

我得到这个堆栈跟踪错误:

19:49:55 ERROR org.janusgraph.example.GraphApp - GraphFactory could not instantiate this Graph implementation [class org.janusgraph.core.JanusGraphFactory]
java.lang.RuntimeException: GraphFactory could not instantiate this Graph implementation [class org.janusgraph.core.JanusGraphFactory]
    at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:82) ~[gremlin-core-3.4.1.jar:3.4.1]
    at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:70) ~[gremlin-core-3.4.1.jar:3.4.1]
    at org.janusgraph.example.GraphApp.openGraph(GraphApp.java:59) ~[example-common-0.4.0.jar:na]
    at org.janusgraph.example.JanusGraphApp.openGraph(JanusGraphApp.java:68) [example-common-0.4.0.jar:na]
    at org.janusgraph.example.GraphApp.runApp(GraphApp.java:290) ~[example-common-0.4.0.jar:na]
    at org.janusgraph.example.JanusGraphApp.main(JanusGraphApp.java:241) [example-common-0.4.0.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_222]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_222]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_222]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_222]
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282) [exec-maven-plugin-1.6.0.jar:na]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_222]
Caused by: java.lang.reflect.InvocationTargetException: null
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_222]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_222]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_222]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_222]
    at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:78) ~[gremlin-core-3.4.1.jar:3.4.1]
    ... 11 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/client/TableDescriptor
    at org.janusgraph.diskstorage.hbase.HConnection1_0.getAdmin(HConnection1_0.java:43) ~[janusgraph-hbase-0.4.0.jar:na]
    at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getAdminInterface(HBaseStoreManager.java:978) ~[janusgraph-hbase-0.4.0.jar:na]
    at org.janusgraph.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:719) ~[janusgraph-hbase-0.4.0.jar:na]
    at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getLocalKeyPartition(HBaseStoreManager.java:537) ~[janusgraph-hbase-0.4.0.jar:na]
    at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getDeployment(HBaseStoreManager.java:376) ~[janusgraph-hbase-0.4.0.jar:na]
    at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getFeatures(HBaseStoreManager.java:418) ~[janusgraph-hbase-0.4.0.jar:na]
    at org.janusgraph.graphdb.configuration.builder.GraphDatabaseConfigurationBuilder.build(GraphDatabaseConfigurationBuilder.java:51) ~[janusgraph-core-0.4.0.jar:na]
    at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:161) ~[janusgraph-core-0.4.0.jar:na]
    at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:132) ~[janusgraph-core-0.4.0.jar:na]
    at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:112) ~[janusgraph-core-0.4.0.jar:na]
    ... 16 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.client.TableDescriptor
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_222]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_222]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_222]
    ... 26 common frames omitted
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.483s
[INFO] Finished at: Tue Aug 06 19:49:55 PDT 2019
[INFO] Final Memory: 31M/1571M
[INFO] ------------------------------------------------------------------------

到目前为止,我一直在遵循https://github.com/janusgraph/janusgraph/tree/master/janusgraph-examples/example-hbase 以及https://hbase.apache.org/book.html 这是在centos 7上运行的。我很确定这与我的hbase配置或jgex-hbase-solr-http.properties有关。我不确定在哪里可以找到导致graphfactory以这种方式失败的原因,但是任何帮助都将不胜感激。
谢谢您!

goqiplq2

goqiplq21#

我也遇到了同样的问题。我修改了 hbase-shaded-clientexample-hbase${hbase2.version} ,并安装版本为2.0.5的hbase。

相关问题