简体   繁体   English

com.thoughtworks.xstream.converters.ConversionException

[英]com.thoughtworks.xstream.converters.ConversionException

[EDITED] [编辑]

The project i'm working on is a 3 folder project in Java J2EE with servlets and Hibernate for the persistance. 我正在处理的项目是Java J2EE中的3个文件夹项目,带有servlet和Hibernate以实现持久性。 The structure is as follow: - Admin -> the main program with the beans and HTML/CSS - Jar -> with the jars, Hibernate tools and classes - War -> with the Servlets 结构如下:-管理员->使用bean和HTML / CSS的主程序-jar->使用jars,Hibernate工具和类-War->使用Servlets

Between them, I use Xstream to share the classes and important info. 在它们之间,我使用Xstream共享类和重要信息。

I'm using Eclipse and Tomcat 7. 我正在使用Eclipse和Tomcat 7。

Hope that with this all of you get the global idea. 希望大家都能得到这个全球性的想法。

This what the Xstream debugger said: 这就是Xstream调试器所说的:

Caused by: com.thoughtworks.xstream.converters.ConversionException: satdata.musicoterapia.hibernate.Terapeuta0 : satdata.musicoterapia.hibernate.Terapeuta0
---- Debugging information ----
message             : satdata.musicoterapia.hibernate.Terapeuta0
cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message       : satdata.musicoterapia.hibernate.Terapeuta0
class               : satdata.musicoterapia.hibernate.Usuario
required-type       : satdata.musicoterapia.hibernate.Usuario
converter-type      : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
path                : /list/Usuario[2]/terapeuta
class[1]            : java.util.ArrayList
converter-type[1]   : com.thoughtworks.xstream.converters.collections.CollectionConverter
version             : null

Links (I don't have enough reputiation for have more than 2 links): 链接(我没有足够的声誉,因此链接不止2个):

Complete StackTrace: http://pastebin.com/6vXyD6hC XML: http://pastebin.com/YM9q3uvq Servlet: below, in the comment Where the problem occurs: below, in the comment Java classes: below, in the comment If something is missing, ask and I'll put it here. 完整的StackTrace: http ://pastebin.com/6vXyD6hC XML: http : //pastebin.com/YM9q3uvq Servlet:在注释中出现问题的位置:在下面,在注释Java类中:在下面,注释中如果有问题丢失了,问一下,我把它放在这里。 Thanks for all!!! 谢谢大家!!!

In your servlet code you are are mentioning : 在您的servlet代码中,您提到的是:

xstream.alias("Terapeuta", Terapeuta.class);

In XML file it is given as: 在XML文件中,其表示为:

<terapeuta class="satdata.musicoterapia.hibernate.Terapeuta0" resolves-to="Terapeuta">

So in logs you are getting error as: 因此,在日志中,您得到的错误为:

The exception in logs says: 日志中的异常显示:

com.thoughtworks.xstream.mapper.CannotResolveClassException: satdata.musicoterapia.hibernate.Terapeuta0 com.thoughtworks.xstream.mapper.CannotResolveClassException:satdata.musicoterapia.hibernate.Terapeuta0

it seems your class namein MXL should be satdata.musicoterapia.hibernate.Terapeuta 看来您在MXL中的班级名称应该是satdata.musicoterapia.hibernate.Terapeuta

satdata.musicoterapia.hibernate.Terapeuta0

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 XStream-com.thoughtworks.xstream.converters.ConversionException - XStream - com.thoughtworks.xstream.converters.ConversionException 转换错误 com.thoughtworks.xstream.converters.ConversionException - Conversion error com.thoughtworks.xstream.converters.ConversionException Spring 批处理 JobOperator com.thoughtworks.xstream.converters.ConversionException:无法构造类型 - Spring batch JobOperator com.thoughtworks.xstream.converters.ConversionException: Cannot construct type com.thoughtworks.xstream.converters.ConversionException 使用 maven eclipse 运行 jmeter 脚本时 - com.thoughtworks.xstream.converters.ConversionException while running jmeter script using maven eclipse 获取com.thoughtworks.xstream.converters.ConversionException将xml列表转换为DTO - Getting com.thoughtworks.xstream.converters.ConversionException converting xml list to DTO Axon 抱怨 com.thoughtworks.xstream.converters.ConversionException:调用方法失败 - Axon complaining on com.thoughtworks.xstream.converters.ConversionException: Failed calling method com.thoughtworks.xstream.mapper.CannotResolveClassException - com.thoughtworks.xstream.mapper.CannotResolveClassException com.thoughtworks.xstream.mapper.CannotResolveClassException - com.thoughtworks.xstream.mapper.CannotResolveClassException Xtream com.thoughtworks.xstream.mapper.CannotResolveClassException - Xtream com.thoughtworks.xstream.mapper.CannotResolveClassException com.thoughtworks.xstream.security.ForbiddenClassException - com.thoughtworks.xstream.security.ForbiddenClassException
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM