Closed zachkinstner closed 11 years ago
Giving the variable type causes this, see int y
below. @spmallette, is this a known issue with RexsterClient, and/or expected behavior?
# RexConnect> session
# ...action (0; string): start
{"timer":626,"results":["e4401167-dd09-483e-a01d-48830c44c730"]}
# RexConnect> query
# ...script (0; string): x = 5
# ...params (1; string; opt):
{"timer":84,"results":[5]}
# RexConnect> query
# ...script (0; string): x
# ...params (1; string; opt):
{"timer":25,"results":[5]}
# RexConnect> query
# ...script (0; string): int y = 123 //note the "int" type
# ...params (1; string; opt):
{"timer":91,"results":[123]}
# RexConnect> query
# ...script (0; string): y
# ...params (1; string; opt):
{"timer":57,"err":"com.tinkerpop.rexster.client.RexProException> An error occurred while processing the script for language [groovy]. All transactions across all graphs in the session have been concluded with failure: java.util.concurrent.ExecutionException: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: y for class: Script6"}
# RexConnect> session
# ...action (0; string): close
{"timer":6}
Removing the variable types from the original Server-mode request fixed the issue.
I think that's expected behavior and has nothing to do with RexsterClient. don't think you can declare the variable type in groovy script engine. try something like that in gremlin repl and y will not be found:
gremlin> int y = 0
==>0
gremlin> y
No such property: y for class: groovysh_evaluate
Display stack trace? [yN] y
groovy.lang.MissingPropertyException: No such property: y for class: groovysh_evaluate
...
Thanks -- good to know. And good idea about checking the Gremlin REPL, at least when the scenario is simple enough.
For a request like this:
I get the following error:
The error ("No such property: Group_N for class") shows that the
Group_N
group variable is not being retained within the session.