Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1673

GroovyTranslator produces Gremlin that can't execute on :remote

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.4
    • 3.2.5
    • groovy
    • None

    Description

      It produces such a query:

      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")
      

      When run locally, it's fine:

      gremlin> new LinkedHashMap(){{put("~label","vertex");put("vertex_id",(int) 3);}}
      ==>~label=vertex
      ==>vertex_id=3
      

      But when run over :remote:

      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)
      

      Attachments

        Issue Links

          Activity

            People

              okram Marko A. Rodriguez
              xytxytxyt Xian Yi Teng
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: