java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Map list of lists with Dozer
    via Stack Overflow by Udy
    ,
  • Dozer deep mapping Set with in a Map
    via Stack Overflow by Vijith
    ,
    • java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class at org.dozer.util.ReflectionUtils.determineGenericsType(ReflectionUtils.java:364) at org.dozer.util.ReflectionUtils.determineGenericsType(ReflectionUtils.java:352) at org.dozer.propertydescriptor.GetterSetterPropertyDescriptor.genericType(GetterSetterPropertyDescriptor.java:335) at org.dozer.fieldmap.FieldMap.getGenericType(FieldMap.java:145) at org.dozer.MappingProcessor.mapCollection(MappingProcessor.java:493) at org.dozer.MappingProcessor.mapOrRecurseObject(MappingProcessor.java:422) at org.dozer.MappingProcessor.mapFromFieldMap(MappingProcessor.java:330) at org.dozer.MappingProcessor.mapField(MappingProcessor.java:276) at org.dozer.MappingProcessor.map(MappingProcessor.java:245) at org.dozer.MappingProcessor.map(MappingProcessor.java:187) at org.dozer.MappingProcessor.map(MappingProcessor.java:124) at org.dozer.MappingProcessor.map(MappingProcessor.java:119) at org.dozer.DozerBeanMapper.map(DozerBeanMapper.java:111) at DozerTest.main(DozerTest.java:26)
    No Bugmate found.