Here is my hibernate.cfg.xml:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost/golf</property>
<property name="connection.username">XXXX</property>
<property name="connection.password">XXXX</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<!-- Mappings of hibernate persistent classes -->
<mapping resource="golfbase/Holes.hbm.xml"/>
<mapping resource="golfbase/Courses.hbm.xml"/>
</session-factory>
</hibernate-configuration>
It doesn't seem to be loading the Holes.hbm.xml, since I keep getting:
0 [main] ERROR golfbase.golfBase - org.hibernate.MappingException: Association references unmapped class: Holes
when I attempt to run my app. If I delete the courses mapping, then holes attempts to load and complains that courses is missing. Is there something I need to do to load more than one mapping?
|