org.hibernate.AnnotationException

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.

  • I got the following exception when I run the test case in attach file. It seems Hibernate throws Exception when unidirection OneToMany relation defined in Embeded class. Exception in thread "main" org.hibernate.AnnotationException: Illegal attempt to define a @JoinColumn with a mappedBy as sociation: htmlText.images at org.hibernate.cfg.Ejb3JoinColumn.buildJoinColumn(Ejb3JoinColumn.java:152) at org.hibernate.cfg.Ejb3JoinColumn.buildJoinColumns(Ejb3JoinColumn.java:127) at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1178) at org.hibernate.cfg.AnnotationBinder.fillComponent(AnnotationBinder.java:1731) at org.hibernate.cfg.AnnotationBinder.bindComponent(AnnotationBinder.java:1665) at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1544) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:733) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:498) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:277) at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115) at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1269) at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:150) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:888) at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:706) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:137) at test.Test.run(Test.java:24) at test.Test.main(Test.java:20)
    via by Jifeng Liu,
  • Another Query Creation problem [CLOSED]
    via by Unknown author,
  • @Embeddable Issue with Spring and Hibernate3
    via Stack Overflow by Ben Dol
    ,
  • No me lista la colección
    via openxava by fredy1982
    ,
  • bidirectional hibernate relationship
    via Stack Overflow by ddejmek
    ,
    • org.hibernate.AnnotationException: Illegal attempt to define a @JoinColumn with a mappedBy as sociation: htmlText.images at org.hibernate.cfg.Ejb3JoinColumn.buildJoinColumn(Ejb3JoinColumn.java:152) at org.hibernate.cfg.Ejb3JoinColumn.buildJoinColumns(Ejb3JoinColumn.java:127) at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1178) at org.hibernate.cfg.AnnotationBinder.fillComponent(AnnotationBinder.java:1731) at org.hibernate.cfg.AnnotationBinder.bindComponent(AnnotationBinder.java:1665) at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1544) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:733) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:498) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:277) at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115) at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1269) at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:150) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:888) at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:706) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:137) at test.Test.run(Test.java:24) at test.Test.main(Test.java:20)

    Users with the same issue

    odd
    1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,