-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: hibernate.cfg.xml - multiple mapping resources not recognize
PostPosted: Mon May 29, 2006 3:15 pm 
Newbie

Joined: Sun May 28, 2006 11:35 pm
Posts: 3
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?


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 29, 2006 4:24 pm 
Regular
Regular

Joined: Thu Sep 22, 2005 1:53 pm
Posts: 88
Location: Rio de Janeiro
I am not sure but the order of the mapping files in your hibernate configuration might make a difference did you try yo change te order ????
are all the maping files in the maps?

What do you see in the output/log from hibernate????
If ou don´t have logging try to include it and maybe change to
debug level.

Good luck!

_________________
Don´t forget to rate!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.