You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/08/02 07:19:29 UTC
[GitHub] JoeXie edited a comment on issue #2165: Hessian2SerializerFactory 序列化问题
JoeXie edited a comment on issue #2165: Hessian2SerializerFactory 序列化问题
URL: https://github.com/apache/incubator-dubbo/issues/2165#issuecomment-409830505
@zonghaishang
抱歉,可能描述不清除, 应用在web容器初始化完毕后, 调用远端provider提供的接口,发现:
Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to com.ba.org.QueryInst$BackupStatus 跟踪类型异常的时候代码走到如下标红
正常情况下应该是if 判断通过, 拿到相应类型的序列化器

跟踪发现此时deserializer==null,原因是Hessian2SerializerFactory对象在初始化时,拿到的classloader==null

我并未在dubbo中发现设置Thread.currentThread.contextclassloader=null的设置.
debug如下, 我很好奇什么情况下Thread.currentThread().getContextClassLoader() 对象的Thread.currentThread().getContextClassLoader() =null

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org