You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicecomb.apache.org by "YaoHaishi (JIRA)" <ji...@apache.org> on 2018/06/27 10:45:00 UTC

[jira] [Commented] (SCB-703) When consumer invoke void type method in RPC style, an exception is thrown

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

YaoHaishi commented on SCB-703:
-------------------------------

Currently user can avoid this problem by changing invocation style to RestTemplate, or changing the return type from void to java.lang.Void.

> When consumer invoke void type method in RPC style, an exception is thrown
> --------------------------------------------------------------------------
>
>                 Key: SCB-703
>                 URL: https://issues.apache.org/jira/browse/SCB-703
>             Project: Apache ServiceComb
>          Issue Type: Bug
>          Components: Java-Chassis
>    Affects Versions: java-chassis-1.0.0-m2
>            Reporter: YaoHaishi
>            Assignee: YaoHaishi
>            Priority: Major
>             Fix For: Java-chassis-1.0.0
>
>
> When consumer invoke provider in RPC style, and the return type of provider method is void, an exception is thrown because consumer attemp to deserialize null as void, error log is like below:
> {code:java}
> Caused by: java.lang.IllegalArgumentException: Internal error: can't find deserializer for void
> 	at com.fasterxml.jackson.databind.deser.std.NumberDeserializers.find(NumberDeserializers.java:109)
> 	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.findDefaultDeserializer(BasicDeserializerFactory.java:1800)
> 	at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.findStdDeserializer(BeanDeserializerFactory.java:161)
> 	at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:125)
> 	at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:411)
> 	at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:349)
> 	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
> 	... 28 more
> {code}



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