aspose file tools
The moose likes Object Relational Mapping and the fly likes Configure Hibernate in JBOSS 4.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Configure Hibernate in JBOSS 4.0" Watch "Configure Hibernate in JBOSS 4.0" New topic
Author

Configure Hibernate in JBOSS 4.0

Shanika Weerapperuma
Greenhorn

Joined: Jun 28, 2004
Posts: 26
Can someone please help me to configure Hibernate in JBOSS. I use JBOSS V4.0.0 with Hibernate 2.1.6. Not sure if the way i have configured is correct!

I copied the relavent hibernate jars to the default/lib folder of JBOSS. Created a .har and deployed as an exploded folder. My .har has the following structure :

jboss.har-
|META-INF
| hibernate-service.xml
|com
|src
| MyTest1.java
| MyTest2.java
| MyTest1.hbm.xml
| MyTest2.hbm.xml

My hibernate-service.xml looks like :




I get a deployment error when deplying the jboss.har :
org.jboss.deployment.DeploymentException: No Attribute found with name: MapResources
Shanika Weerapperuma
Greenhorn

Joined: Jun 28, 2004
Posts: 26
I figured this out. That tag is not required. The hbm.xml files available anywhere in the .har file is mapped automatically. Removing that statement solved the issue.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Configure Hibernate in JBOSS 4.0
 
It's not a secret anymore!