Skip to content

XStream在maven依赖中有,但依然包找不到类 #91

Closed

Description

@brett25
    项目正常运行起来后,在消息转换时报XStreamTransformer类不存在,可MAVN依赖中存在该JAR包。

我百度说SAE已经禁用了XSteam.而我在本地tomcat7中也遇到同样的问题,这个该如何解决是好?
(http://blog.csdn.net/lyq8479/article/details/38878543)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class me.chanjar.weixin.mp.util.xml.XStreamTransformer
at me.chanjar.weixin.mp.bean.message.WxMpXmlMessage.fromXml(WxMpXmlMessage.java:545)
at com.bhj.controller.CoreWxController.wechatCore(CoreWxController.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

image

Activity

  1. binarywang commented on Dec 8, 2016

    @binarywang
    Owner

    你要找的这个类 me.chanjar.weixin.mp.util.xml.XStreamTransformer 并不是在你图片中所指示的jar包中

  2. binarywang commented on Dec 8, 2016

    @binarywang
    Owner

    按照你所给链接中所示解决方法,你可能需要自己替换xstream的包

  3. aimilin6688 commented on Dec 14, 2016

    @aimilin6688

    版本太低,自己指定使用版本就可以了!

  4. binarywang commented on Dec 20, 2016

    @binarywang
    Owner

    @brett25
    楼主问题解决了吗?

  5. cloudAndMonkey commented on Dec 21, 2016

    @cloudAndMonkey

    我遇到同样的问题,xtream 升级到1.4.8

  6. binarywang commented on Dec 21, 2016

    @binarywang
    Owner

    目前项目里用到的是1.4.7。

  7. binarywang commented on Jan 6, 2017

    @binarywang
    Owner

    先关闭掉了,总是有人发完问题就再也不回头关注了,这是为什么呢?

  8. fengqiangboy commented on Nov 28, 2018

    @fengqiangboy

    我刚才也遇到了,添加下面的依赖解决

    compile group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.4.11.1'
    
  9. binarywang commented on Nov 29, 2018

    @binarywang
    Owner

    问题很简单,即版本的问题

  10. Horizon1123 commented on Oct 12, 2021

    @Horizon1123

    我升级了,但是也没有用呢从1.4.8 升到1.4.11.1

  11. Repository owner locked as resolved and limited conversation to collaborators on Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions