Unable to get gremlin server connected to orientdb

476 views
Skip to first unread message

keshav...@galaxiasol.com

unread,
Jul 18, 2017, 8:19:37 AM7/18/17
to Gremlin-users
I used 

 bin/gremlin-server.sh -i com.michaelpollmeier orientdb-gremlin 3.2.3.0

and set the following in my configuration:

graphs: {
  graph: org.apache.tinkerpop.gremlin.orientdb.OrientGraph}


but I get the error:

[WARN] DefaultGraphManager - Graph [graph] configured at [org.apache.tinkerpop.gremlin.orientdb.OrientGraph] could not be instantiated and will not be available in Gremlin Server.  GraphFactory message: The location configuration must resolve to a file and [org.apache.tinkerpop.gremlin.orientdb.OrientGraph] does not
java.lang.IllegalArgumentException: The location configuration must resolve to a file and [org.apache.tinkerpop.gremlin.orientdb.OrientGraph] does not
        at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.getConfiguration(GraphFactory.java:121)
        at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:104)
        at org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager.lambda$new$0(DefaultGraphManager.java:57)
        at java.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:671)
        at org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager.<init>(DefaultGraphManager.java:55)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

Stephen Mallette

unread,
Jul 18, 2017, 8:26:13 AM7/18/17
to Gremlin-users
value of "graphs" is a Map where the key is the name to use as a reference in Gremlin Server (in this case it is just "graph") and the value should be a .properties file that has a graph configuration in it, like this one for TinkerGraph:


The configuration options available to you there are specific to OrientDB but at a minimum you need an entry like:

gremlin.graph=org.apache.tinkerpop.gremlin.orientdb.OrientGraph



--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/98971a05-8cab-4a72-853c-a409c014a352%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

keshav bhide

unread,
Jul 19, 2017, 6:40:04 AM7/19/17
to Gremlin-users
Thanks for your response Stephen,

I am getting this error log after setting up orientdb properties file. 

[INFO] GremlinServer -
         \,,,/
         (o o)
-----oOOo-(3)-oOOo-----

[INFO] GremlinServer - Configuring Gremlin Server from conf/gremlin-server-orient.yaml
[INFO] MetricManager - Configured Metrics ConsoleReporter configured with report interval=180000ms
[INFO] MetricManager - Configured Metrics CsvReporter configured with report interval=180000ms to fileName=/tmp/gremlin-server-metrics.csv
[INFO] MetricManager - Configured Metrics JmxReporter configured with domain= and agentId=
[INFO] MetricManager - Configured Metrics Slf4jReporter configured with interval=180000ms and loggerName=org.apache.tinkerpop.gremlin.server.Settings$Slf4jReporterMetrics
Jul 19, 2017 8:19:56 AM com.orientechnologies.common.log.OLogManager log
INFO: OrientDB auto-config DISKCACHE=494MB (heap=494MB direct=494MB os=995MB), assuming maximum direct memory size equals to maximum JVM heap size
Jul 19, 2017 8:19:56 AM com.orientechnologies.common.log.OLogManager log
WARNING: MaxDirectMemorySize JVM option is not set or has invalid value, that may cause out of memory errors. Please set the -XX:MaxDirectMemorySize=995m option when you start the JVM.
[INFO] DefaultGraphManager - Graph [graph] was successfully configured via [conf/orientdb-empty.properties].
[INFO] ServerGremlinExecutor - Initialized Gremlin thread pool.  Threads in pool named with pattern gremlin-*
Exception in thread "main" java.lang.BootstrapMethodError: call site initialization exception
        at java.lang.invoke.CallSite.makeSite(CallSite.java:341)
        at java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(MethodHandleNatives.java:307)
        at java.lang.invoke.MethodHandleNatives.linkCallSite(MethodHandleNatives.java:297)
        at org.apache.tinkerpop.gremlin.groovy.loaders.GremlinLoader.load(GremlinLoader.groovy:27)
        at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.<init>(GremlinGroovyScriptEngine.java:305)
        at org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines.createScriptEngine(ScriptEngines.java:429)
        at org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines.reload(ScriptEngines.java:187)
        at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$createScriptEngines$13(GremlinExecutor.java:517)
        at org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines.<init>(ScriptEngines.java:94)
        at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.createScriptEngines(GremlinExecutor.java:513)
        at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.<init>(GremlinExecutor.java:130)
        at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.<init>(GremlinExecutor.java:81)
        at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor$Builder.create(GremlinExecutor.java:789)
        at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:170)
        at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:90)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:110)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:354)
