Xian Yi Teng created TINKERPOP-1673:
---------------------------------------
Summary: GroovyTranslator produces Gremlin that can't execute on
:remote
Key: TINKERPOP-1673
URL: https://issues.apache.org/jira/browse/TINKERPOP-1673
Project: TinkerPop
Issue Type: Bug
Affects Versions: 3.2.5
Reporter: Xian Yi Teng
It produces such a query:
{code}
g.withStrategies(org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.LambdaRestrictionStrategy.instance()).V(new
LinkedHashMap(){{put("~label","vertex");put("vertex_id",(int)
0);}}).outE("edge").as("e").inV().is(new
LinkedHashMap(){{put("~label","vertex");put("vertex_id",(int) 1);}}).select("e")
{code}
When run locally, it's fine:
{code}
gremlin> new LinkedHashMap(){{put("~label","vertex");put("vertex_id",(int) 3);}}
==>~label=vertex
==>vertex_id=3
{code}
But when run over :remote:
{code}
gremlin> new LinkedHashMap(){{put("~label","vertex");put("vertex_id",(int) 3);}}
org.codehaus.groovy.GroovyBugError cannot be cast to
org.codehaus.groovy.control.CompilationFailedException
Type ':help' or ':h' for help.
Display stack trace? [yN]y
org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException:
org.codehaus.groovy.GroovyBugError cannot be cast to
org.codehaus.groovy.control.CompilationFailedException
at
org.apache.tinkerpop.gremlin.console.groovy.plugin.DriverRemoteAcceptor.submit(DriverRemoteAcceptor.java:172)
at
org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:99)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
at
org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:95)
at
org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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:1218)
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.tools.shell.ShellRunner.run(ShellRunner.groovy:59)
at
org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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:1218)
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:421)
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)