org.hibernate.annotations.common.AssertionFailure: Fail to process type argument in a generic declaration. Type: class sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl

Hibernate JIRA | Kahli Burke | 7 years ago
  1. 0

    The following exception is thrown when an entity exists with a collection containing a parameterized type: ERROR [AssertionFailure] an assertion failure occured (this may indicate a bug in Hibernate): org.hibernate.annotations.common.AssertionFailure: Fail to process type argument in a generic declaration. Type: class sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.getClassFromGenericArgument(AttributeFactory.java:836) at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.<init>(AttributeFactory.java:748) at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.<init>(AttributeFactory.java:723) at org.hibernate.ejb.metamodel.AttributeFactory.determineAttributeMetadata(AttributeFactory.java:518) at org.hibernate.ejb.metamodel.AttributeFactory.buildAttribute(AttributeFactory.java:93) at org.hibernate.ejb.metamodel.MetadataContext.wrapUp(MetadataContext.java:183) at org.hibernate.ejb.metamodel.MetamodelImpl.buildMetamodel(MetamodelImpl.java:66) at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:83) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:883) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) at org.jboss.jpa.builder.DefaultCEMFBuilder.build(DefaultCEMFBuilder.java:47) at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:316) For example if a field exists like: @OneToMany List<SomeEntity<SomeClass>> associatedList; I've attached a patch that includes a test case for the entity-manager project and a proposed fix.

    Hibernate JIRA | 7 years ago | Kahli Burke
    org.hibernate.annotations.common.AssertionFailure: Fail to process type argument in a generic declaration. Type: class sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
  2. 0

    The following exception is thrown when an entity exists with a collection containing a parameterized type: ERROR [AssertionFailure] an assertion failure occured (this may indicate a bug in Hibernate): org.hibernate.annotations.common.AssertionFailure: Fail to process type argument in a generic declaration. Type: class sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.getClassFromGenericArgument(AttributeFactory.java:836) at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.<init>(AttributeFactory.java:748) at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.<init>(AttributeFactory.java:723) at org.hibernate.ejb.metamodel.AttributeFactory.determineAttributeMetadata(AttributeFactory.java:518) at org.hibernate.ejb.metamodel.AttributeFactory.buildAttribute(AttributeFactory.java:93) at org.hibernate.ejb.metamodel.MetadataContext.wrapUp(MetadataContext.java:183) at org.hibernate.ejb.metamodel.MetamodelImpl.buildMetamodel(MetamodelImpl.java:66) at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:83) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:883) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) at org.jboss.jpa.builder.DefaultCEMFBuilder.build(DefaultCEMFBuilder.java:47) at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:316) For example if a field exists like: @OneToMany List<SomeEntity<SomeClass>> associatedList; I've attached a patch that includes a test case for the entity-manager project and a proposed fix.

    Hibernate JIRA | 7 years ago | Kahli Burke
    org.hibernate.annotations.common.AssertionFailure: Fail to process type argument in a generic declaration. Type: class sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
  3. 0

    Hibernate Community • View topic - AssertionFailure in 3.5.0 beta 4

    hibernate.org | 1 year ago
    org.hibernate.annotations.common.AssertionFailure: Fail to process type argument in a generic declaration. Type: class sun.reflect.generics.reflectiveObjects.WildcardTypeImpl
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hibernate exception when starting Tomcat (after upgrade to hibernate-3.5.0)

    Stack Overflow | 6 years ago | kiwifrog
    org.hibernate.annotations.common.AssertionFailure: Fail to process type argument in a generic declaration. Type: class sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
  6. 0

    Migrating Hibernate 3.6 to Hibernate 5.2.3 Fail to process type argument in a generic delcaration

    Stack Overflow | 2 months ago | user2995031
    org.hibernate.annotations.common.AssertionFailure: Fail to process type argument in a generic declaration. Member : com.rtrms.application.view.filter.CollectionFilter#filters Type: class sun.reflect.generics.reflectiveObjects.WildcardTypeImpl

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.annotations.common.AssertionFailure

      Fail to process type argument in a generic declaration. Type: class sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl

      at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.getClassFromGenericArgument()
    2. Hibernate EJB
      HibernatePersistence.createContainerEntityManagerFactory
      1. org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.getClassFromGenericArgument(AttributeFactory.java:836)
      2. org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.<init>(AttributeFactory.java:748)
      3. org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.<init>(AttributeFactory.java:723)
      4. org.hibernate.ejb.metamodel.AttributeFactory.determineAttributeMetadata(AttributeFactory.java:518)
      5. org.hibernate.ejb.metamodel.AttributeFactory.buildAttribute(AttributeFactory.java:93)
      6. org.hibernate.ejb.metamodel.MetadataContext.wrapUp(MetadataContext.java:183)
      7. org.hibernate.ejb.metamodel.MetamodelImpl.buildMetamodel(MetamodelImpl.java:66)
      8. org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:83)
      9. org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:883)
      10. org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
      10 frames
    3. org.jboss.jpa
      PersistenceUnitDeployment.start
      1. org.jboss.jpa.builder.DefaultCEMFBuilder.build(DefaultCEMFBuilder.java:47)
      2. org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:316)
      2 frames