janusgraph icon indicating copy to clipboard operation
janusgraph copied to clipboard

Getting Started example: 'Could not execute operation due to backend exception'

Open lambdamusic opened this issue 9 years ago • 6 comments

First steps with JanusGraph. Was trying to load the 'graph of the gods' example from http://docs.janusgraph.org/latest/getting-started.html, but failed right away when trying to initialize the database I think (sorry if this is a trivial error).

Any ideas?

Environment: OSX 10.11.6, Java 9.

gremlin> graph = JanusGraphFactory.open('conf/janusgraph-berkeleyje-es.properties')
Could not execute operation due to backend exception
Type ':help' or ':h' for help.
Display stack trace? [yN]y
org.janusgraph.core.JanusGraphException: Could not execute operation due to backend exception
	at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:57)
	at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:159)
	at org.janusgraph.diskstorage.configuration.backend.KCVSConfiguration.set(KCVSConfiguration.java:153)
	at org.janusgraph.diskstorage.configuration.backend.KCVSConfiguration.set(KCVSConfiguration.java:130)
	at org.janusgraph.diskstorage.configuration.ModifiableConfiguration.set(ModifiableConfiguration.java:40)
	at org.janusgraph.diskstorage.configuration.ModifiableConfiguration.setAll(ModifiableConfiguration.java:47)
	at org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1396)
	at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:164)
	at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:133)
	at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:80)
	at org.janusgraph.core.JanusGraphFactory$open.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
	at groovysh_evaluate.run(groovysh_evaluate:3)
	at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
	at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:70)
	at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:191)
	at org.apache.tinkerpop.gremlin.console.GremlinGroovysh.super$3$execute(GremlinGroovysh.groovy)
	at jdk.internal.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
	at org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:72)
	at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
	at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
	at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
	at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:95)
	at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:152)
	at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:124)
	at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
	at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:59)
	at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:152)
	at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:83)
	at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
	at org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:166)
	at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
	at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:478)
Caused by: org.janusgraph.diskstorage.PermanentBackendException: Permanent exception while executing backend operation setConfiguration
	at org.janusgraph.diskstorage.util.BackendOperation.executeDirect(BackendOperation.java:82)
	at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:55)
	... 58 more
Caused by: java.lang.IncompatibleClassChangeError: Inconsistent constant pool data in classfile for class org/janusgraph/diskstorage/StaticBuffer. Method lambda$static$0([BII)[B at index 105 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef
	at org.janusgraph.diskstorage.StaticBuffer.<clinit>(StaticBuffer.java:79)
	at org.janusgraph.diskstorage.keycolumnvalue.keyvalue.OrderedKeyValueStoreAdapter.mutate(OrderedKeyValueStoreAdapter.java:99)
	at org.janusgraph.diskstorage.configuration.backend.KCVSConfiguration$2.call(KCVSConfiguration.java:158)
	at org.janusgraph.diskstorage.configuration.backend.KCVSConfiguration$2.call(KCVSConfiguration.java:153)
	at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:148)
	at org.janusgraph.diskstorage.util.BackendOperation$1.call(BackendOperation.java:162)
	at org.janusgraph.diskstorage.util.BackendOperation.executeDirect(BackendOperation.java:69)
	... 59 more

lambdamusic avatar Nov 24 '17 10:11 lambdamusic

@lambdamusic Which version are you using? I could not reproduce your error.

I can confirm that the Getting Started assumes that Elasticsearch is running. If ES is not running, I get a Connection refused exception. When JanusGraph is started with ./bin/janusgraph start prior to opening the graph, it works.

robertdale avatar Nov 25 '17 14:11 robertdale

I got the same exception trying to instantiate an in-memory graph. I don't think it has anything to do with ElasticSearch, although I could be wrong. Reported as #867.

dmolesUC avatar Jan 04 '18 19:01 dmolesUC

@dmolesUC3 Thanks for pointing that out. I didn't catch that this was on Java 9. @lambdamusic JanusGraph (and TinkerPop) is tested on only Java 8. Try that version and see if your issues are resolved.

robertdale avatar Jan 04 '18 22:01 robertdale

@robertdale I had the same problem and I downgraded from Java 9 to Java 8 and it worked! I also had the problem with java.net.ConnectException: Connection refused, so I ran ./bin/janusgraph start and everything worked. Thanks.

YounesRahimi avatar May 23 '18 08:05 YounesRahimi

To prevent confusion we have recently added a default template for new issues containing the guidelines as to what belongs in issues. Usage, configuration, and general questions should be asked in gitter, stackoverflow, or the janusgraph-users google group. Github issues are for reporting bugs, requesting new features, and tracking the development of JanusGraph. If your issue is still outstanding please consult one of the communities mentioned. If you still feel like your issue belongs here and was closed in error please feel free to repoen it.

chupman avatar Feb 07 '19 17:02 chupman

I am getting this same issue on java 8, Can anyboday help. My backend db is cassandra and index db is elastic search.

sparshneel avatar Jun 03 '20 15:06 sparshneel