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
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  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 | 1 year 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

    obscure message running schemaexport: Could not read mapping document from file:

    Coderanch | 1 decade ago | Richard Gilling
    org.hibernate.MappingException: An association from the table UNF_PERSON refers to an unmapped class: java.lang.Long

  1. kuldeep 16 times, last 7 months ago
  2. esaar 1 times, last 9 months ago
  3. r1chjames 1 times, last 10 months ago
  4. Kawada 6 times, last 11 months ago
  5. Harsh 1 times, last 1 year 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