java.lang.ClassCastException

sun.reflect.generics.reflectiveObjects.WildcardTypeImpl cannot be cast to java.lang.Class

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web8

  • via Stack Overflow by Udy
    ,
  • Stack trace

    • java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.WildcardTypeImpl cannot be cast to java.lang.Class at org.dozer.util.ReflectionUtils.determineGenericsType(ReflectionUtils.java:416) at org.dozer.util.ReflectionUtils.determineGenericsType(ReflectionUtils.java:395) at org.dozer.propertydescriptor.GetterSetterPropertyDescriptor.genericType(GetterSetterPropertyDescriptor.java:363) at org.dozer.fieldmap.FieldMap.getGenericType(FieldMap.java:141) at org.dozer.MappingProcessor.mapCollection(MappingProcessor.java:525) at org.dozer.MappingProcessor.mapOrRecurseObject(MappingProcessor.java:453) at org.dozer.MappingProcessor.mapFromFieldMap(MappingProcessor.java:361) at org.dozer.MappingProcessor.mapField(MappingProcessor.java:307) at org.dozer.MappingProcessor.map(MappingProcessor.java:267) at org.dozer.MappingProcessor.mapToDestObject(MappingProcessor.java:216) at org.dozer.MappingProcessor.createByCreationDirectiveAndMap(MappingProcessor.java:196) at org.dozer.MappingProcessor.mapCustomObject(MappingProcessor.java:512) at org.dozer.MappingProcessor.mapOrRecurseObject(MappingProcessor.java:465) at org.dozer.MappingProcessor.addOrUpdateToList(MappingProcessor.java:820) at org.dozer.MappingProcessor.addOrUpdateToList(MappingProcessor.java:894) at org.dozer.MappingProcessor.mapListToList(MappingProcessor.java:730) at org.dozer.MappingProcessor.mapCollection(MappingProcessor.java:580) at org.dozer.MappingProcessor.mapOrRecurseObject(MappingProcessor.java:453) at org.dozer.MappingProcessor.mapFromFieldMap(MappingProcessor.java:361) at org.dozer.MappingProcessor.mapField(MappingProcessor.java:307) at org.dozer.MappingProcessor.map(MappingProcessor.java:267) at org.dozer.MappingProcessor.mapToDestObject(MappingProcessor.java:216) at org.dozer.MappingProcessor.createByCreationDirectiveAndMap(MappingProcessor.java:196) at org.dozer.MappingProcessor.mapCustomObject(MappingProcessor.java:512) at org.dozer.MappingProcessor.mapOrRecurseObject(MappingProcessor.java:465) at org.dozer.MappingProcessor.addToSet(MappingProcessor.java:757) at org.dozer.MappingProcessor.mapCollection(MappingProcessor.java:570) at org.dozer.MappingProcessor.mapOrRecurseObject(MappingProcessor.java:453) at org.dozer.MappingProcessor.mapFromFieldMap(MappingProcessor.java:361) at org.dozer.MappingProcessor.mapField(MappingProcessor.java:307) at org.dozer.MappingProcessor.map(MappingProcessor.java:267) at org.dozer.MappingProcessor.mapToDestObject(MappingProcessor.java:216) at org.dozer.MappingProcessor.createByCreationDirectiveAndMap(MappingProcessor.java:196) at org.dozer.MappingProcessor.mapCustomObject(MappingProcessor.java:512) at org.dozer.MappingProcessor.mapOrRecurseObject(MappingProcessor.java:465) at org.dozer.MappingProcessor.mapFromFieldMap(MappingProcessor.java:361) at org.dozer.MappingProcessor.mapField(MappingProcessor.java:307) at org.dozer.MappingProcessor.map(MappingProcessor.java:267) at org.dozer.MappingProcessor.mapToDestObject(MappingProcessor.java:216) at org.dozer.MappingProcessor.createByCreationDirectiveAndMap(MappingProcessor.java:196) at org.dozer.MappingProcessor.mapGeneral(MappingProcessor.java:170) at org.dozer.MappingProcessor.map(MappingProcessor.java:104) at org.dozer.MappingProcessor.map(MappingProcessor.java:99) at org.dozer.DozerBeanMapper.map(DozerBeanMapper.java:120)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    We couldn't find other users who have seen this exception.