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 2022/03/09 09:42:35 UTC

[GitHub] [dubbo] Bricks-Man commented on issue #9676: 使用hessian2无法反序列化jodatime

Bricks-Man commented on issue #9676:
URL: https://github.com/apache/dubbo/issues/9676#issuecomment-1062734649


   这个问题,可以通过修改源码的方式去解决它。在dubbo-serialization-hessian2工程中,
   1. 移除如下包
   ```
   <dependency>
       <groupId>com.alibaba</groupId>
       <artifactId>hessian-lite</artifactId>
   </dependency>
   ```
   2. 添加如下包:
   ```
   <dependency>
        <groupId>com.caucho</groupId>
        <artifactId>hessian</artifactId>
   </dependency>
   ```
   3. 注释掉org.apache.dubbo.common.serialize.hessian2.dubbo.DefaultHessian2FactoryInitializer第28行
   4. 注释掉org.apache.dubbo.common.serialize.hessian2.dubbo.WhitelistHessian2FactoryInitializer第33到49行,第51行
   
   问题分析:该问题是由于hessian-lite包导致,Dubbo中使用该包和官方包的区别仅在于加入了黑白名单序列化。因此,如果不需要黑白名单序列化,按照上面的方式切换到官方包即可。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org