[ 
https://issues.apache.org/jira/browse/TINKERPOP-2084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16670438#comment-16670438
 ] 

ASF GitHub Bot commented on TINKERPOP-2084:
-------------------------------------------

spmallette opened a new pull request #981: TINKERPOP-2084 Display remote 
stacktrace in gremlin console
URL: https://github.com/apache/tinkerpop/pull/981
 
 
   https://issues.apache.org/jira/browse/TINKERPOP-2084
   
   Making the remote stacktrace visible to the user saves a visit to the server 
to determine what went amiss with failed script when the remote failing message 
is not enough to debug the problem. Plus, it makes the Gremlin Console in 
":remote console" mode behave more like it is in local mode.
   
   Builds with `mvn clean install -pl gremlin-console 
-DskipIntegrationTests=false`
   
   VOTE +1

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> For remote requests in console display the remote stack trace
> -------------------------------------------------------------
>
>                 Key: TINKERPOP-2084
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2084
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: console
>    Affects Versions: 3.3.4
>            Reporter: stephen mallette
>            Assignee: stephen mallette
>            Priority: Minor
>
> When sending remote scripts through the Gremlin Console that return an error, 
> the console will display the message from the server, but if you view the 
> stack trace it displays the local one which isn't helpful in understanding 
> the cause of the failure. Here's an example:
> {code}
> gremlin> g.V().outE().out()
> org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerEdge cannot be cast 
> to org.apache.tinkerpop.gremlin.structure.Vertex
> Type ':help' or ':h' for help.
> Display stack trace? [yN]y
> org.apache.tinkerpop.gremlin.jsr223.console.RemoteException: 
> org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerEdge cannot be cast 
> to org.apache.tinkerpop.gremlin.structure.Vertex
>       at 
> org.apache.tinkerpop.gremlin.console.jsr223.DriverRemoteAcceptor.submit(DriverRemoteAcceptor.java:180)
>       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.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:498)
>       at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
>       at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
>       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:145)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:165)
>       at 
> org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:130)
>       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:498)
>       at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
>       at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
>       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:145)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:165)
>       at 
> org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:89)
>       at 
> org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:236)
>       at 
> org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:148)
>       at 
> org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:236)
>       at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:455)
> {code}
> This forces the user to then dig around server logs to try to determine the 
> more accurate cause of the error to their script. That's not always easy, 
> especially if the console is connected to a Remote Gremlin Provider and 
> server access is not possible. This change should only be for actual 
> {{ResponseException}} that actually have a stacktrace included, otherwise it 
> should just use the local one.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to