org.hibernate.AssertionFailure: Unable to extract type of property writableVersion: VersionType

Hibernate JIRA | Tim McCune | 1 decade ago
  1. 0

    My code works fine with 3.1b6. I just tried upgrading to 3.1b7 today and got this exception: Unable to extract type of property writableVersion: VersionType org.hibernate.AssertionFailure: Unable to extract type of property writableVersion: VersionType at org.hibernate.cfg.PropertyInferredData.extractType(PropertyInferredData.java:222) at org.hibernate.cfg.PropertyInferredData.execute(PropertyInferredData.java:114) at org.hibernate.cfg.PropertyInferredData.skip(PropertyInferredData.java:57) at org.hibernate.cfg.AnnotationBinder.addAnnotatedElement(AnnotationBinder.java:831) at org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:808) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:641) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:266) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:199) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1146) Here are the relevant excerpts from my source code: @EmbeddableSuperclass public abstract class VersionedObject<ThisType extends VersionedObject, VersionType extends Version<ThisType>> { ... @Transient public VersionType getWritableVersion() { ... @EmbeddableSuperclass public abstract class Version<ContinuityType extends VersionedObject> { ... Since the writableVersion property is marked as Transient, shouldn't the AnnotationBinder just be ignoring it?

    Hibernate JIRA | 1 decade ago | Tim McCune
    org.hibernate.AssertionFailure: Unable to extract type of property writableVersion: VersionType
  2. 0

    My code works fine with 3.1b6. I just tried upgrading to 3.1b7 today and got this exception: Unable to extract type of property writableVersion: VersionType org.hibernate.AssertionFailure: Unable to extract type of property writableVersion: VersionType at org.hibernate.cfg.PropertyInferredData.extractType(PropertyInferredData.java:222) at org.hibernate.cfg.PropertyInferredData.execute(PropertyInferredData.java:114) at org.hibernate.cfg.PropertyInferredData.skip(PropertyInferredData.java:57) at org.hibernate.cfg.AnnotationBinder.addAnnotatedElement(AnnotationBinder.java:831) at org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:808) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:641) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:266) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:199) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1146) Here are the relevant excerpts from my source code: @EmbeddableSuperclass public abstract class VersionedObject<ThisType extends VersionedObject, VersionType extends Version<ThisType>> { ... @Transient public VersionType getWritableVersion() { ... @EmbeddableSuperclass public abstract class Version<ContinuityType extends VersionedObject> { ... Since the writableVersion property is marked as Transient, shouldn't the AnnotationBinder just be ignoring it?

    Hibernate JIRA | 1 decade ago | Tim McCune
    org.hibernate.AssertionFailure: Unable to extract type of property writableVersion: VersionType
  3. 0

    Initial SessionFactory creation failed.org.hibernate.AssertionFailure: not a joined-subclass

    Stack Overflow | 5 years ago | gubs
    org.hibernate.AssertionFailure: not a joined-subclass
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    In JandexHelper the method {{public static <T> T getValue(AnnotationInstance annotation, String element, Class<T> type)}} calls {{annotation.value( element );}} This returns a {{Boolean}} if the annotation value is actually a {{boolean}}. The following type.cast() fails. As far as I can tell, this only affects reading the {{@Converter(autoApply)}} annotation in the current codebase. Reproduce by adding an {{@Converter}} annotated class to the persistence unit, e.g. {code} <class>org.jpwh.model.converter.MonetaryAmountConverter</class> {code} {code} [main ] ERROR - 14:01:29,37 - org.hibernate.AssertionFailure: HHH000099: an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session): org.hibernate.AssertionFailure: the annotation property autoApply of annotation javax.persistence.Converter is not of type boolean org.hibernate.AssertionFailure: the annotation property autoApply of annotation javax.persistence.Converter is not of type boolean at org.hibernate.metamodel.source.annotations.JandexHelper.getValue(JandexHelper.java:110) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.prepareMetadataSources(EntityManagerFactoryBuilderImpl.java:377) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:210) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:172) at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:43) at org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilderOrNull(HibernatePersistenceProvider.java:135) at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:81) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55) {code}

    Hibernate JIRA | 4 years ago | Christian Bauer
    org.hibernate.AssertionFailure: the annotation property autoApply of annotation javax.persistence.Converter is not of type boolean

    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.AssertionFailure

      Unable to extract type of property writableVersion: VersionType

      at org.hibernate.cfg.PropertyInferredData.extractType()
    2. Hibernate
      Configuration.buildSessionFactory
      1. org.hibernate.cfg.PropertyInferredData.extractType(PropertyInferredData.java:222)
      2. org.hibernate.cfg.PropertyInferredData.execute(PropertyInferredData.java:114)
      3. org.hibernate.cfg.PropertyInferredData.skip(PropertyInferredData.java:57)
      4. org.hibernate.cfg.AnnotationBinder.addAnnotatedElement(AnnotationBinder.java:831)
      5. org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:808)
      6. org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:641)
      7. org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:266)
      8. org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:199)
      9. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1146)
      9 frames