我正在尝试第一次使用JanusGraph。我设置了Hbase和Solr的本地会话,但是当我尝试使用以下命令运行HBase和Solr Standalone示例时:
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失败的原因,但是任何帮助将不胜感激。
谢谢!
答案 0 :(得分:0)
我在这里遇到了同样的问题。我通过将hbase-shaded-client
中example-hbase
的版本修改为${hbase2.version}
来修复它,并安装了版本2.0.5的HBase。