tinkerpop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stephen mallette (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TINKERPOP-1359) Exception thrown when calling subgraph() on Neo4jGraph
Date Fri, 08 Jul 2016 20:38:11 GMT

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

stephen mallette commented on TINKERPOP-1359:
---------------------------------------------

This was resolved with:

https://github.com/apache/tinkerpop/commit/c90fc1e1a1520bc3ac9872681fafb1173dd038bb

{code}
gremlin> graph = Neo4jGraph.open('/tmp/test')
==>neo4jgraph[Community [/tmp/test]]
gremlin> g = graph.traversal()
==>graphtraversalsource[neo4jgraph[Community [/tmp/test]], standard]
gremlin> g.V()
gremlin> graph.cypher('create (p:Player {pid:1, site:10})')
gremlin> graph.cypher('create (p:Player {pid:2, site:10})')
gremlin> graph.cypher('create (p:Player {pid:3, site:10})')
gremlin> graph.cypher('match (p:Player {pid:3}), (p2:Player {pid:2}) merge (p)-[:AKA {t:100}]-(p2)')
gremlin> sg = g.V(2).outE().subgraph('sg').cap('sg').next()
==>tinkergraph[vertices:2 edges:1]
{code}

It will be fixed for 3.1.3 and 3.2.1 - thanks for taking the time to produce clear reproduction
steps and for developing this ticket.

> Exception thrown when calling subgraph() on Neo4jGraph
> ------------------------------------------------------
>
>                 Key: TINKERPOP-1359
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1359
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: neo4j
>    Affects Versions: 3.1.2-incubating
>            Reporter: Francesco Vivoli
>             Fix For: 3.1.3, 3.2.1
>
>
> It seems calling subgraph() on a Neo4j database triggers an UnsupportedOperationException
> This has been tested on gremlin-console-3.2.0-incubating.
> Steps to reproduce
> -------------------------
> {code}
> graph = Neo4jGraph.open('/tmp/test')
> g = graph.traversal()
> graph.cypher('create (p:Player {pid:1, site:10})')
> graph.cypher('create (p:Player {pid:2, site:10})')
> graph.cypher('create (p:Player {pid:3, site:10})')
> graph.cypher('match (p:Player {pid:3}), (p2:Player {pid:2}) merge (p)-[:AKA {t:100}]-(p2)')
> sg = g.V(2).outE().subgraph('sg').cap('sg').next()
> {code}
> Expected behaviour: subgraph is created
> Actual behaviour: the following exception is thrown
> {code}
> java.lang.UnsupportedOperationException: Properties on a vertex property is not supported
> 	at org.apache.tinkerpop.gremlin.structure.VertexProperty$Exceptions.metaPropertiesNotSupported(VertexProperty.java:103)
> 	at org.apache.tinkerpop.gremlin.neo4j.structure.trait.NoMultiNoMetaNeo4jTrait.getProperties(NoMultiNoMetaNeo4jTrait.java:146)
> 	at org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jVertexProperty.properties(Neo4jVertexProperty.java:97)
> 	at org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.lambda$getOrCreate$2(SubgraphStep.java:102)
> 	at org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep$$Lambda$64/777687292.accept(Unknown
Source)
> 	at java.util.Iterator.forEachRemaining(Iterator.java:116)
> 	at org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.getOrCreate(SubgraphStep.java:100)
> 	at org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.addEdgeToSubgraph(SubgraphStep.java:111)
> 	at org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.sideEffect(SubgraphStep.java:64)
> 	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:140)
> 	at org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.hasNext(ExpandableStepIterator.java:42)
> 	at org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processAllStarts(SupplyingBarrierStep.java:83)
> 	at org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processNextStart(SupplyingBarrierStep.java:70)
> 	at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.next(AbstractStep.java:126)
> 	at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.next(AbstractStep.java:37)
> 	at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.next(DefaultTraversal.java:156)
> {code}



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

Mime
View raw message