This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Configure Hibernate in JBOSS 4.0" Watch "Configure Hibernate in JBOSS 4.0" New topic

Configure Hibernate in JBOSS 4.0

Shanika Weerapperuma

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 :

| hibernate-service.xml
| 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

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.
I agree. Here's the link:
subject: Configure Hibernate in JBOSS 4.0
It's not a secret anymore!