flex 异常处理

(mx.messaging.messages::ErrorMessage)#0
  body = (null)
  clientId = "FABE7FB0-830A-6390-6E73-B0C259D1891F"
  correlationId = "BA05D912-C85F-AF0D-EE81-7DAB9C468A4C"
  destination = "healthMonitorService"
  extendedData = (null)
  faultCode = "Server.ResourceUnavailable"
  faultDetail = "The expected argument types are (com.ctvit.gather.entity.MaterialDto) but the supplied types were (flex.messaging.io.amf.ASObject) and converted to (null)."
  faultString = "Cannot invoke method 'getMaterialList'."
  headers = (Object)#1
  messageId = "FABEADEC-7309-FF0B-9CC6-EBA6172F9BB1"
  rootCause = (mx.messaging.messages::ErrorMessage)#2
    body = (null)
    clientId = (null)
    correlationId = (null)
    destination = (null)
    extendedData = (null)
    faultCode = "Client.Message.Deserialize.InvalidType"
    faultDetail = (null)
    faultString = "Cannot convert type flex.messaging.io.amf.ASObject with remote type specified as 'null' to an instance of class com.ctvit.gather.entity.MaterialDto"
    headers = (Object)#3
    messageId = "FABEADEC-731D-AD75-C334-A3F0AF8F15E2"
    rootCause = (null)
    timestamp = 1410857207587
    timeToLive = 0
  timestamp = 1410857207587

  timeToLive = 0

场景描述: 其中一个flex项目module  嵌入到另一个flex项目中 而且单独用该模块在本地测试怎么都没问题

这个错误初看是类型不匹配,可是我另一个方法调用参数类型什么都是一样的,怎么就无法转换呢?


经过百度

flex端的vo也有[RemoteClass()]单就是参数无法转换为对应java端的vo,导致方法调用失败,最终在加载module的页面中统一使用如下办法解决:
第一个参数是你的java映射路径,第二个是你的vo类
registerClassAlias("com.bayss.appsystem.bean.collectview. CollectViewBean ",  CollectViewBean );
说明:有几个vo不能转换就加几行代码。
具体原因问题没研究,知道的兄台可以解答下



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值