-->
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.  [ 3 posts ] 
Author Message
 Post subject: Tomcat 4.1.24 and .hbm files placement
PostPosted: Mon Oct 06, 2003 7:56 am 
Newbie

Joined: Fri Sep 26, 2003 10:46 am
Posts: 6
Hi All,

Presently i am placing .hbm files under <TOMCAT_ROOT>/bin directory..

if i am placing my .hbm files under webapps/<appname>/classes directory
it is throwing am exception..

in the implementation file i am adding it to Configuration like:
cfg.addFile( "<package>/TblMst_Document_Type.hbm.xml");


But placing under bin directory is not the right approach..i need to put it under classes directory of my application..
Please guide me how to do it?
(i.e placing .hbm files under webapps/<appname>/classes )

Thanks and regards
Krishna Reddy


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 06, 2003 8:00 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Please read the documentation and the examples.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject: hbm
PostPosted: Wed Oct 08, 2003 6:39 pm 
Beginner
Beginner

Joined: Tue Oct 07, 2003 4:32 pm
Posts: 36
Location: S
try this :

put hibernate.cfg.xml in ..\webapps\YOURSYSTEM\WEB-INF\classes :

<?xml version='1.0' encoding='utf-8'?>

<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

<hibernate-configuration>
<session-factory>
<!-- Mapping files -->
<mapping resource="resources\TbHerrera.hbm.xml"/>

</session-factory>
</hibernate-configuration>

and put your TbHerrera.hbm.xml under classes\resources :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
....

</hibernate-mapping>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.