[INFO] ServerGremlinExecutor - Initialized Gremlin thread pool. Threads in pool named with pattern gremlin-*
[INFO] ServerGremlinExecutor - Initialized GremlinExecutor and preparing GremlinScriptEngines instances.
[INFO] ServerGremlinExecutor - Initialized gremlin-groovy GremlinScriptEngine and registered metrics
[ERROR] DefaultGremlinScriptEngineManager - Could not create GremlinScriptEngine for gremlin-jython
java.lang.IllegalStateException: javax.script.ScriptException: NameError: name 'LabelP' is not defined in <script> at line number 1
at org.apache.tinkerpop.gremlin.python.jsr223.GremlinJythonScriptEngine.<init>(GremlinJythonScriptEngine.java:87)
at org.apache.tinkerpop.gremlin.python.jsr223.GremlinJythonScriptEngineFactory.getScriptEngine(GremlinJythonScriptEngineFactory.java:110)
at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.createGremlinScriptEngine(DefaultGremlinScriptEngineManager.java:415)
at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.getEngineByName(DefaultGremlinScriptEngineManager.java:219)
at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.lambda$getEngineByName$366(CachedGremlinScriptEngineManager.java:57)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.getEngineByName(CachedGremlinScriptEngineManager.java:57)
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:262)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.script.ScriptException: NameError: name 'LabelP' is not defined in <script> at line number 1
at org.python.jsr223.PyScriptEngine.scriptException(PyScriptEngine.java:202)
at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:42)
at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:31)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at org.apache.tinkerpop.gremlin.python.jsr223.GremlinJythonScriptEngine.<init>(GremlinJythonScriptEngine.java:75)
... 13 more
Caused by: Traceback (most recent call last):
File "<script>", line 1, in <module>
NameError: name 'LabelP' is not defined
at org.python.core.Py.NameError(Py.java:288)
at org.python.core.PyFrame.getname(PyFrame.java:257)
at org.python.pycode._pyx10.f$0(<script>:1)
at org.python.pycode._pyx10.call_function(<script>)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1403)
at org.python.core.__builtin__.eval(__builtin__.java:497)
at org.python.core.__builtin__.eval(__builtin__.java:501)
at org.python.util.PythonInterpreter.eval(PythonInterpreter.java:259)
at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:40)
... 16 more
host: localhostport: 8182threadPoolWorker: 1gremlinPool: 8scriptEvaluationTimeout: 30000graphs: { graph: conf/matterx-neo4j.properties}scriptEngines: { gremlin-groovy: { plugins: { org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {}, org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin: {}, org.apache.tinkerpop.gremlin.neo4j.jsr223.Neo4jGremlinPlugin: {}, org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math], methodImports: [java.lang.Math#*]}, org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/matterx.groovy]}}}, gremlin-jython: {}, gremlin-python: {}}serializers: - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { useMapperFromGraph: graph }} # application/vnd.gremlin-v1.0+gryo - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0, config: { useMapperFromGraph: graph }} # application/vnd.gremlin-v1.0+gryo-lite - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true }} # application/vnd.gremlin-v1.0+gryo-stringd - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0, config: { useMapperFromGraph: graph }} # application/vnd.gremlin-v1.0+json - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0, config: { useMapperFromGraph: graph }} # application/vnd.gremlin-v2.0+json - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, config: { useMapperFromGraph: graph }} # application/jsonprocessors: - { className: org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor, config: { sessionTimeout: 28800000 }} - { className: org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor, config: { cacheExpirationTime: 600000, cacheMaxSize: 1000 }}metrics: { consoleReporter: {enabled: true, interval: 180000},slf4jReporter: {enabled: true, interval: 180000}}strictTransactionManagement: falsethreadPoolBoss: 1maxInitialLineLength: 4096maxHeaderSize: 8192maxChunkSize: 8192maxContentLength: 65536maxAccumulationBufferComponents: 1024resultIterationBatchSize: 64org.apache.tinkerpop.gremlin.neo4j.jsr223.Neo4jGremlinPlugin: {}
--
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/ee7b4e67-2423-4815-8aeb-4ab542e7fae4%40googlegroups.com.
There are some bugs here. To start, the Neo4jGremlinPlugin isn't compatible with the gremlin-python ScriptEngine. It fails to import LabelP as a class and when python tries to make "LabelP.of()" a global function it can't find it. This works fine in Gremlin Groovy given the more advanced nature of the ScriptEngine. In trying to find you a workaround, I noticed a second bug that prevents the workaround where plugins aren't being applied in a deterministic order which of course destroys my attempts at a consistent workaround. I've pushed fixes for all issues.The core of the fix for your purposes is this:I think it would be easy enough for you to just make that little change and recompile the neo4j-gremlin module and just replace the 3.3.0 jar with that.Thanks for reporting this and sorry for the trouble.Stephen
On Tue, Aug 29, 2017 at 1:18 AM, Dave vU <zedr...@gmail.com> wrote:
Quick follow-up to add that I have identified the exact point of incompatibility:Adding the neo4j plugin to the list of pluginsorg.apache.tinkerpop.gremlin.neo4j.jsr223.Neo4jGremlinPlugin: {}
triggers the gremlin-jython error…Does that mean it is currently impossible to use a neo4j database at the same time as gremlin-jython?--Dave
--
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-user...@googlegroups.com.
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/16cb984a-8c4c-4bae-96ac-8e7b453bdce7%40googlegroups.com.