Exception In Query With Gremlin

Hi

  • Question
    I have a question when executing the sql ,like this:
List<Path> paths = g.V("#94:0")
                .repeat(bothE().otherV().simplePath()).until(hasId("#85:2")
                        .and().loops().is(1))
                .path().toList();
  • Maven
       <dependency>
            <groupId>com.orientechnologies</groupId>
            <artifactId>orientdb-jdbc</artifactId>
            <version>3.0.29</version>
        </dependency>

        <dependency>
                <groupId>com.orientechnologies</groupId>
                <artifactId>orientdb-gremlin</artifactId>
                <version>3.0.29</version>
        </dependency>

        <dependency>
                <groupId>org.apache.tinkerpop</groupId>
                <artifactId>tinkergraph-gremlin</artifactId>
                <version>3.4.6</version>
        </dependency>
  • Server
        orientdb-tp3-3.0.29
  • Result
java.lang.NoSuchMethodError: org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer.testAll(Lorg/apache/tinkerpop/gremlin/structure/Element;Ljava/util/List;)Z
        at org.apache.tinkerpop.gremlin.orientdb.traversal.step.sideEffect.OrientGraphStep.iteratorList(OrientGraphStep.java:198) ~[orientdb-gremlin-3.0.27.jar:3.0.27]
        at org.apache.tinkerpop.gremlin.orientdb.traversal.step.sideEffect.OrientGraphStep.elements(OrientGraphStep.java:75) ~[orientdb-gremlin-3.0.27.jar:3.0.27]
        at org.apache.tinkerpop.gremlin.orientdb.traversal.step.sideEffect.OrientGraphStep.vertices(OrientGraphStep.java:48) ~[orientdb-gremlin-3.0.27.jar:3.0.27]
        at org.apache.tinkerpop.gremlin.orientdb.traversal.step.sideEffect.OrientGraphStep.lambda$new$65(OrientGraphStep.java:40) ~[orientdb-gremlin-3.0.27.jar:3.0.27]
        at org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep.processNextStart(GraphStep.java:157) ~[gremlin-core-3.4.6.jar:3.4.6]
        at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143) ~[gremlin-core-3.4.6.jar:3.4.6]
        at org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50) ~[gremlin-core-3.4.6.jar:3.4.6]
        at org.apache.tinkerpop.gremlin.process.traversal.step.branch.RepeatStep.standardAlgorithm(RepeatStep.java:199) ~[gremlin-core-3.4.6.jar:3.4.6]
        at org.apache.tinkerpop.gremlin.process.traversal.step.util.ComputerAwareStep.processNextStart(ComputerAwareStep.java:46) ~[gremlin-core-3.4.6.jar:3.4.6]
        at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143) ~[gremlin-core-3.4.6.jar:3.4.6]
        at org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50) ~[gremlin-core-3.4.6.jar:3.4.6]
        at org.apache.tinkerpop.gremlin.process.traversal.step.map.MapStep.processNextStart(MapStep.java:36) ~[gremlin-core-3.4.6.jar:3.4.6]
        at org.apache.tinkerpop.gremlin.process.traversal.step.map.PathStep.processNextStart(PathStep.java:118) ~[gremlin-core-3.4.6.jar:3.4.6]
        at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.next(AbstractStep.java:128) ~[gremlin-core-3.4.6.jar:3.4.6]
        at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.next(AbstractStep.java:38) ~[gremlin-core-3.4.6.jar:3.4.6]
        at org.apache.tinkerpop.gremlin.process.traversal.Traversal.fill(Traversal.java:181) ~[gremlin-core-3.4.6.jar:3.4.6]
        at org.apache.tinkerpop.gremlin.process.traversal.Traversal.toSet(Traversal.java:128) ~[gremlin-core-3.4.6.jar:3.4.6]
  • SomeBody help !

Thanks

52HZ

Hi @52HZ

i think there is a classpath problem.
You included

orientdb-gremlin which uses apache tinkerpop 3.3.0

and

tinkergraph-gremlin 3.4.6

It could be conflict in apache tinkerpop version

Hi @wolf4ood
yes,I removed the tinkergraph-gremlin 3.4.6,and I don`t meet it again.

Thanks

52HZ