-->
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.  [ 1 post ] 
Author Message
 Post subject: org.hibernate.MappingNotFoundException:resource :........
PostPosted: Tue Apr 01, 2008 12:52 am 
Newbie

Joined: Mon Mar 31, 2008 11:40 pm
Posts: 1
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:3.2

Mapping documents:Employee.hbm.xml


Hi I'm getting the following exception :

[java] 22:26:07,437 INFO Environment:514 - Hibernate 3.2.6
[java] 22:26:07,453 INFO Environment:547 - hibernate.properties not found
[java] 22:26:07,453 INFO Environment:681 - Bytecode provider name : cglib
[java] 22:26:07,453 INFO Environment:598 - using JDK 1.4 java.sql.Timestam
ndling
[java] 22:26:07,515 INFO Configuration:1432 - configuring from resource: /
rnate.cfg.xml
[java] 22:26:07,515 INFO Configuration:1409 - Configuration resource: /hib
te.cfg.xml
[java] 22:26:07,687 INFO Configuration:559 - Reading mappings from resourc
Employee.hbm.xml
[java] Initial SessionFactory creation failed.org.hibernate.MappingNotFound
ption: resource: Employee.hbm.xml not found
[java] Exception in thread "main" java.lang.ExceptionInInitializerError
[java] at com.myhibernate.util.SessionFactoryUtil.<clinit>(Unknown Sour

[java] at com.myhibernate.test.MyHibernateTest.insertRecord(Unknown Sou

[java] at com.myhibernate.test.MyHibernateTest.main(Unknown Source)
[java] Caused by: org.hibernate.MappingNotFoundException: resource: Employe
m.xml not found
[java] at org.hibernate.cfg.Configuration.addResource(Configuration.jav
9)
[java] at org.hibernate.cfg.Configuration.parseMappingElement(Configura
.java:1593)
[java] at org.hibernate.cfg.Configuration.parseSessionFactory(Configura
.java:1561)
[java] at org.hibernate.cfg.Configuration.doConfigure(Configuration.jav
40)
[java] at org.hibernate.cfg.Configuration.doConfigure(Configuration.jav
14)
[java] at org.hibernate.cfg.Configuration.configure(Configuration.java:
)
[java] at org.hibernate.cfg.Configuration.configure(Configuration.java:
)
[java] ... 3 more
[java] Java Result: 1
_____________________________________________________________

My project structure is as follows :

Project
- src
com
myhibernate
pojo
Employee.java
Employee.hbm.xml
util
SessionFactiry.java
Test

[/code]


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

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.