GitHub user spmallette opened a pull request:

    https://github.com/apache/tinkerpop/pull/753

    TINKERPOP-1811 Fixed bytecode deserialization error messaging

    As the original issue description suggests the error message wasn't very 
helpful. Seems there was a mistype in the log message that prevented a better 
output and also some error handling that wasn't quite being dealt with properly.
    
    Error now presents as:
    
    ```text
    gremlin> bytecode = g.V().asAdmin().bytecode
    ==>[[], [V()]]
    gremlin> bytecode.addStep("broken")
    gremlin> bytecode
    ==>[[], [V(), broken()]]
    gremlin> conn.submit(bytecode).next()
    org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Could not 
locate method: DefaultGraphTraversal.broken([])
    Type ':help' or ':h' for help.
    Display stack trace? [yN]n
    ```
    
    On the server you now get this:
    
    ```text
    [ERROR] TraversalOpProcessor - Could not deserialize the Traversal instance
    java.lang.IllegalStateException: Could not locate method: 
DefaultGraphTraversal.broken([])
        at 
org.apache.tinkerpop.gremlin.jsr223.JavaTranslator.invokeMethod(JavaTranslator.java:180)
        at 
org.apache.tinkerpop.gremlin.jsr223.JavaTranslator.translate(JavaTranslator.java:91)
        at 
org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor.iterateBytecodeTraversal(TraversalOpProcessor.java:367)
    ```
    
    builds with `mvn clean install && mvn verify -pl gremlin-server 
-DskipIntegrationTests=false`
    
    VOTE +1

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/tinkerpop TINKERPOP-1811

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tinkerpop/pull/753.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #753
    
----
commit 95a6ea3f56db83449b62475045d08fc9452467e0
Author: Stephen Mallette <[email protected]>
Date:   2017-11-20T20:26:53Z

    TINKERPOP-1811 Fixed bytecode deserialization error messaging
    
    As the original issue description suggests the error message wasn't very 
helpful. Seems there was a mistype in the log message that prevented a better 
output and also some error handling that wasn't quite being dealt with properly.

----


---

Reply via email to