java.lang.ClassCastException

sun.reflect.generics.reflectiveObjects.TypeVariableImpl 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 web4

  • via Unknown by 594417,
  • Stack trace

    • java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class at oracle.toplink.essentials.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:228) Caused by: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.objects.MetadataAccessibleObject.getRawClass(MetadataAccessibleObject.java:120) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataHelper.isEmbedded(MetadataHelper.java:732) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAccessor.buildAccessor(ClassAccessor.java:193) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAccessor.processAccessorFields(ClassAccessor.java:541) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAccessor.processAccessors(ClassAccessor.java:567) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAccessor.processMappedSuperclass(ClassAccessor.java:1128) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.MappedSuperclassAccessor.process(MappedSuperclassAccessor.java:63) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAccessor.processMappedSuperclasses(ClassAccessor.java:1138) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAccessor.process(ClassAccessor.java:495) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.processAnnotations(MetadataProcessor.java:240) at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:370) at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:607)

    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.