incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

Hugeclient连接时报错

Open fisherinbox opened this issue 8 years ago • 4 comments

Expected behavior 期望表现

{type something here...}

Actual behavior 实际表现

在idea编译器中运行可以,打包之后用java -cp命令运行报错 HugeClient hugeClient = new HugeClient("http://localhost:8088", "hugegraph"); 这一句连接报错 Exception in thread "main" java.lang.ExceptionInInitializerError at com.baidu.hugegraph.driver.HugeClient.(HugeClient.java:34) at HugegraphApi.BatchExample.main(BatchExample.java:53) Caused by: java.lang.IllegalArgumentException: The version to match is null at com.google.common.base.Preconditions.checkArgument(Preconditions.java:146) at com.baidu.hugegraph.util.E.checkArgumentNotNull(E.java:62) at com.baidu.hugegraph.util.VersionUtil.match(VersionUtil.java:37) at com.baidu.hugegraph.util.VersionUtil.check(VersionUtil.java:52) at com.baidu.hugegraph.version.ClientVersion.check(ClientVersion.java:38) at com.baidu.hugegraph.version.ClientVersion.(ClientVersion.java:29) ... 2 more

Steps to reproduce the problem 复现步骤

  1. {step 1}
  2. {step 2}
  3. {step 3}

Status of loaded data 数据状态

Vertex/Edge summary 数据量

  • loaded vertices amount: {like 10 million}
  • loaded edges amount: {like 20 million}
  • loaded time: {like 200s}

Vertex/Edge example 数据示例

{type something here...}

Schema(VertexLabel, EdgeLabel, IndexLabel) 元数据结构

{type something here...}

Specifications of environment 环境信息

  • hugegraph version: {like v0.7.4}
  • operating system: {like centos 7.4, 32 CPUs, 64G RAM}
  • hugegraph backend: {like cassandra 3.10, cluster with 20 nodes, 3 x 1TB HDD disk each node}

fisherinbox avatar Oct 31 '18 11:10 fisherinbox

请问是如何打包的?是把client和所有的依赖都添加到一个大的jar包里,还是依赖放到了额外的lib目录下?如果是后者的话是否在命令行中指定classpath。

Linary avatar Nov 02 '18 03:11 Linary

@Linary 是用maven assembly plugin打到了一个jar包中,我在jar包中可以看到hugegraph相关的依赖

fisherinbox avatar Nov 02 '18 03:11 fisherinbox

你把那个大的jar包解压,能看到hugegraph-common的依赖吗?如果方便,可以发一下pom文件吗(回复框可以上传文件)?

Linary avatar Nov 05 '18 07:11 Linary

参考:https://github.com/hugegraph/hugegraph/issues/257

Linary avatar Dec 18 '18 08:12 Linary