-->
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.  [ 2 posts ] 
Author Message
 Post subject: Standalone hibernate application and JNDI binding
PostPosted: Thu Feb 03, 2005 8:29 pm 
Beginner
Beginner

Joined: Thu Feb 03, 2005 7:23 pm
Posts: 23
Hello,

Apologies for my previous post, there was an error I believe.

I just got my first hibernate application running, but I am getting some warnings about not being able to bind to JNDI. This is a standalone application, so I do not have a JNDI source. The warnings are:

02:02:23,691 INFO NamingHelper:26 - JNDI InitialContext properties:{}
02:02:23,701 WARN SessionFactoryObjectFactory:98 - Could not bind factory to JNDI javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

Is this some harmless warning, or something that needs to be fixed by me?

Also, about jta.jar: even though in my hibernate.cfg.xml I have
<property name="hibernate.transaction.factory_class">
net.sf.hibernate.transaction.JDBCTransactionFactory</property>

My application still requires jta.jar.

I am using hibernate synchronizer for eclipse plugin. Initially it created:

<property name="hibernate.transaction.factory_class">
net.sf.hibernate.transaction.JTATransactionFactory
</property>
<property name="jta.UserTransaction">
java:comp/UserTransaction
</property>

which then I turned into JDBCTransaction factory thinking that it was a JTA releated problem, but it did not solve my problem.

Greetings,
-O.B.


Top
 Profile  
 
 Post subject: hibernate and jndi
PostPosted: Thu Feb 03, 2005 11:40 pm 
Beginner
Beginner

Joined: Thu Feb 03, 2005 7:23 pm
Posts: 23
Hello,
I was able to solve the problem by some help from #hibernate.
The problem was in hibernate.cfg.xml where
<session-factory name="SessionFactory">
deleting the name="" solves the puzzle.


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