org.hibernate.AssertionFailure: Unknown type Java type: int[]

Hibernate JIRA | Stephen Friedrich | 1 decade ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

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

    Hibernate JIRA | 1 decade ago | Stephen Friedrich
    org.hibernate.AssertionFailure: Unknown type Java type: int[]
  2. 0

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

    Hibernate JIRA | 1 decade ago | Stephen Friedrich
    org.hibernate.AssertionFailure: Unknown type Java type: int[]

    Root Cause Analysis

    1. org.hibernate.AssertionFailure

      Unknown type Java type: int[]

      at org.hibernate.cfg.PropertyInferredData.extractType()
    2. Hibernate
      SchemaExport.<init>
      1. org.hibernate.cfg.PropertyInferredData.extractType(PropertyInferredData.java:233)
      2. org.hibernate.cfg.PropertyInferredData.execute(PropertyInferredData.java:124)
      3. org.hibernate.cfg.PropertyInferredData.skip(PropertyInferredData.java:60)
      4. org.hibernate.cfg.AnnotationBinder.addAnnotatedElement(AnnotationBinder.java:900)
      5. org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:868)
      6. org.hibernate.cfg.AnnotationBinder.getElementsToProcess(AnnotationBinder.java:717)
      7. org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:547)
      8. org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:276)
      9. org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:210)
      10. org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:647)
      11. org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:96)
      12. org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:64)
      12 frames
    3. com.fortis.texas
      GenerateDbSchema.main
      1. com.fortis.texas.server.tools.GenerateDbSchema.main(GenerateDbSchema.java:27)
      1 frame