-->
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: .hbm.xml not found
PostPosted: Thu Sep 10, 2009 4:12 am 
Newbie

Joined: Thu Sep 10, 2009 3:59 am
Posts: 2
Bonjour,

je suis débutant en Hibernate.
j'ai rencontré une exception lors de compilation de mon code:

"Exception in thread "main" net.sf.hibernate.MappingException: Resource: Test.hbm.xml not found"

voilà la sortie :

10 sept. 2009 09:05:34 net.sf.hibernate.cfg.Environment <clinit>
INFO: Hibernate 2.1.2
10 sept. 2009 09:05:34 net.sf.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
10 sept. 2009 09:05:34 net.sf.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
10 sept. 2009 09:05:34 net.sf.hibernate.cfg.Configuration configure
INFO: configuring from file: hibernate.cfg.xml
10 sept. 2009 09:05:34 net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: Test.hbm.xml
10 sept. 2009 09:05:34 net.sf.hibernate.cfg.Configuration addResource
INFO: Mapping resource: Test.hbm.xml
Exception in thread "main" net.sf.hibernate.MappingException: Resource: Test.hbm.xml not found
at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:313)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:976)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:928)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:890)
at javaapphibernate.HiberClient.main(HiberClient.java:25)
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)


sachant que j'ai mis le Test.hbm.xml dans le même niveau que les fichiers sources et que le hibernate.cfg.xml.

de plus dans hibernate.cfg.xml j'ai mis : <mapping resource="Test.hbm.xml"/>

je ne sais pas comment corrigé ça.

Merci d'avance pour votre aide.


Top
 Profile  
 
 Post subject: Re: .hbm.xml not found
PostPosted: Thu Sep 10, 2009 9:43 am 
Newbie

Joined: Thu Sep 10, 2009 3:59 am
Posts: 2
j'ai résolu cette première exception en ajoutant "dossier/*.hbm.xml"

Mais d'autre exception

"GRAVE: Could not compile the mapping document
net.sf.hibernate.MappingException: persistent class [Test] not found
"


???


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.