tinkerpop/blueprints — Issue #196: SailGraph and Neo4j error.
Author: okram
Created: 2011-12-19 16:51:17+00:00
State: open

Here is how to reproduce the problem :

gremlin> neo = new Neo4jGraph("/Users/alex/Desktop/neo-test")

==>neo4jgraph[EmbeddedGraphDatabase [/Users/alex/Desktop/neo-test]]

gremlin>

gremlin>

gremlin> sailGraph = new SailGraph(new GraphSail(neo))

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/Users/alex/Documents/autocat/gremlin/gremlin-groovy-1.4/target/gremlin-groovy-1.4-standalone/lib/gossip-1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/Users/alex/Documents/autocat/gremlin/gremlin-groovy-1.4/target/gremlin-groovy-1.4-standalone/lib/slf4j-log4j12-1.5.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

==>sailgraph[graphsail]

gremlin>

gremlin>

gremlin> stream = new FileInputStream(new File("/Users/alex/selfvertex.owl"))

/Users/alex/selfvertex.owl (No such file or directory)

Display stack trace? [yN]

gremlin>

gremlin> stream = new FileInputStream(new File("/Users/alex/Desktop/selfvertex.owl"))

==>java.io.FileInputStream@3484fdbc

gremlin>

gremlin>

gremlin> sailGraph.loadRDF(stream, "", "rdf-xml", null)

==>null

gremlin>

gremlin>

gremlin> sailGraph.clear()

Node[2] not found.

Display stack trace? [yN] y

org.neo4j.graphdb.NotFoundException: Node[2] not found.

at org.neo4j.kernel.impl.core.NodeManager.getNodeForProxy(NodeManager.java:477)

at org.neo4j.kernel.impl.core.NodeProxy.getRelationships(NodeProxy.java:72)

at com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jVertex.getOutEdges(Neo4jVertex.java:43)

at com.tinkerpop.blueprints.pgm.oupls.sail.GraphSailConnection.removeEdge(GraphSailConnection.java:423)

at com.tinkerpop.blueprints.pgm.oupls.sail.GraphSailConnection.deleteEdgesInIterator(GraphSailConnection.java:397)

at com.tinkerpop.blueprints.pgm.oupls.sail.GraphSailConnection.clearInternal(GraphSailConnection.java:362)

at com.tinkerpop.blueprints.pgm.oupls.sail.GraphSailConnection.clearInternal(GraphSailConnection.java:345)

at org.openrdf.sail.helpers.SailConnectionBase.clear(SailConnectionBase.java:420)

at com.tinkerpop.blueprints.pgm.impls.sail.SailGraph.clear(SailGraph.java:327)

at com.tinkerpop.blueprints.pgm.TransactionalGraph$clear.call(Unknown Source)

at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)

at groovysh_evaluate.run(groovysh_evaluate:32)

at groovysh_evaluate$run.call(Unknown Source)

at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)

at groovysh_evaluate$run.call(Unknown Source)

at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:67)

at org.codehaus.groovy.tools.shell.Interpreter$evaluate.call(Unknown Source)

at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:152)

at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:114)

at org.codehaus.groovy.tools.shell.Shell$leftShift$0.call(Unknown Source)

at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:88)

at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)

at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054)

at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)

at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:148)

at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:100)

at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:267)

at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52)

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:137)

at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:57)

at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054)

at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)

at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:148)

at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:66)

at com.tinkerpop.gremlin.groovy.console.Console.(Console.java:50)

at com.tinkerpop.gremlin.groovy.console.Console.(Console.java:57)

at com.tinkerpop.gremlin.groovy.console.Console.main(Console.java:62)

By doing the same kind of program in a junit test, I have another exception :
Caused by: java.lang.NullPointerException

at com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.autoStopTransaction(Neo4jGraph.java:426)

at com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.removeVertex(Neo4jGraph.java:264)

at com.tinkerpop.blueprints.pgm.oupls.sail.GraphSailConnection.removeEdge(GraphSailConnection.java:425)

at com.tinkerpop.blueprints.pgm.oupls.sail.GraphSailConnection.deleteEdgesInIterator(GraphSailConnection.java:397)

at com.tinkerpop.blueprints.pgm.oupls.sail.GraphSailConnection.clearInternal(GraphSailConnection.java:362)

at com.tinkerpop.blueprints.pgm.oupls.sail.GraphSailConnection.clearInternal(GraphSailConnection.java:345)

at org.openrdf.sail.helpers.SailConnectionBase.clear(SailConnectionBase.java:420)

at com.tinkerpop.blueprints.pgm.impls.sail.SailGraph.clear(SailGraph.java:327)