Background: There are two microservices, one is the house service and the other is the pms service, which are called remotely through dubbo.
Now a List<OrderChildVo> getOrderChildList(OrderParam param) method has been added under OrderService in pms service, and the version number has been upgraded to 2.0.3.
The new getOrderChildList method added in pms needs to be called in the house service.
Encountered problems: error Failed to invoke the method getOrderChildList …… NullPointerException
Troubleshooting process: 1. Check that the version number of the pms dependency in the house is 2.0.3
2. In the producer configuration file of pms, the OrderService is published. In the consumer configuration file in house, OrderService is also subscribed. There are also configuration groups.
3. In the class of the service used in the house, the OrderService is injected with the @Resource annotation
4. Log in to the dubbo client, and the producer sees that the getOrderChildList method has provided services normally. The subscription of house in the consumer list also subscribes to the getOrderChildList method normally. Also restarted zookeeper
5. Another old method called OrderService.getOrderListByCondition() was called in the house, and it was found that no error was reported and it could be used normally. Through this step, it can be determined that the problem lies in the getOrderChildList method itself.
The final problem: Finally, it was discovered that the entity class OrderChildVo of the return value of this method did not implement the serialization interface Serializable.