org.hibernate.AssertionFailure: Table XXXXXXXXXXX not found

Hibernate JIRA | SATISH K R YERUVA | 8 years ago
  1. 0

    I have encountered the issue for creating a many to one relation ship. could you please check below error . This is same bug like ANN-376 http://opensource.atlassian.com/projects/hibernate/browse/ANN-376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel In this error the status is duplicate, but no one mention where it was solved. fe use of the session) [java] org.hibernate.AssertionFailure: Table XXXXXXXXXXX not found [java] at org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId(JoinedSubclassEntityPersister.java:458) [java] at org.hibernate.persister.entity.JoinedSubclassEntityPersister.<init>(JoinedSubclassEntityPersister.java:237) [java] at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58) [java] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226) [java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294) [java] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713) [java] at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121) [java] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51) [java] at org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId(JoinedSubclassEntityPersister.java:458) [java] at org.hibernate.persister.entity.JoinedSubclassEntityPersister.<init>(JoinedSubclassEntityPersister.java:237) [java] at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58) [java] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226) [java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294) [java] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713) [java] at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121) [java] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51) [java] at co It is creating a table. There was no problem with creating a table or connection

    Hibernate JIRA | 8 years ago | SATISH K R YERUVA
    org.hibernate.AssertionFailure: Table XXXXXXXXXXX not found
  2. 0

    I have encountered the issue for creating a many to one relation ship. could you please check below error . This is same bug like ANN-376 http://opensource.atlassian.com/projects/hibernate/browse/ANN-376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel In this error the status is duplicate, but no one mention where it was solved. fe use of the session) [java] org.hibernate.AssertionFailure: Table XXXXXXXXXXX not found [java] at org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId(JoinedSubclassEntityPersister.java:458) [java] at org.hibernate.persister.entity.JoinedSubclassEntityPersister.<init>(JoinedSubclassEntityPersister.java:237) [java] at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58) [java] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226) [java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294) [java] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713) [java] at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121) [java] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51) [java] at org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId(JoinedSubclassEntityPersister.java:458) [java] at org.hibernate.persister.entity.JoinedSubclassEntityPersister.<init>(JoinedSubclassEntityPersister.java:237) [java] at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58) [java] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226) [java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294) [java] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713) [java] at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121) [java] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51) [java] at co It is creating a table. There was no problem with creating a table or connection

    Hibernate JIRA | 8 years ago | SATISH K R YERUVA
    org.hibernate.AssertionFailure: Table XXXXXXXXXXX not found
  3. 0

    I am trying to create bidirectional association between two entities in which one can be Inherited and it fails with table not found: 11:37:39,229 ERROR [AssertionFailure] [] an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session) org.hibernate.AssertionFailure: Table CRM.CRM_AKTIVNOST_DOGODKI not found at org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId(JoinedSubclassEntityPersister.java:480) at org.hibernate.persister.entity.JoinedSubclassEntityPersister.<init>(JoinedSubclassEntityPersister.java:259) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:87) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:261) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132) at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246) The code looks like this: @Entity @Table(name = "CRM_AKTIVNOST") public class Aktivnost implements Serializable { private List<Dogodek> dogodki; .... .... @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL,mappedBy = "aktivnost") public List<Dogodek> getDogodki() { return dogodki; } public void setDogodki(List<Dogodek> dogodki) { this.dogodki = dogodki; } ... ... } @Entity @Table(name = "CRM_DOGODEK") @Inheritance(strategy= InheritanceType.JOINED) public class Dogodek implements Serializable { ... ... private Aktivnost aktivnost; .... .... @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) @JoinTable(name = "CRM_AKTIVNOST_DOGODKI", joinColumns = {@JoinColumn(name = "DOGODEK_ID")}, inverseJoinColumns = {@JoinColumn(name = "AKTIVNOST_ID")}) public Aktivnost getAktivnost() { return aktivnost; } public void setAktivnost(Aktivnost aktivnost) { this.aktivnost = aktivnost; } ... }

    Hibernate JIRA | 8 years ago | Tomaz Cerar
    org.hibernate.AssertionFailure: Table CRM.CRM_AKTIVNOST_DOGODKI not found
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I've created a JPA mapping for a class that has a one-to-many relationship via a join table to other classes which are using a JOINED inheritance strategy, and I'm getting an odd error which makes me wonder whether I've come across a bug in Hibernate. The particular error I'm getting is: Exception in thread "main" 2010-05-20 10:00:04,783 - an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session) org.hibernate.AssertionFailure: Table JpaTest.ParentOwnerJoinTable not found at org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId(JoinedSubclassEntityPersister.java:497) at org.hibernate.persister.entity.JoinedSubclassEntityPersister.<init>(JoinedSubclassEntityPersister.java:276) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:87) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:272) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:974) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:850) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:56) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:48) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:32) at com.i2group.jpatest.JpaTestBase.createEntityManager(JpaTestBase.java:51) at com.i2group.jpatest.JpaOwnershipInheritanceTest.writeEntity(JpaOwnershipInheritanceTest.java:28) at com.i2group.jpatest.JpaOwnershipInheritanceTest.main(JpaOwnershipInheritanceTest.java:22) I've attached a zip containing the classes, persistence XML, and SQL Server setup script. The classes are: Owner The owner linked by a one-to-many relationship to Parent/ChildOne/ChildTwo Parent Parent class using a JOINED inheritance strategy ChildOne Child of Parent ChildTwo Child of Parent The error only seems to occur when combining a one-to-many relationship via a join table to a class using inheritance. If I remove the link to Owner and just test the inheritance of Parent/ChildOne/ChildTwo then it works fine. If I remove the inheritance and just test the one-to-many relationship from Owner to Parent then it works fine. If I try to combine the two then I get the error above. I don't think I'm doing anything particularly obscure, which makes me suspicious that this is more likely to be a mistake in my configuration than a bug in Hibernate. However, I've checked the configuration and tested parts of it separately and have been unable to find what (if anything) I'm doing wrong. If there's any further information I can provide to help diagnose this then please let me know.

    Hibernate JIRA | 7 years ago | Stu White
    org.hibernate.AssertionFailure: Table JpaTest.ParentOwnerJoinTable not found
  6. 0

    I am trying to create bidirectional association between two entities in which one can be Inherited and it fails with table not found: 11:37:39,229 ERROR [AssertionFailure] [] an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session) org.hibernate.AssertionFailure: Table CRM.CRM_AKTIVNOST_DOGODKI not found at org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId(JoinedSubclassEntityPersister.java:480) at org.hibernate.persister.entity.JoinedSubclassEntityPersister.<init>(JoinedSubclassEntityPersister.java:259) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:87) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:261) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132) at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246) The code looks like this: @Entity @Table(name = "CRM_AKTIVNOST") public class Aktivnost implements Serializable { private List<Dogodek> dogodki; .... .... @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL,mappedBy = "aktivnost") public List<Dogodek> getDogodki() { return dogodki; } public void setDogodki(List<Dogodek> dogodki) { this.dogodki = dogodki; } ... ... } @Entity @Table(name = "CRM_DOGODEK") @Inheritance(strategy= InheritanceType.JOINED) public class Dogodek implements Serializable { ... ... private Aktivnost aktivnost; .... .... @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) @JoinTable(name = "CRM_AKTIVNOST_DOGODKI", joinColumns = {@JoinColumn(name = "DOGODEK_ID")}, inverseJoinColumns = {@JoinColumn(name = "AKTIVNOST_ID")}) public Aktivnost getAktivnost() { return aktivnost; } public void setAktivnost(Aktivnost aktivnost) { this.aktivnost = aktivnost; } ... }

    Hibernate JIRA | 8 years ago | Tomaz Cerar
    org.hibernate.AssertionFailure: Table CRM.CRM_AKTIVNOST_DOGODKI not found

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.AssertionFailure

      Table XXXXXXXXXXX not found

      at org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId()
    2. Hibernate
      JoinedSubclassEntityPersister.<init>
      1. org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId(JoinedSubclassEntityPersister.java:458)
      2. org.hibernate.persister.entity.JoinedSubclassEntityPersister.<init>(JoinedSubclassEntityPersister.java:237)
      2 frames
    3. Hibernate
      SessionFactoryImpl.<init>
      1. org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58)
      2. org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
      2 frames
    4. Hibernate
      Configuration.buildSessionFactory
      1. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
      1 frame
    5. Hibernate EJB
      HibernatePersistence.createEntityManagerFactory
      1. org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
      2. org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
      2 frames
    6. JavaEE 7
      Persistence.createEntityManagerFactory
      1. javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
      1 frame
    7. Hibernate
      JoinedSubclassEntityPersister.<init>
      1. org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId(JoinedSubclassEntityPersister.java:458)
      2. org.hibernate.persister.entity.JoinedSubclassEntityPersister.<init>(JoinedSubclassEntityPersister.java:237)
      2 frames
    8. Hibernate
      SessionFactoryImpl.<init>
      1. org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58)
      2. org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
      2 frames
    9. Hibernate
      Configuration.buildSessionFactory
      1. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
      1 frame
    10. Hibernate EJB
      HibernatePersistence.createEntityManagerFactory
      1. org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
      2. org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
      2 frames
    11. JavaEE 7
      Persistence.createEntityManagerFactory
      1. javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
      1 frame