GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — WxCpTpXmlMessage类中order字段上@XStreamConverter注解有误,导致创建部门事件解析失败 · Issue #1982 · binarywang/WxJava

WxCpTpXmlMessage类中order字段上@XStreamConverter注解有误,导致创建部门事件解析失败 #1982

New issue
Copy link
New issue
Copy link
Closed
Closed
WxCpTpXmlMessage类中order字段上@XStreamConverter注解有误,导致创建部门事件解析失败#1982
Copy link
Labels
企业微信
Milestone
4.0.4

Description

@ibootz
ibootz
opened on Jan 28, 2021
Issue body actions

简要描述

企业微信第三方应用开发过程中,需要监听微信的新增部门事件,在将解析好的xml数据映射到WxCpTpXmlMessage时,报了下面日志中的错误。

模块版本情况

  • WxJava 模块名: CpTp
  • WxJava 版本号: weixin-java-cp-4.0.0

详细描述

企业微信第三方应用开发过程中,需要监听微信的新增部门事件,在将解析好的xml数据映射到WxCpTpXmlMessage时,报了下面日志中的错误。经调试发现,应该是order字段声明为了Integer类型,但是字段上面的注解@XStreamConverter(value = XStreamCDataConverter.class)仍然是解析string类型的转换类。

日志

以下是解析完xml之后,映射给WxCpTpXmlMessage类时报的错误堆栈
com.thoughtworks.xstream.converters.ConversionException: Explicit selected converter cannot handle type
---- Debugging information ----
message : Explicit selected converter cannot handle type
item-type : java.lang.Integer
converter-type : com.thoughtworks.xstream.converters.SingleValueConverterWrapper
class : me.chanjar.weixin.cp.bean.message.WxCpTpXmlMessage
required-type : me.chanjar.weixin.cp.bean.message.WxCpTpXmlMessage
converter-type[1] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
line number : 1
version : not available

at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:59)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:499)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:425)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:277)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)

Activity

  1. jyjyjyy commented on Jan 28, 2021

    @jyjyjyy
    jyjyjyy
    on Jan 28, 2021
    More actions

    我刚好也遇到了这个问题了,期待解决

  2. binarywang commented on Jan 28, 2021

    @binarywang
    binarywang
    on Jan 28, 2021
    Owner
    More actions

    欢迎直接提交PR

  3. binarywang
    added
    企业微信
    on Jan 28, 2021
  4. binarywang
    added a commit that references this issue on Jan 28, 2021

    🐛 #1982 【企业微信】第三方应用WxCpTpXmlMessage类中order字段注解错误问题修复

    566d58e
  5. binarywang
    added this to the 4.0.4 milestone on Jan 28, 2021
  6. binarywang
    closed this as completedon Jan 28, 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

    企业微信

    Projects

    No projects

      Milestone

      • 4.0.4

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.