Hibernate cannot seem to find the jar file that contains my entity classes. I get a "not mapped" error when I use the jar file. If the class files are in the project 'classes' directory Hibernate does find them.
I thought the solution would be to add a <mapping element to my hibernate.cfg.xml.
Code:
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<mapping jar="entityClasses.jar"/>
</session-factory>
</hibernate-configuration>
However, no matter what path I use I am getting:
Code:
org.hibernate.InvalidMappingException: Could not read mapping documents from jar: entityClasses.jar
First of all I would like to ask if this <mapping element is the right way to tell Hibernate where the jar file is.
Secondly, what sort of path to the jar file does the mapping element expect?
Thanks in advance for any help or advice,
-=beeky