tinkerpop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stark Arya (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TINKERPOP-2241) Client exception don't match Server exception when server throw StackOverflowError
Date Tue, 11 Jun 2019 09:32:00 GMT

     [ https://issues.apache.org/jira/browse/TINKERPOP-2241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Stark Arya updated TINKERPOP-2241:
----------------------------------
    Description: 
On both apache-tinkerpop-gremlin-console-3.4.2 and older version,When i try a extra-long
requests,the client get NPE:java.lang.NullPointerException
{code:java}
gremlin> g = TinkerGraph.open().traversal()
==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
gremlin> g.addV("1")
==>v[0]
gremlin>g.addV('role').property('name','xxx').property('merchantId',9999).property('creatorId',0).property('modifierId',0).property('createTime',0).property('updateTime',0).property('_classname','com.dding.platform.service.auth.entity.Role').addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV()

java.lang.NullPointerException
{code}
However,the gremlin-server just throw: java.lang.StackOverflowError: null dust because
the thread's stack overflow。

 

The exception mismatch above is  just because in the server side,  StackOverflowError's getMessage()
function will return null ,which cause ResponseMessage.ResponseStatus.message variable assigned
to null;

but the gremlin-driver does not checking serTokens.TOKEN_MESSAGE's value, so throw new exception
when deserialize, code snippet as follows:

 
{code:java}
// file: AbstractGraphSONMessageSerializerV2d0.java
public final static class ResponseMessageDeserializer extends AbstractObjectDeserializer<ResponseMessage>
{
    protected ResponseMessageDeserializer() {
        super(ResponseMessage.class);
    }
    
    @Override
    public ResponseMessage createObject(final Map<String, Object> data) {
        final Map<String, Object> status = (Map<String, Object>) data.get(SerTokens.TOKEN_STATUS);
        final Map<String, Object> result = (Map<String, Object>) data.get(SerTokens.TOKEN_RESULT);
        return ResponseMessage.build(UUID.fromString(data.get(SerTokens.TOKEN_REQUEST).toString()))
                .code(ResponseStatusCode.getFromValue((Integer) status.get(SerTokens.TOKEN_CODE)))
                .statusMessage(status.get(SerTokens.TOKEN_MESSAGE).toString())
                .statusAttributes((Map<String, Object>) status.get(SerTokens.TOKEN_ATTRIBUTES))
                .result(result.get(SerTokens.TOKEN_DATA))
                .responseMetaData((Map<String, Object>) result.get(SerTokens.TOKEN_META))
                .create();
    }
}
{code}
 

 

 

  was:
On both apache-tinkerpop-gremlin-console-3.4.2 and older version,When i try a extra-long
requests,the client get NPE:java.lang.NullPointerException
{code:java}
gremlin> g = TinkerGraph.open().traversal()
==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
gremlin> g.addV("1")
==>v[0]
gremlin>g.addV('role').property('name','xxx').property('merchantId',9999).property('creatorId',0).property('modifierId',0).property('createTime',0).property('updateTime',0).property('_classname','com.dding.platform.service.auth.entity.Role').addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV()

java.lang.NullPointerException
{code}
However,the gremlin-server just throw: java.lang.StackOverflowError: null error just because
the thread's stack overflow。

 

The exception mismatch above is  just because in the server side,  StackOverflowError's getMessage()
function will return null ,which cause ResponseMessage.ResponseStatus.message variable assigned
to null;

but the gremlin-driver does not checking serTokens.TOKEN_MESSAGE's value, so throw new exception
when deserialize, code snippet as follows:

 
{code:java}
// file: AbstractGraphSONMessageSerializerV2d0.java
public final static class ResponseMessageDeserializer extends AbstractObjectDeserializer<ResponseMessage>
{
    protected ResponseMessageDeserializer() {
        super(ResponseMessage.class);
    }
    
    @Override
    public ResponseMessage createObject(final Map<String, Object> data) {
        final Map<String, Object> status = (Map<String, Object>) data.get(SerTokens.TOKEN_STATUS);
        final Map<String, Object> result = (Map<String, Object>) data.get(SerTokens.TOKEN_RESULT);
        return ResponseMessage.build(UUID.fromString(data.get(SerTokens.TOKEN_REQUEST).toString()))
                .code(ResponseStatusCode.getFromValue((Integer) status.get(SerTokens.TOKEN_CODE)))
                .statusMessage(status.get(SerTokens.TOKEN_MESSAGE).toString())
                .statusAttributes((Map<String, Object>) status.get(SerTokens.TOKEN_ATTRIBUTES))
                .result(result.get(SerTokens.TOKEN_DATA))
                .responseMetaData((Map<String, Object>) result.get(SerTokens.TOKEN_META))
                .create();
    }
}
{code}
 

 

 


> Client exception don't match Server exception when server  throw StackOverflowError
> -----------------------------------------------------------------------------------
>
>                 Key: TINKERPOP-2241
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2241
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.4.0, 3.4.2
>         Environment: Mac 
>            Reporter: Stark Arya
>            Priority: Major
>             Fix For: 3.4.3
>
>
> On both apache-tinkerpop-gremlin-console-3.4.2 and older version,When i try a extra-long
requests,the client get NPE:java.lang.NullPointerException
> {code:java}
> gremlin> g = TinkerGraph.open().traversal()
> ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
> gremlin> g.addV("1")
> ==>v[0]
> gremlin>g.addV('role').property('name','xxx').property('merchantId',9999).property('creatorId',0).property('modifierId',0).property('createTime',0).property('updateTime',0).property('_classname','com.dding.platform.service.auth.entity.Role').addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV()
> java.lang.NullPointerException
> {code}
> However,the gremlin-server just throw: java.lang.StackOverflowError: null dust because
the thread's stack overflow。
>  
> The exception mismatch above is  just because in the server side,  StackOverflowError's getMessage()
function will return null ,which cause ResponseMessage.ResponseStatus.message variable assigned
to null;
> but the gremlin-driver does not checking serTokens.TOKEN_MESSAGE's value, so throw new
exception when deserialize, code snippet as follows:
>  
> {code:java}
> // file: AbstractGraphSONMessageSerializerV2d0.java
> public final static class ResponseMessageDeserializer extends AbstractObjectDeserializer<ResponseMessage>
{
>     protected ResponseMessageDeserializer() {
>         super(ResponseMessage.class);
>     }
>     
>     @Override
>     public ResponseMessage createObject(final Map<String, Object> data) {
>         final Map<String, Object> status = (Map<String, Object>) data.get(SerTokens.TOKEN_STATUS);
>         final Map<String, Object> result = (Map<String, Object>) data.get(SerTokens.TOKEN_RESULT);
>         return ResponseMessage.build(UUID.fromString(data.get(SerTokens.TOKEN_REQUEST).toString()))
>                 .code(ResponseStatusCode.getFromValue((Integer) status.get(SerTokens.TOKEN_CODE)))
>                 .statusMessage(status.get(SerTokens.TOKEN_MESSAGE).toString())
>                 .statusAttributes((Map<String, Object>) status.get(SerTokens.TOKEN_ATTRIBUTES))
>                 .result(result.get(SerTokens.TOKEN_DATA))
>                 .responseMetaData((Map<String, Object>) result.get(SerTokens.TOKEN_META))
>                 .create();
>     }
> }
> {code}
>  
>  
>  



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

Mime
View raw message