-->
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.  [ 5 posts ] 
Author Message
 Post subject: Newbie Question about JBoss/Hibernate configuration
PostPosted: Wed Dec 31, 2003 8:30 am 
Newbie

Joined: Mon Dec 22, 2003 9:12 am
Posts: 6
Location: Ohio
Hi,

I am trying to configure Hibernate with JBoss.

What directory should I place the hibernate.properties file? I am getting an error message saying the hibernate.properties file is not found. I tried placing it in JBOSS_HOME/lib and JBOSS_HOME/server/default/lib, but it doesn't seem to work.

Thanks for any help!

--Bill


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 31, 2003 10:49 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
put it somewhere on the classpath! add it to a jar, but it in a classes dir somewhere....

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 31, 2003 10:52 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
The best way to use hibernate with JBoss is deploying it as an MBean, IMHO. There is more info about that here: http://www.hibernate.org/66.html


Top
 Profile  
 
 Post subject: There is more to the story
PostPosted: Wed Dec 31, 2003 11:05 am 
Newbie

Joined: Mon Dec 22, 2003 9:12 am
Posts: 6
Location: Ohio
There is something wacky going on. Here is the deal...
When I access my session bean, execute a simple method call, access the DAO, invoke Hibernate -


First:
The JBoss console logs output from Hibernate saying the hibernate properties are loaded. Great!

Then:
I am getting a FileNotFound exception, saying the hibernate.properties file cannot be found; then JBoss spits out a message about the console appender looping (which I understand is a conflict between hibernate and jboss log4j configurations).

Will Hibernate and JBoss NOT play together nicely unless I package Hibernate as a SAR? (I am not too keen on deploying my Hibernate mappings and classes together as a SAR)

Anyone ever come across this issue??

Thanks for your responses!!!


Top
 Profile  
 
 Post subject: Oh, its me :)
PostPosted: Wed Dec 31, 2003 12:22 pm 
Newbie

Joined: Mon Dec 22, 2003 9:12 am
Posts: 6
Location: Ohio
Turns out, later on in the code, one of the DAOs was specically trying to load the hibernate.properties file from a location that didn't exist. I removed those lines from the code and all is well. Arrrgg...its always something stupid....


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