-->
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.  [ 4 posts ] 
Author Message
 Post subject: Integration: JBoss- Hibernate
PostPosted: Tue Apr 10, 2007 10:21 am 
Regular
Regular

Joined: Mon Jun 12, 2006 5:33 am
Posts: 63
Hello,

I have the following question:
Where should I specify the .hbm.xml files?
I have created a .har deployment containing a hibernate.service.xml file (where all hibernate related configuration of the SessionFactory is specified). Now I need to specify somewhere where the .hbm.xml files are located. JBoss doesn't seam to locate them automatically.
Thanks for the help.

chucky


Hibernate version: 3.2

Name and version of the database : Oracle 10g

JBoss version: 4.2 RC1


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 10, 2007 5:43 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
It should locate them automatically. Does for me.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 11, 2007 4:34 am 
Regular
Regular

Joined: Mon Jun 12, 2006 5:33 am
Posts: 63
Hi David,

actually my configuration looks like this:
- a shop.jar file containing EJB3 code located in <JBOSS>\server\default\deploy

- a shop.har directory located at the same place which contains the META-INF/hibernate-service.xml file.

At startup, everything seams to be found and JNDI bound.

- in the shop.jar I have the POJOS .class files and the .hbm.xml files locatedin the same path :
Quote:
org.os.shop.pojos.Customer.class
and
Quote:
org.os.shop.pojos.Customer.hbm.xml
.

I've got the exception :
Code:
javax.ejb.EJBException: org.hibernate.MappingException: Unknown entity: org.os.shop.pojos.Customer

So what am I doing wrong?
Thanks for your help

chucky
---------


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 11, 2007 7:16 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Try merging the jar and har. My har deployments include the XML and POJO domain level in the one deployment package.


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