不支持的记录类型异常:OrientDb、Gremlin、Java

不支持的记录类型异常:OrientDb、Gremlin、Java,java,gremlin,orientdb,Java,Gremlin,Orientdb,我在Java类中使用Groovy gremlin遍历orient db并查看以下问题。如果我使用: g.V('@class','Person').has('city-name','NY').in('city-depends').toList() 我得到的是基于城市的人,如果我尝试使用转换也得到了使用边缘朋友的人的朋友 g.V('@class','Person').has('city-name','NY').in('city- depends').transform({[it,it.in('f

我在Java类中使用Groovy gremlin遍历orient db并查看以下问题。如果我使用:

g.V('@class','Person').has('city-name','NY').in('city-depends').toList()
我得到的是基于城市的人,如果我尝试使用转换也得到了使用边缘朋友的人的朋友

g.V('@class','Person').has('city-name','NY').in('city-  depends').transform({[it,it.in('friends').toList()]}).toList()
我想要的是城市居民的信息和他们的朋友信息(不仅仅是边缘id)

堆栈跟踪: 代码:
OGremlinHelper.global().create();
ScriptEngine=new GremlinGroovyScriptEngineFactory().getScriptEngine();
getBindings(ScriptContext.engine_SCOPE).put(“g”,图形);
OCommandGremlin命令=新的OCommandGremlin(“…”);
Map params=新的HashMap();
List agg1=graph.getRawGraph().command(command).execute(params);
System.out.println(“结果:-”+agg1);

我还阅读并使用了orientdb sql中的traverse,它将获得结果集的整个太阳图(包括所有边及其属性)。是否存在任何与gremlin等效的函数来获得类似的结果。谢谢您使用的是什么版本?请尝试1.7-SNAPSHOT。@Lvca感谢您的回复。我正在使用gremlin java的2.5.0-SNAPSHOT和1.7-rc1 orient库。请查看列表:--com.tinkerpop.gremlin-gremlin java-2.5.0-SNAPSHOT,com.orientechnologies-orient-commons-1.7-rc2,com.orientechnologies-orientdb-core-1.7-rc2,com.orientechnologies-orientdb-graphdb-1.7-rc2,com.orientechnologies-orientdb-client-1.7-rc2,com.orientechnologies-orientdb-object-1.7-rc2,com.orientechnologies-orientdb-enterprise-1.7-rc2,我看到您使用的是rc2而不是rc1。您可以试试最后一个1.7快照吗?谢谢@Lvca。我将尝试使用1.7-SNAPSHOT。但现在我的首要任务是使用orientDbSQL获得orientdb的性能数字。我们也将非常感谢您的帮助。
com.orientechnologies.orient.core.exception.OStorageException: Error on executing command: 

at com.orientechnologies.orient.client.remote.OStorageRemote.handleException(OStorageRemote.java:1481)

at com.orientechnologies.orient.client.remote.OStorageRemote.command(OStorageRemote.java:1059)

at com.orientechnologies.orient.client.remote.OStorageRemoteThread.command(OStorageRemoteThread.java:430)

at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:59)

at orientdb.prototype.OrientGremlinExample.getActivityByResource(OrientGremlinExample.java:87)

at orientdb.prototype.OrientGremlinExample.main(OrientGremlinExample.java:26)

Caused by: java.lang.IllegalArgumentException: Unsupported record type: 0

at com.orientechnologies.orient.core.record.ORecordFactoryManager.newInstance(ORecordFactoryManager.java:93)

at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryProtocol.readIdentifiable(OChannelBinaryProtocol.java:121)

at com.orientechnologies.orient.client.remote.OStorageRemote.command(OStorageRemote.java:1023)

... 4 more

Caused by: java.lang.IllegalArgumentException: Record type '0' is not supported

at com.orientechnologies.orient.core.record.ORecordFactoryManager.getFactory(ORecordFactoryManager.java:108)

at com.orientechnologies.orient.core.record.ORecordFactoryManager.newInstance(ORecordFactoryManager.java:91)

... 6 more
OGremlinHelper.global().create();

ScriptEngine engine = new GremlinGroovyScriptEngineFactory().getScriptEngine();

engine.getBindings(ScriptContext.ENGINE_SCOPE).put("g", graph);

OCommandGremlin command = new OCommandGremlin(" ...... ");

Map<String, Object> params = new HashMap<String, Object>();

List agg1 = graph.getRawGraph().command(command).execute(params);

System.out.println("Result:-- " + agg1);