When i try to map my FirstClassDB to MyDTOClass, i've got the following exception :
org.dozer.MappingException: java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlObject
at org.dozer.util.MappingUtils.throwMappingException(MappingUtils.java:88)
at org.dozer.MappingProcessor.map(MappingProcessor.java:181)
at org.dozer.MappingProcessor.map(MappingProcessor.java:124)
at org.dozer.MappingProcessor.map(MappingProcessor.java:119)
at org.dozer.DozerBeanMapper.map(DozerBeanMapper.java:92)
….
All the getters and setters are public.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
NoClassDef exception is a fixed bug in trunk where in version 5.2.2 compile time dependency was introduced to Apahe XmlBeans project. This will be removed in next releases. Otherwise your mapping looks correct…
Does Dozer instantiate intermediate objects in chain "id.firstSubClass.id.testSubClassId" ? or everything is null after running a mapping?
Dmitry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, nothing is instantiate, everything is null. I just can get the value of "test" in FirstClassIdDB, all the attributes of FirstSubClassDB i try to get are null.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I need some help on a mapping file with Dozer. I've got a first class FirstClassDB which looks like this :
public class FirstClassIdDB {
private FirstSubClassDB firstSubClass;
private String test;
…
}
public class FirstSubClassDB {
private FirstSubClassIdDB id;
….
}
public class FirstSubClassIdDB {
private String testSubClassId;
…
}
And i'd like to fill a DTO object :
My mapping file :
When i try to map my FirstClassDB to MyDTOClass, i've got the following exception :
All the getters and setters are public.
Thanks.
I'm using Dozer 5.2.2. With the 5.2.0, there was no exception but in my DTO class, only the testDTO was filled, testSubClassIdDTO was always null.
NoClassDef exception is a fixed bug in trunk where in version 5.2.2 compile time dependency was introduced to Apahe XmlBeans project. This will be removed in next releases. Otherwise your mapping looks correct…
Does Dozer instantiate intermediate objects in chain "id.firstSubClass.id.testSubClassId" ? or everything is null after running a mapping?
Dmitry
No, nothing is instantiate, everything is null. I just can get the value of "test" in FirstClassIdDB, all the attributes of FirstSubClassDB i try to get are null.
same problem with dozer 5.5.1 - solved by putting xmlbeans-2.5.0.jar to classpath in websphere 9.0 environment.