org.hibernate.AnnotationException: Illegal attempt to define a @JoinColumn with a mappedBy as sociation: htmlText.images

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Hibernate JIRA by Jifeng Liu, 1 year ago
Illegal attempt to define a @JoinColumn with a mappedBy as sociation: htmlText.images
via Stack Overflow by Salim
, 2 years ago
Illegal attempt to define a @JoinColumn with a mappedBy association: pcoPK.pk
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.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 test.Test.run(Test.java:24)
at test.Test.main(Test.java:20)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Once, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.