使用java client更新边的属性,报错
Expected behavior 期望表现
使用java代码更新边的属性:
Edge edges = hugeClient.graph().getEdge("S10:[email protected]>41>>S11:2811").property("LAST_1_DAY_TOTAL",30);
期望能更新成功,在studio里面使用如下语句更新边的属性是ok的:
g.E('S10:[email protected]>41>>S11:2811').property('LAST_15_DAY_TOTAL',80)
Actual behavior 实际表现
提示边id中的“>”有问题,错误信息如下:
Exception in thread "main" null:
1: org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.getRequestUri(GrizzlyHttpContainer.java:491) 2: org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:366) 3: org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224) 4: org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:593) 5: org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573) 6: java.lang.Thread.run(Thread.java:745)Root Cause: java.net.URISyntaxException: Illegal character in path at index 87: http://xxxxxx/graphs/hugegraph/graph/edges/S10:[email protected]>41>>S11:2811
1: java.net.URI$Parser.fail(URI.java:2848) 2: java.net.URI$Parser.checkChars(URI.java:3021) 3: java.net.URI$Parser.parseHierarchical(URI.java:3105) 4: java.net.URI$Parser.parse(URI.java:3053) 5: java.net.URI.Please see the log for more detail.(URI.java:588) 6: org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.getRequestUri(GrizzlyHttpContainer.java:489) 7: org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:366) 8: org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224) 9: org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:593) 10: org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573) ... 1 more
Steps to reproduce the problem 复现步骤
- {step 1}
- {step 2}
- {step 3}
Status of loaded data 数据状态
Vertex/Edge summary 数据量
- loaded vertices amount: 几百个
- loaded edges amount: 五六千
- loaded time: {like 200s}
Vertex/Edge example 数据示例
{type something here...}
Schema(VertexLabel, EdgeLabel, IndexLabel) 元数据结构
{type something here...}
Specifications of environment 环境信息
- hugegraph version: v0.8.0
- operating system: centos7.x
- hugegraph backend: cassandra
求教!
@jizhidezhaojun 你用的hugegraph-server和hugegraph-client分别是哪个版本的?还有你可以在postman或restlet中直接请求http://xxxxxx/graphs/hugegraph/graph/edges/S10:[email protected]>41>>S11:2811试试,看有没有报错,比如这样:

感谢回复!找到问题了,我们的hugegraph-server通过nginx代理,问题出在nginx上,前端发出请求对Url进行编码,nginx接收到然后解码,转发给hugegraph-server时没有再次编码引发的问题,已解决!
这个问题可以close掉了:)