Provider升级API 
Model并新增类型的情况下,如果Consumer未同步升级,则Consumer侧每接收到response并反序列化的过程中都会尝试Load并不能识别的Class。并发较高的情况下,会出现线程长时间卡在类加载阶段而导致响应超时。

对应影响应能的代码在com.alibaba.com.caucho.hessian.io.SerializerFactory中,建议可对Hessian2SerializerFactory进行改造,重写public
 Deserializer getDeserializer(String type)方法。

`try {
     Class cl = Class.forName(type, false, _loader);
    deserializer = getDeserializer(cl);
    } catch (Exception e) {
       log.warning("Hessian/Burlap: '" + type + "' is an unknown class in " + 
_loader + ":\n" + e);
      log.log(Level.FINER, e.toString(), e);
 }`

异常日志如下:
`15-Jan-2019 18:40:02.393 WARNING [New I/O worker #1] 
com.alibaba.com.caucho.hessian.io.SerializerFactory.getDeserializer 
Hessian/Burlap: 'com.promotion.api.bean.model.ExtraServicePO' is an unknown 
class in WebappClassLoader
  context: ROOT
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@119d7047
:
java.lang.ClassNotFoundException: com.promotion.api.bean.model.ExtraServicePO`



[ Full content available at: 
https://github.com/apache/incubator-dubbo/issues/3305 ]
This message was relayed via gitbox.apache.org for 
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to