Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
3.3.0
-
None
-
None
Description
Request like "graph_test = XXXGraph.open('movie').traversal();graph_test.V('46')" return error "org.apache.tinkerpop.gremlin.driver.exception.ResponseException: startup failed:\nScript17.groovy: 1: [Static type checking] - Cannot find matching method java.lang.Object#V(java.lang.String). Please check if the declared type is right and if the method exists.\n @ line 1, column 48.\n aph.open('movie').traversal();graph_test.V\n ^\n\n1 error\n".
It seems as if the variable 'graph_test' lost its type(change to Object).
my gremlin-server.yaml is as follows:
scriptEngines: {
gremlin-groovy: {
plugins: { org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},
com.xx.xx.xx.jsr223.xxGraphGremlinPlugin: {},
org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin: {},
org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyCompilerGremlinPlugin: {enableThreadInterrupt: true, compilation: COMPILE_STATIC, extensions: org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.FileSandboxExtension},
org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin:{classImports: [java.lang.Math], methodImports: java.lang.Math#*},
org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/generate-xxxgraph.groovy]}}}}
my sandbox.yaml is the same as tinkerpop document 3.3.0 posted.
In addition,request "g.V().repeat(timeLimit(2).both().groupCount('m')).times(16).cap('m').order(local).by(values,decr).next().size()" return error "org.apache.tinkerpop.gremlin.driver.exception.ResponseException: startup failed:\nScript22.groovy: 1: [Static type checking] - Cannot find matching method java.lang.Object#size(). Please check if the declared type is right and if the method exists.\n @ line 1, column 1.\n g.V().repeat(timeLimit(2).both().groupCount('m')).times(16).cap('m').order(local).by(values,decr).next().size()\n ^\n\n1 error\n","
request like "results = ['blah',3]\ng.V().out('rate').fill(results)" return error "org.apache.tinkerpop.gremlin.driver.exception.ResponseException: startup failed:\nScript25.groovy: 2: [Static type checking] - Cannot find matching method org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal#fill(java.lang.Object). Please check if the declared type is right and if the method exists.\n @ line 2, column 1.\n g.V().out('rate').fill(results)\n ^\n\n1 error\n",
request like "g.V().where(__.out('rate').count().is(gte(30))).values('userid')" return error "org.apache.tinkerpop.gremlin.driver.exception.ResponseException: startup failed:\nScript4.groovy: 1: [Static type checking] - Cannot call org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal <org.apache.tinkerpop.gremlin.structure.Vertex, java.lang.Long>#is(org.apache.tinkerpop.gremlin.process.traversal.P <java.lang.Long>) with arguments [org.apache.tinkerpop.gremlin.process.traversal.P <java.lang.Integer>] \n @ line 1, column 13.\n g.V().where(_.out('rate').count().is(gte(30))).values('userid')\n ^\n\nScript4.groovy: 1: [Static type checking] - Cannot find matching method org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal#where(java.lang.Object). Please check if the declared type is right and if the method exists.\n @ line 1, column 1.\n g.V().where(_.out('rate').count().is(gte(30))).values('userid')\n ^\n\n2 errors\n".
Any help will be appreciated!