dubbo序列化异常

 今天在使用dubbo的时候碰到了个异常,解决了几个小时,原因是:服务者接口入参对象没有序列化,特此提醒,远程调用的接口必须序列化

com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method removeGroup in the service com.sf.sgs.user.data.service.GroupService. Tried 3 times of the providers [10.118.45.110:20880, 10.118.45.55:20880] (2/2) from the registry 10.202.4.179:2181 on the consumer 10.118.45.110 using the dubbo version sf.2.0.0. Last error is: Failed to invoke remote method: removeGroup, provider: dubbo://10.118.45.55:20880/com.sf.sgs.user.data.service.GroupService?anyhost=true&application=sf-usercore-provider&check=false&dubbo=sf.2.0.0&generic=false&interface=com.sf.sgs.user.data.service.GroupService&loadbalance=roundrobin&methods=addGroup,unbindUser,bindUser,removeGroup,getById,updateGroup,removeUserGroup,removeGroupById&owner=sflc&pid=5912&revision=1.0.0-SNAPSHOT&side=consumer×tamp=1450837439640, cause: Failed to send message Request [id=6, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=removeGroup, parameterTypes=[class com.sf.sgs.user.data.request.gourp.GroupRemoveReq], arguments=[com.sf.sgs.user.data.request.gourp.GroupRemoveReq@1a385a], attachments={path=com.sf.sgs.user.data.service.GroupService, interface=com.sf.sgs.user.data.service.GroupService, version=0.0.0}]] to /10.118.45.55:20880, cause: Serialized class com.sf.sgs.user.data.request.gourp.GroupRemoveReq must implement java.io.Serializable


解决方案:在服务方接口入参implements Serializable 就OK了

你可能感兴趣的:(dubbo,dubbo,异常)