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

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.

  • 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?
    via by Tim McCune,
  • 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?
    via by Tim McCune,
  • This simple entity breaks hibernate: {code}@Entity public class Foo { @Id @GeneratedValue private Long _id; private int[] getWorkingHoursPerWeek(Set<Date> holidayDays) { return null; } } {code} This is the error message: Exception in thread "main" org.hibernate.AssertionFailure: Unknown type Java type: int[] at org.hibernate.cfg.PropertyInferredData.extractType(PropertyInferredData.java:233) at org.hibernate.cfg.PropertyInferredData.execute(PropertyInferredData.java:124) at org.hibernate.cfg.PropertyInferredData.skip(PropertyInferredData.java:60) at org.hibernate.cfg.AnnotationBinder.addAnnotatedElement(AnnotationBinder.java:900) at org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:868) at org.hibernate.cfg.AnnotationBinder.getElementsToProcess(AnnotationBinder.java:717) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:547) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:276) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:210) at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:647) at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:96) at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:64) at com.fortis.texas.server.tools.GenerateDbSchema.main(GenerateDbSchema.java:27) Seems hibernate wants to parse the method (even though its completely unrelated to persistence) and then cannot deal with the int[] return type. I can workaround this by renaming the method to "calculateWorkingHoursPerWeek". Funny error. Actually I am using JBoss 4.0.4RC1 (which I think is hibernate 3.1. 2 and annotations 3.1.beta8).
    via by Stephen Friedrich,
  • This simple entity breaks hibernate: {code}@Entity public class Foo { @Id @GeneratedValue private Long _id; private int[] getWorkingHoursPerWeek(Set<Date> holidayDays) { return null; } } {code} This is the error message: Exception in thread "main" org.hibernate.AssertionFailure: Unknown type Java type: int[] at org.hibernate.cfg.PropertyInferredData.extractType(PropertyInferredData.java:233) at org.hibernate.cfg.PropertyInferredData.execute(PropertyInferredData.java:124) at org.hibernate.cfg.PropertyInferredData.skip(PropertyInferredData.java:60) at org.hibernate.cfg.AnnotationBinder.addAnnotatedElement(AnnotationBinder.java:900) at org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:868) at org.hibernate.cfg.AnnotationBinder.getElementsToProcess(AnnotationBinder.java:717) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:547) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:276) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:210) at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:647) at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:96) at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:64) at com.fortis.texas.server.tools.GenerateDbSchema.main(GenerateDbSchema.java:27) Seems hibernate wants to parse the method (even though its completely unrelated to persistence) and then cannot deal with the int[] return type. I can workaround this by renaming the method to "calculateWorkingHoursPerWeek". Funny error. Actually I am using JBoss 4.0.4RC1 (which I think is hibernate 3.1. 2 and annotations 3.1.beta8).
    via by Stephen Friedrich,
    • 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)
    No Bugmate found.