org.hibernate.MappingException: An association from the table xDocument refers to an unmapped class: de.mq.fourier.server.document.DocumentConfiguration

Hibernate JIRA | Manfred Quasten | 1 decade ago
  1. 0

    the getter Method for a many-to-one Method can not have an Interface as returntype : ( ConfigurationImpl implements the interface DocumentConfiguration ) The first opportunity works, the second one not : ... public ConfigurationImpl getConfiguration() { return (ConfigurationImpl) configuration; } ... public DocumentConfiguration getConfiguration() { return configuration; } This is bad, because it is not possible to work against an interface and to change the implementation (testmocks etc ) (using dependency injection for example) I think the real returned type should be taken for the mapping not the signature of the method. If the signature of the method is an interface that it implemented by the returned class it should work too . The error message for the second case : Exception in thread "main" org.hibernate.MappingException: An association from the table xDocument refers to an unmapped class: de.mq.fourier.server.document.DocumentConfiguration at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1134) at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1052) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1168) at de.mq.fourier.server.document.dao.ConfigurationHibernateDAO.<init>(ConfigurationHibernateDAO.java:18) at de.mq.fourier.server.document.dao.ConfigurationHibernateDAO.main(ConfigurationHibernateDAO.java:73)

    Hibernate JIRA | 1 decade ago | Manfred Quasten
    org.hibernate.MappingException: An association from the table xDocument refers to an unmapped class: de.mq.fourier.server.document.DocumentConfiguration
  2. 0

    the getter Method for a many-to-one Method can not have an Interface as returntype : ( ConfigurationImpl implements the interface DocumentConfiguration ) The first opportunity works, the second one not : ... public ConfigurationImpl getConfiguration() { return (ConfigurationImpl) configuration; } ... public DocumentConfiguration getConfiguration() { return configuration; } This is bad, because it is not possible to work against an interface and to change the implementation (testmocks etc ) (using dependency injection for example) I think the real returned type should be taken for the mapping not the signature of the method. If the signature of the method is an interface that it implemented by the returned class it should work too . The error message for the second case : Exception in thread "main" org.hibernate.MappingException: An association from the table xDocument refers to an unmapped class: de.mq.fourier.server.document.DocumentConfiguration at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1134) at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1052) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1168) at de.mq.fourier.server.document.dao.ConfigurationHibernateDAO.<init>(ConfigurationHibernateDAO.java:18) at de.mq.fourier.server.document.dao.ConfigurationHibernateDAO.main(ConfigurationHibernateDAO.java:73)

    Hibernate JIRA | 1 decade ago | Manfred Quasten
    org.hibernate.MappingException: An association from the table xDocument refers to an unmapped class: de.mq.fourier.server.document.DocumentConfiguration
  3. 0

    hibernate - what is wrong??

    Google Groups | 1 decade ago | konrad....@gmail.com
    org.hibernate.MappingException: An association from the table bean2 refers to an unmapped class: long
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    org.hibernate.MappingException: In Japser | Jaspersoft Community

    jaspersoft.com | 11 months ago
    org.hibernate.MappingException: An association from the table file_resource refers to an unmapped class: boolean" What problem is this ? enything related to file_resource table ? please find the Error trace as below, An association from the table file_resource refers to an unmapped class: boolean
  6. 0

    Hibernate mapping. Table related with other two

    Stack Overflow | 1 year ago | Rob
    org.hibernate.MappingException: An association from the table A refers to an unmapped class: Shortcut

  1. kuldeep 16 times, last 3 months ago
  2. esaar 1 times, last 4 months ago
  3. r1chjames 1 times, last 6 months ago
  4. Kawada 6 times, last 6 months ago
  5. Harsh 1 times, last 8 months ago
34 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.MappingException

    An association from the table xDocument refers to an unmapped class: de.mq.fourier.server.document.DocumentConfiguration

    at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys()
  2. Hibernate
    Configuration.buildSessionFactory
    1. org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1134)
    2. org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1052)
    3. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1168)
    3 frames
  3. de.mq.fourier
    ConfigurationHibernateDAO.main
    1. de.mq.fourier.server.document.dao.ConfigurationHibernateDAO.<init>(ConfigurationHibernateDAO.java:18)
    2. de.mq.fourier.server.document.dao.ConfigurationHibernateDAO.main(ConfigurationHibernateDAO.java:73)
    2 frames