[Hibernate] - Mapping Exception
	
	
		Bonjour,
lors d'un ShemaExport, je rencontre l'erreur suivante :
	Code:
	
| 12
 3
 
 |  
[schemaexport] GRAVE: Could not compile the mapping document
[schemaexport] org.hibernate.MappingException: class foot.hibernate.Game not found while looking for property: awayTeamScore | 
 Mes fichiers de mapping sont les suivants :
hibernate.cfg.xml :
	Code:
	
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 
 |  
<session-factory>
[...]
<property name="show_sql">true</property>
	<property name="hbm2ddl.auto">create</property>
	<mapping resource="foot/hibernate/Coach.hbm.xml" />
	<mapping resource="foot/hibernate/Player.hbm.xml" />
	<mapping resource="foot/hibernate/Team.hbm.xml" />
	<mapping resource="foot/hibernate/Game.hbm.xml" />
</session-factory> | 
 Game.hbm.xml :
	Code:
	
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 
 |  
<hibernate-mapping package="foot.hibernate">
    <class name="Game" table="GAME" lazy="true">
        <id name="gameId" column="GAME_ID" type="java.lang.Long">
            <generator class="native"/>
        </id>
        <property name="awayTeamScore" column="AWAY_TEAM_SCORE" />
        <property name="homeTeamScore" column="HOME_TEAM_SCORE" />
        <property name="gameDate" column="GAME_DATE" />
        <many-to-one cascade="none" name="mostValuablePlayer"
        	class="Player" column="PLAYER_ID" />
        <many-to-one cascade="none" name="homeTeam" 
        	class="Team" column="HOME_TEAM_ID" />
        <many-to-one cascade="none" name="awayTeam" 
        	class="Team" column="AWAY_TEAM_ID" />
    </class>
</hibernate-mapping> | 
 Game.java :
	Code:
	
| 12
 3
 4
 5
 6
 7
 8
 9
 
 |  
private int awayTeamScore;
 
public int getAwayTeamScore() {
		return awayTeamScore;
}
public void setAwayTeamScore(int awayTeamScore) {
	this.awayTeamScore = awayTeamScore;
} | 
 Une piste pour résoudre le problème ?
--
Marc
[Modéré par Didier] : ajout de tag dans le titre - Les règles du forum Java