Caused by: java.lang.ExceptionInInitializerError
        at org.codehaus.groovy.vmplugin.v7.IndyInterface.<clinit>(IndyInterface.java:105)
        at sun.misc.Unsafe.ensureClassInitialized(Native Method)
        at java.lang.invoke.DirectMethodHandle$EnsureInitialized.computeValue(DirectMethodHandle.java:317)
        at java.lang.invoke.DirectMethodHandle$EnsureInitialized.computeValue(DirectMethodHandle.java:314)
        at java.lang.ClassValue.getFromHashMap(ClassValue.java:227)
        at java.lang.ClassValue.getFromBackup(ClassValue.java:209)
        at java.lang.ClassValue.get(ClassValue.java:115)
        at java.lang.invoke.DirectMethodHandle.checkInitialized(DirectMethodHandle.java:338)
        at java.lang.invoke.DirectMethodHandle.ensureInitialized(DirectMethodHandle.java:328)
        at java.lang.invoke.DirectMethodHandle.internalMemberNameEnsureInit(DirectMethodHandle.java:278)
        at java.lang.invoke.CallSite.makeSite(CallSite.java:298)
        ... 16 more
Caused by: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-jsr223 is loaded in version 2.4.11 and you are trying to load version 2.4.7
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:513)
        at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:80)
        at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromMetaInf(ExtensionModuleScanner.java:74)
        at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanClasspathModules(ExtensionModuleScanner.java:56)
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:113)
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:74)
        at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)
        ... 27 more
Jul 19, 2017 8:20:00 AM com.orientechnologies.common.log.OLogManager log
INFO: Orient Engine is shutting down...
[INFO] OpLoader - Adding the standard OpProcessor.
[INFO] OpLoader - Adding the control OpProcessor.
[INFO] OpLoader - Adding the session OpProcessor.
[INFO] OpLoader - Adding the traversal OpProcessor.
[INFO] GremlinServer - Shutting down OpProcessor[]
[INFO] GremlinServer - Shutting down OpProcessor[session]
[INFO] GremlinServer - Shutting down OpProcessor[control]
[INFO] GremlinServer - Shutting down OpProcessor[traversal]
[INFO] GremlinServer - Shutting down thread pools.
Exception in thread "gremlin-server-shutdown" java.lang.NullPointerException
        at org.apache.tinkerpop.gremlin.server.GremlinServer.stop(GremlinServer.java:264)
        at org.apache.tinkerpop.gremlin.server.GremlinServer.lambda$new$0(GremlinServer.java:91)
        at java.lang.Thread.run(Thread.java:748)


To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.

Stephen Mallette

unread,
Jul 19, 2017, 6:45:20 AM7/19/17
to Gremlin-users
any chance you are using a mix-matched version of Gremlin Server and OrientDB:

Caused by: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-jsr223 is loaded in version 2.4.11 and you are trying to load version 2.4.7
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:513)
        at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:80)
        at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromMetaInf(ExtensionModuleScanner.java:74)
        at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanClasspathModules(ExtensionModuleScanner.java:56)
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:113)
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:74)
        at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)

The orientdb-gremlin module at 3.2.3.0 is at TinkerPop 3.2.3:


which means Gremlin Server 3.2.3. I guess the two are not compatible given a groovy version bump. If you need to use a newer version of Gremlin Server you could try to remove the conflict, by cleaning up dependencies in the Gremlin Server path (/lib and /ext) directories.

To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/eb0bc585-0498-47ca-9d51-be573e8c2140%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages