-
Notifications
You must be signed in to change notification settings - Fork 75
the example provided don't work, errorinfo: Vertex does not support user supplied identifiers #231
Comments
Thanks for issue this, could you please provide more information about this ? like spring boot version, spring data gremlin version, as well as minimal code to reproduce ? |
I am getting the same issue with an OrientDB gremlin server on Mac. To reproduce:
|
Can u reproduce this behavior with Gremlin server ? |
Yes. The orientdb-tp3-* release contains a gremlin server (which is what I tested above). I also tried it from the standalone gremlin-server 3.4.2 downloaded from https://tinkerpop.apache.org/ and I get exactly the same error. I just tested the gremlin server using the neo4j backend and it also has the same issue. To reproduce it with Neo4J:
In the spring-data-gremlin example directory:
I just noticed that this seems to be similar: #142 |
gremlin server version greater than 3.3.4 has breaking change, it is known issue here. Could you please help to try this version ? |
I just tried with gremlin-server version 3.3.4 using neo4j-gremlin 3.3.4 plugin and I get the exact same error. I get the same error with versions 3.3.3 also. |
|
Does that mean that this project doesn't support Neo4J and OrientDB or is there a workaround? |
Any news on this? When I don't set the IDs manually and leave it to Spring I get another error: java.lang.IllegalArgumentException: should contain a type property |
@stozk Thanks for reaching out to us. Could you please provide more information about this? Like version, stacktrace or minimal code to reproduce it? |
I'm using
The Vertex entities are modeled simple with one AAS relation to one SmartService with an AssetRelation Edge. As mentioned I have removed the ID argument from the constructor and left the assignment of IDs to Spring. Providing an ID manually resulted in "Vertex does not support user supplied identifiers" as mentioned by the OP.
When I trigger the code this comes up:
When I actually try to create a Graph with connected Vertexes I get this exact problem as stated here:
|
|
Yeah, number 2 is quite clearly caused by an id not being automatically generated respectively assigned. Here's the serializer settings from the gremlin-server.yml
I have no idea what I'm doing, so I just tried different variants from here: Same outcome, when I comment it out completely the standard fallback is GraphSONMessageSerializerV2d0. Could the problem be that orientDB doesn't use Strings as IDs but ORID Objects? |
|
Yes, I've tried to change it, same result. So is it even possible to use this library with orienDB? |
@stozk I haven't tried the OrientDB yet. But this project does work with any Gremlin-compatible data store. |
I have now changed the serializer to this in the gremlin-server.yaml:
Now I get a new error ;-)
I have found this on stackoverflow regarding a similar error, but with Janusgraph instead of orientDB: They resolved the error by registering the JanusGraphIoRegistry on the client side:
In my case I guess I would have to register the org.apache.tinkerpop.gremlin.orientdb.io.OrientIoRegistry on my client side? But the GremlinConfig build only takes in the serializer String. Is it possible to configure it with the OrientIoRegistry too? |
I've found another similar example, which has also been resolved by adding the registry to the serializer config on the client side. orientechnologies/orientdb-gremlin#161 (comment)
So it's generally possible, but how would you do it with this libray? |
hi all, I got the same issue with Spring-Data-Gremlin working with my JanusGraph (docker). I'm using both with latest version. Anyone have ever resolved the issue yet? |
I got the same issue while running the provided example with command: my JanusGraph version is 0.4.0 Is there some good news? |
I've come to the conclusion that this project does not work with any gremlin-compatible data source (as it claims). The provided example does not work with OrientDB nor Neo4J exposed via Tinkerpop servers (see my previous posts in this issue). Has anybody tested that it works with OrientDB or Neo4J? If this project doesn't work with these databases then that should be stated in the documentation somewhere close to the claim that it works with any gremlin-compatible data source so that people are not mislead. |
Had the same issues trying it out with Amazon Neptune. |
Closing this issue. |
Your issue may already be reported! Please search before creating a new one.
Expected Behavior
examples run successfully
Current Behavior
raise a exeception:
org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Vertex does not support user supplied identifiers
11253624 [gremlin-server-exec-4] WARN org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor - Exception processing a script on request [RequestMessage{, requestId=63a49f3d-3d52-438f-8f5c-babc487f70db, op='eval', processor='', args={gremlin=g.addV('Person').property(id, '1').property('name', '56').property('_classname', 'com.finsight.kgcp.examples.janusgraph.entity.Person').property('age', 'LH'), batchSize=64}}].
java.lang.UnsupportedOperationException: Vertex does not support user supplied identifiers
at org.apache.tinkerpop.gremlin.structure.Vertex$Exceptions.userSuppliedIdsNotSupported(Vertex.java:163)
at org.janusgraph.graphdb.tinkerpop.JanusGraphBlueprintsTransaction.addVertex(JanusGraphBlueprintsTransaction.java:105)
at org.janusgraph.graphdb.tinkerpop.JanusGraphBlueprintsGraph.addVertex(JanusGraphBlueprintsGraph.java:140)
at org.janusgraph.graphdb.tinkerpop.JanusGraphBlueprintsGraph.addVertex(JanusGraphBlueprintsGraph.java:59)
at org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStartStep.processNextStart(AddVertexStartStep.java:91)
at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:192)
at org.apache.tinkerpop.gremlin.server.op.AbstractOpProcessor.handleIterator(AbstractOpProcessor.java:89)
at org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor.lambda$evalOpInternal$5(AbstractEvalOpProcessor.java:252)
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:274)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
Your Environment
The text was updated successfully, but these errors were encountered: