Whenever I use GremlinPipeline with OrientGraph to traverse the graph i get
following exception. I am currently using version 1.7 for Orient Db and
2.5.0 for Blueprint but i got this exception in previous version as well.
* java.lang.NullPointerException*
at com.tinkerpop.pipes.transform.VertexQueryPipe.processNextStart(
*VertexQueryPipe.java:86*)
at com.tinkerpop.pipes.transform.VertexQueryPipe.processNextStart(
*VertexQueryPipe.java:19*)
at com.tinkerpop.pipes.AbstractPipe.next(*AbstractPipe.java:89*)
at com.tinkerpop.pipes.transform.PropertyPipe.processNextStart(
*PropertyPipe.java:29*)
at com.tinkerpop.pipes.AbstractPipe.next(*AbstractPipe.java:89*)
at com.tinkerpop.pipes.util.Pipeline.next(*Pipeline.java:115*)
at com.tinkerpop.pipes.util.PipeHelper.counter(*PipeHelper.java:107*)
at com.tinkerpop.gremlin.java.GremlinPipeline.count(
*GremlinPipeline.java:1534*)
at com.orientdb.ex.com.orientdb.ex.CopyOfCopyOfApp.main
*CopyOfCopyOfApp.java:29*)
I following simple program to traverse the graph
* import* com.orientechnologies.orient.graph.gremlin.OGremlinHelper;
* import* com.tinkerpop.blueprints.impls.orient.OrientGraph;
* import* com.tinkerpop.blueprints.impls.orient.OrientGraphFactory;
* import* com.tinkerpop.gremlin.java.GremlinPipeline;
* public* *class* CopyOfCopyOfApp {
*public* *static* *void* main(String[] args) *throws* Exception {
// AT THE BEGINNING
OrientGraphFactory factory = *new* OrientGraphFactory(
"plocal:C:/testdb")
.setupPool(1, 10);
// EVERY TIME YOU NEED A GRAPH INSTANCE
OrientGraph graph = factory.getTx();
*try* {
// *travese* graph
OGremlinHelper.*global*().create() ;
*GremlinPipeline* pipe = *new* *GremlinPipeline*();
*pipe.start(graph.getVertex("rootNodeIndex"))*.out("knows").property("name"
);
System.*out*.println(pipe.count());
} *catch* (Exception e) {
e.printStackTrace();
graph.rollback();
} *finally* {
graph.shutdown();
}
}
}
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.