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

Http-Clinet连接不上显示

Open charriyu opened this issue 7 years ago • 2 comments

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)

我是使用maven-assembly-plugin进行打包成一个jar执行 pom文件配置如下 com.baidu.hugegraph hugegraph-client 1.6.4 org.apache.tinkerpop gremlin-driver 3.3.3 com.baidu.hugegraph hugegraph-common 1.5.3

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <source>8</source>
                <target>8</target>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
                <archive>
                    <manifest>
                        <mainClass>Test.SubGraph</mainClass>
                    </manifest>
                </archive>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
            </configuration>
            <!--下面是为了使用 mvn package命令,如果不加则使用mvn assembly-->
            <executions>
                <execution>
                    <id>make-assemble</id>
                    <phase>package</phase>
                    <goals>
                        <goal>single</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

charriyu avatar Apr 16 '19 02:04 charriyu

@ychmc 请参考 #257 。这个问题也会在0.9版中允许打包成一个jar。

javeme avatar Apr 16 '19 03:04 javeme

Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label

github-actions[bot] avatar Jan 01 '22 21:01 github-actions[bot]