Error trying to begin Transaction while trying gremlin on stardog

I have just setup stardog -4.2.4 with gremlin 3.0.2. I was able to connect fine from gremlin to stardog database I have created. The database has rdf data loaded to it but when I try to do graph traversal, I get the error "Error trying to begin Transaction".

C:\Users\a571410\Desktop\gremlin302\bin>gremlin.bat

     \,,,/
     (o o)

-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: complexible.stardog
plugin activated: tinkerpop.tinkergraph
gremlin> :plugin use complexible.stardog
==>complexible.stardog activated
gremlin> graphConf = StardogGraphConfiguration.builder()
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/a571410/Desktop/gremlin302/lib/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/a571410/Desktop/gremlin302/ext/stardog-gremlin/plugin/log4j-slf4j-impl-2.8.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See SLF4J Error Codes for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
==>gremlin.graph=tag:stardog:api:context:default
stardog.computer.cache_size=5000
stardog.label_iri=http://www.w3.org/2000/01/rdf-schema#label
gremlin> graphConf.connectionString("snarl://localhost:5820/fiboschemaorg").credentials("admin", "admin").baseIRI("http://tinkerpop.incubator.apache.org/")
==>gremlin.graph=tag:stardog:api:context:default
stardog.computer.cache_size=5000
stardog.label_iri=http://www.w3.org/2000/01/rdf-schema#label
stardog.connection=snarl://localhost:5820/fiboschemaorg
stardog.user=admin
stardog.password=admin
stardog.base_iri=http://tinkerpop.incubator.apache.org/
gremlin> graph = StardogGraphFactory.open(graphConf.build())
==>cachedstardoggraph[cachedstardoggraph]
gremlin> graph.V().filter { !it.outE().hasNext() }
No signature of method: com.complexible.stardog.gremlin.structure.CachedStardogGraph.V() is applicable for argument types: () values:
Possible solutions: tx(), tx(), io(org.apache.tinkerpop.gremlin.structure.io.Io$Builder), is(java.lang.Object), any(), any(groovy.lang.Closure)
gremlin> g = graph.traversal()
==>graphtraversalsource[cachedstardoggraph[cachedstardoggraph], standard]
gremlin> g.V()
Error trying to begin Transaction
Display stack trace? [yN]

Below is the stack trace -

gremlin> graph.V()
No signature of method: com.complexible.stardog.gremlin.structure.CachedStardogGraph.V() is applicable for argument types: () values:
Possible solutions: tx(), tx(), io(org.apache.tinkerpop.gremlin.structure.io.Io$Builder), is(java.lang.Object), any(), any(groovy.lang.Closure)
Display stack trace? [yN] y
groovy.lang.MissingMethodException: No signature of method: com.complexible.stardog.gremlin.structure.CachedStardogGraph.V() is applicable for argument types: () values:
Possible solutions: tx(), tx(), io(org.apache.tinkerpop.gremlin.structure.io.Io$Builder), is(java.lang.Object), any(), any(groovy.lang.Closure)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:56)
at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:114)
at groovysh_evaluate.run(groovysh_evaluate:3)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:69)
at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)
at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:94)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:123)
at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:58)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:82)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.apache.tinkerpop.gremlin.console.Console.(Console.groovy:144)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:303)

gremlin> g.V()
Error trying to begin Transaction
Display stack trace? [yN] y
com.complexible.stardog.gremlin.structure.RuntimeStardogException: Error trying to begin Transaction
at com.complexible.stardog.gremlin.structure.tx.AbstractStardogTransaction.connection(AbstractStardogTransaction.java:81)
at com.complexible.stardog.gremlin.structure.tx.CachedStardogTransaction.connection(CachedStardogTransaction.java:27)
at com.complexible.stardog.graph.impl.StardogPrimitives.evalVerticesQuery(StardogPrimitives.java:464)
at com.complexible.stardog.graph.impl.StardogPrimitives.verticesWithProperties(StardogPrimitives.java:98)
at com.complexible.stardog.graph.impl.StardogPrimitives.vertices(StardogPrimitives.java:87)
at com.complexible.stardog.graph.impl.RDFGraphImpl.vertices(RDFGraphImpl.java:93)
at com.complexible.stardog.graph.cache.CachedRDFPropertyGraphImpl.vertices(CachedRDFPropertyGraphImpl.java:137)
at com.complexible.stardog.gremlin.structure.StardogGraph.vertices(StardogGraph.java:619)
at org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep.lambda$new$114(GraphStep.java:52)
at org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep.processNextStart(GraphStep.java:98)
at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:140)
at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:117)
at org.apache.tinkerpop.gremlin.console.Console$_closure3.doCall(Console.groovy:205)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
at org.codehaus.groovy.tools.shell.Groovysh.setLastResult(Groovysh.groovy:441)
at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)
at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:94)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:123)
at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:58)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:82)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.apache.tinkerpop.gremlin.console.Console.(Console.groovy:144)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:303)
Caused by: com.complexible.stardog.StardogException: No driver was found which supports the connection string: 'embed://snarl://localhost:5820/fiboschemaorg', please double-check the URL and verify the protocol is correct and try again.
at com.complexible.stardog.api.DriverManager.getDriver(DriverManager.java:68)
at com.complexible.stardog.api.DriverManager.getConnection(DriverManager.java:81)
at com.complexible.stardog.api.ConnectionConfiguration.connect(ConnectionConfiguration.java:126)
at com.complexible.stardog.gremlin.structure.tx.AbstractStardogTransaction.connection(AbstractStardogTransaction.java:73)

It appears to be a driver error from stack trace. Kindly help with any pointers to resolve the error.

Couple of things:

i) Please use HTTP rather than SNARL in your connection string. We’ll update the docs to fix that. The SNARL protocol is disabled in 4.2.4 and removed in 5.0.
ii) It looks like you have some 5.0 jars in your classpath (we don’t use “embed://” prefixes in 4.*).

I just tried 4.2.4 with HTTP and the Gremlin Console seems to work.

Cheers,
Pavel

Thanks much Pavel. I shall try the steps suggested and get back. Yes, you are right - I tried using gremlin with both stardog 5 and 4 therefore the confusion. I shall reset it prior my testing.

By the way, kudos to you. Great support. Never saw such quick turnaround for questions posted on other communities. Thanks much for all your help and time!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.