dubbo的rpc异常
Exception in thread "main" com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method.....
网上说是实体类序列化错误,加了 implements Serializable就好了。或是interface错误。
仔细对比,发现是端口错误。
配置文件:
dubbo.cheguo.cls.port=40784
dubbo.cheguo.cls.address=zookeeper://127.0.0.1:2181
dubbo.cheguo.cls.group=cls-service
dubbo.cheguo.cls.version=1.0.0
xml文件
<beans>
<dubbo:application name="dubbo_serivce"/>
<dubbo:registry id="cls_service_center" register="false" protocol="dubbo" address="zookeeper://localhost:2181" />
<dubbo:protocol name="dubbo" port="40784" />
<!-- 生成远程服务代理,可以和本地bean一样使用demoService -->
<dubbo:reference id="loanApproveAssetsService" registry="cls_service_center" interface="com.cgw360.cls.api.loan.approve.ILoanApproveAssetsService" group="cls-service" version="1.0.0" check="false"/>
</beans>