Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1359

Exception thrown when calling subgraph() on Neo4jGraph

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.2-incubating
    • 3.1.3, 3.2.1
    • neo4j
    • None

    Description

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

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

      Expected behaviour: subgraph is created
      Actual behaviour: the following exception is thrown

      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)
      

      Attachments

        Activity

          People

            spmallette Stephen Mallette
            drvillo Francesco Vivoli
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: