You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Asaf Shakarchi (JIRA)" <ji...@apache.org> on 2015/07/16 17:25:05 UTC

[jira] [Commented] (TINKERPOP3-770) Exception while AddPropertyStep tries to detach vertex property

    [ https://issues.apache.org/jira/browse/TINKERPOP3-770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14629884#comment-14629884 ] 

Asaf Shakarchi commented on TINKERPOP3-770:
-------------------------------------------

btw, this is happening only if the property is new and detaching Property.empty() fails to do so,

Thanks.

> Exception while AddPropertyStep tries to detach vertex property
> ---------------------------------------------------------------
>
>                 Key: TINKERPOP3-770
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-770
>             Project: TinkerPop 3
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.0.0-incubating
>            Reporter: Asaf Shakarchi
>            Assignee: stephen mallette
>             Fix For: 3.0.1-incubating
>
>
> Hey,
> It seems like AddProperty steps tries to detach the added property by:
> evt = new Event.VertexPropertyChangedEvent(DetachedFactory.detach((Vertex) currentElement, true), newProperty ? null : DetachedFactory.detach((VertexProperty) currentProperty, true), value, vertexPropertyKeyValues);
> It fails to do so,
> Following is a java code that throws exception:
> Graph g = TinkerFactory.createModern();
>         ConsoleMutationListener l = new ConsoleMutationListener(g);
>         EventStrategy eventStrategy = EventStrategy.build().addListener(l).create();
>         GraphTraversalSource gts = GraphTraversalSource.build().with(eventStrategy).create(g);
>         gts.addV().property("foo", "bar").next();
> Here's the stack:
> java.lang.IllegalStateException: The property does not exist as it has no key, value, or associated element
> 	at org.apache.tinkerpop.gremlin.structure.Property$Exceptions.propertyDoesNotExist(Property.java:151)
> 	at org.apache.tinkerpop.gremlin.structure.util.empty.EmptyVertexProperty.id(EmptyVertexProperty.java:49)
> 	at org.apache.tinkerpop.gremlin.structure.util.detached.DetachedElement.<init>(DetachedElement.java:50)
> 	at org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertexProperty.<init>(DetachedVertexProperty.java:47)
> 	at org.apache.tinkerpop.gremlin.structure.util.detached.DetachedFactory.detach(DetachedFactory.java:45)
> 	at org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AddPropertyStep.sideEffect(AddPropertyStep.java:90)
> 	at org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectStep.processNextStart(SideEffectStep.java:39)
> Thanks.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)