Repository navigation
why can not create a Vertex with property key 'hasLocation' #3021
Answered
by
li-boxuan
rever67697
asked this question in
Q&A
gremlin> g.V(89211000).property("hasLocation",'55156736')
The type of given name is not a key: hasLocation
Type ':help' or ':h' for help.
Display stack trace? [yN]y
java.lang.IllegalArgumentException: The type of given name is not a key: hasLocation
at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.getOrCreatePropertyKey(StandardJanusGraphTx.java:1100)
at org.janusgraph.graphdb.vertices.AbstractVertex.property(AbstractVertex.java:165)
at org.janusgraph.graphdb.vertices.AbstractVertex.property(AbstractVertex.java:160)
at org.janusgraph.core.JanusGraphVertex.property(JanusGraphVertex.java:72)
at org.janusgraph.core.JanusGraphVertex.property(JanusGraphVertex.java:33)
at org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AddPropertyStep.sideEffect(AddPropertyStep.java:169)
at org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectStep.processNextStart(SideEffectStep.java:39)
at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:150)
at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:222)
at org.apache.tinkerpop.gremlin.server.op.AbstractOpProcessor.handleIterator(AbstractOpProcessor.java:97)
at org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor.lambda$evalOpInternal$5(AbstractEvalOpProcessor.java:263)
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:283)
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) |
Answered by
li-boxuan
Apr 25, 2022
Replies: 2 comments 3 replies
gremlin> g.V(89211000).elementMap()
==>{id=89211000, _hasLocation=55156736, has_Location=55156736, has_location=55156736, haslocation=55156736}but above key name can success |
0 replies
|
My best guess is |
3 replies
Answer selected by
rever67697
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My best guess is
hasLocationwas defined as a label earlier. Can you runmgmt.printSchema()and paste the results here?