com.thoughtworks.xstream.converters.ConversionException: Location_X : Location_X
<xml><ToUserName><![CDATA[]]></ToUserName>
<FromUserName><![CDATA[]]></FromUserName>
<CreateTime>1380424829</CreateTime>
<MsgType><![CDATA[location]]></MsgType>
<Location_X>111</Location_X>
<Location_Y>222</Location_Y>
<Scale>20</Scale>
<Label><![CDATA[]]></Label>
<MsgId>1234567890123456</MsgId>
</xml>
2013-9-29 11:20:41 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet jsp threw exception
com.thoughtworks.xstream.converters.ConversionException: Location_X : Location_X
---- Debugging information ----
message : Location_X : Location_X
path : /xml/Location_X
cause-message : Location_X : Location_X
class : com.gson.bean.InMessage
cause-exception : com.thoughtworks.xstream.alias.CannotResolveClassException
required-type : com.gson.bean.InMessage
-------------------------------
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:45)
at com.thoughtworks.xstream.core.ReferenceByXPathUnmarshaller.convertAnother(ReferenceByXPathUnmarshaller.java:39)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:99)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.unmarshal(ReferenceByXPathMarshallingStrategy.java:12)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:521)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:509)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:475)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:468)
at com.gson.WeChatFilter.doPost(WeChatFilter.java:87)
at com.gson.WeChatFilter.doFilter(WeChatFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.thoughtworks.xstream.alias.CannotResolveClassException: Location_X : Location_X
at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:35)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18)
at com.thoughtworks.xstream.mapper.XmlFriendlyMapper.realClass(XmlFriendlyMapper.java:44)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18)
at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:49)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18)
at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:46)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18)
at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:52)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:18)
at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:28)
at com.thoughtworks.xstream.converters.reflection.ReflectionConverter.determineType(ReflectionConverter.java:176)
at com.thoughtworks.xstream.converters.reflection.ReflectionConverter.unmarshal(ReflectionConverter.java:99)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:38)
... 21 more
求指导啊,不知道为什么地址不行。 xstream exception xml class --------------------编程问答-------------------- google,baidu --------------------编程问答-------------------- 百度不到啊。 --------------------编程问答-------------------- XML 不是都需要头文件么 版本 语言什么的 --------------------编程问答-------------------- 这个是微信发过来的,其他的头没问题,文本格式的时候是可以的,就是接收位置的时候Location_X 有问题 是不是有下划线的原因
补充:Java , Java EE