You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "stephen mallette (JIRA)" <ji...@apache.org> on 2015/07/23 14:38:04 UTC

[jira] [Closed] (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:all-tabpanel ]

stephen mallette closed TINKERPOP3-770.
---------------------------------------
    Resolution: Fixed

This was a good bug find.  I was able to "fix" it with:

https://github.com/apache/incubator-tinkerpop/commit/9f804373e0450b961b4403161799bb3bc6b2dd06

but it won't be truly fixed until TINKERPOP3-783 is complete as there is a larger bug there.  My fix is sub-optimal to some degree as I have to runtime check the element passing through the step to get the "right" value for {{asVertex}}.

> 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)