apache / incubator-hugegraph

A graph database that supports more than 100+ billion data, high performance and scalability (Include OLTP Engine & REST-API & Backends)
https://hugegraph.apache.org
Apache License 2.0
2.62k stars 518 forks source link

tool工具查询返回NO such property错误 #186

Closed mengquanrun closed 2 years ago

mengquanrun commented 5 years ago

Expected behavior 期望表现

正确返回

Actual behavior 实际表现

返回No such property error 执行bin/hugegraph gremlin-execute -s "g.V().hasLabel("account").limit(1)" 但是查询label时会返回account 并且相同的语句,在studio上可以成功执行

异常信息如下: Exception in thread "main" groovy.lang.MissingPropertyException: No such property: account for class: Script9 at com.baidu.hugegraph.exception.ServerException.fromResponse(ServerException.java:44) at com.baidu.hugegraph.client.RestClient.checkStatus(RestClient.java:63) at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:119) at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:79) at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:74) at com.baidu.hugegraph.api.gremlin.GremlinAPI.post(GremlinAPI.java:41) at com.baidu.hugegraph.driver.GremlinManager.execute(GremlinManager.java:47) at com.baidu.hugegraph.api.gremlin.GremlinRequest$Builder.execute(GremlinRequest.java:55) at com.baidu.hugegraph.manager.GremlinManager.execute(GremlinManager.java:49) at com.baidu.hugegraph.cmd.HugeGraphCommand.execute(HugeGraphCommand.java:165) at com.baidu.hugegraph.cmd.HugeGraphCommand.main(HugeGraphCommand.java:269) Caused by: groovy.lang.MissingPropertyException: No such property: account for class: Script9 at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53) at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:52) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:307) at Script9.run(Script9.groovy:1) at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:834) at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:547) at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233) at org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines.eval(ScriptEngines.java:120) at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$2(GremlinExecutor.java:314) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.baidu.hugegraph.auth.HugeGraphAuthProxy$ContextTask.run(HugeGraphAuthProxy.java:290) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

Specifications of environment 环境信息

javeme commented 5 years ago

@mengquanrun 应该是shell引号问题,把"account"的双引号改为单引号试试。

github-actions[bot] commented 2 years ago

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