NullPointerException in MappedFieldsTracker.getMappedValue(MappedFieldsTracker.java:55)
ERROR Logging:
----------------------------------------------_
10:22:10,191 ERROR [ org.dozer.MappingProcessor: 283] [main] Field mapping error -->
MapId: null
Type: null
Source parent class: My Source Class
Source field name: myListProperty
Source field type: class org.hibernate.collection.PersistentSet
Source field value: <<A set of difference Objects extends the same Abstract Class>>
Dest field name: myListProperty
Dest field type: java.util.List
java.lang.NullPointerException
at org.dozer.MappedFieldsTracker.getMappedValue(MappedFieldsTracker.java:55)
at org.dozer.MappingProcessor.map(MappingProcessor.java:182)
at org.dozer.MappingProcessor.map(MappingProcessor.java:133)
at org.dozer.MappingProcessor.map(MappingProcessor.java:128)
at MyCustomListPropertyFieldConverter.convertFrom(MyCustomListPropertyFieldConverter.java:000)
----------------------------------------------_
I think the Solution should be in MappingProcessor.map(MappingProcessor.java:182):
- Object alreadyMappedValue = mappedFields.getMappedValue(srcObj, destClass);
+ Object alreadyMappedValue = mappedFields.getMappedValue(srcObj, destType);
with friendly regards,
Harald
My workaround was to call map(srcObj, destClass) instead of map(srcObject, destObject).