-
1. Re: JNDI Look up returns null on Hibernate session factory
talkinjive Jul 11, 2005 5:16 AM (in response to nxbalas)Hi,
Sorry but I can't help you. In fact I've exactly the same problem. I've asked for help on forums but no one seems to be able to give a solution.
I'm searching for a few days. Perhaps a jndi.properties is required ?
TalkinJive -
2. Re: JNDI Look up returns null on Hibernate session factory
darranl Jul 11, 2005 8:52 AM (in response to nxbalas)What steps have you followed to use Hibernate 2.1.7 with JBoss 4.0.2, as of JBoss 4.0.2 Hibernate 3 is included as standard.
-
3. Re: JNDI Look up returns null on Hibernate session factory
nxbalas Jul 11, 2005 9:01 AM (in response to nxbalas)I used instructions provided by JBoss using following link
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossHibernateSwitching -
4. Re: JNDI Look up returns null on Hibernate session factory
talkinjive Jul 12, 2005 3:30 AM (in response to nxbalas)I use hibernate3 with JBoss4 because I want my ear to be deployed on different kinda server.
(for exemple weblo doesn't contain hibernate). -
5. Re: JNDI Look up returns null on Hibernate session factory
nxbalas Jul 12, 2005 9:20 AM (in response to nxbalas)U use Hibernate 3 and I use 2.1, what diff. does it make where I deploy as long as I package it right?
-
6. Re: JNDI Look up returns null on Hibernate session factory
darranl Jul 12, 2005 1:52 PM (in response to nxbalas)"nxbalas" wrote:
U use Hibernate 3 and I use 2.1, what diff. does it make where I deploy as long as I package it right?
I haven't had a chance to look at the instructions you followed yet but the version makes a big difference.
Hibernate 2 has classes in the net.sf.hibernate package, Hibernate 3 has the classes in the org.hibernate package. As the error references net.sf.hibernate it is important to know which version you are having the problems with. -
7. Re: JNDI Look up returns null on Hibernate session factory
nxbalas Jul 12, 2005 2:20 PM (in response to nxbalas)I am using Hibernate 2.1.7 and using the switch info from wiki (URL is above in the trail) I changed the hibernate 3.x integration in JBoss-4.0.2 to Hibernate 2.1.x. Rest everything left as is.
-
8. Re: JNDI Look up returns null on Hibernate session factory
sebersole Jul 19, 2005 3:20 PM (in response to nxbalas)Somewhere on your classpath you have a hibernate.properties file which specifies a value for the 'hibernate.session_factory_name' property.
When using the HARDeployer you should endeavor not to use a hibernate.properties file. That's what the MBean is for. -
9. Re: JNDI Look up returns null on Hibernate session factory
nxbalas Jul 19, 2005 3:59 PM (in response to nxbalas)I search from root of JBoss-4.0.2 and find no file by name hibernate.properties or any other (XML) file consisting of hibernate.session_factory_name property
-
10. Re: JNDI Look up returns null on Hibernate session factory
sebersole Jul 20, 2005 9:11 AM (in response to nxbalas)Ah, just looked at the source code that is attached on that Wiki page and it is wrong.
Specifically, two things you need to change in the org.jboss.hibernate.jmx.Hibernate class:
1) in the getProperties() method, remove the line:
setUnlessNull(props, Environment.SESSION_FACTORY_NAME, sessionFactoryName);
2) have it take over responsibility for binding and unbinding the session factory itself; use the newer (hibernate-3 based) one as a reference on how to do that.