Pattern selector

Most relevant patterns first. Most helpful ones displayed. Click here to show all.

  1. SpringApplication.run() has thrown a BeanCreationException
    Spring Boot
    1
    0
    0
  2. Missing mapping for collection entity
    Hibernate Core
    23
    2
    0

Your stack trace compared to the selected pattern

Jump to solutionsExpand frames
org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: com.x.y.model.Role.users[com.x.y.model.User]
    at org.hibernate.cfg.annotations.CollectionBinder.bindManyToManySecondPass(CollectionBinder.java:1191)
    at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:794)
    at org.hibernate.cfg.annotations.CollectionBinder$1.secondPass(CollectionBinder.java:719)
    at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:54)
11 frames hidden

Solution

poroszd1 month ago

The entity class mentioned in the exception message has no mapping defined. Create a mapping either via annotation or an <Entity>.hbm.xmlfile.

External results for this pattern (10)

  1. haqer1via GitHub1 month ago
    Use of @ OneToMany or @ ManyToMany targeting an unmapped class: com.arangodb.Aggregate.child[com.arangodb.Child]
    Show stack trace
  2. SeriyVol4ishevia GitHub3 months ago
    Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in class path resource [conf/context/beans-persistence.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [conf/context/beans-persistence.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: tanaguruPU] Unable to build Hibernate SessionFactory
    Show stack trace
  3. Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/appconfig-data.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
    Show stack trace
  4. Vandhanavia Stack Overflow4 months ago
    No message found for this stack trace.
    Show stack trace
  5. Unknown authorvia hibernate.org4 months ago
    Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
    Show stack trace
  6. Emmanuel Bernardvia Hibernate JIRA4 months ago
    Use of @OneToMany or @ManyToMany targeting an unmapped class: org.hibernate.search.test.batchindexing.Nation.librariesHave[org.hibernate.search.test.batchindexing.Book]
    Show stack trace
  7. Chris Ruddvia Hibernate JIRA4 months ago
    Use of @OneToMany or @ManyToMany targeting an unmapped class: com.ac.tan.core.beans.Category.attributeValues[com.ac.tan.core.beans.CategoryAttribute]
    Show stack trace
  8. Use of @OneToMany or @ManyToMany targeting an unmapped class: com.bytecode.entities.Event.categorytagit[com.bytecode.entities.Categorytagit]
    Show stack trace
  9. Unknown authorvia hibernate.org4 months ago
    No message found for this stack trace.
    Show stack trace
  10. Unknown authorvia com.br4 months ago
    Use of @OneToMany or @ManyToMany targeting an unmapped class: br.unicamp.sigm.cad_unico.jpa.Pfj.consorciosSet[br.unicamp.sigm.cad_unico.jpa.Consorcios]
    Show stack trace