-->
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.  [ 1 post ] 
Author Message
 Post subject: XA Transaction with Hibernate and Atomikos in OSGi
PostPosted: Wed Jun 30, 2010 2:02 pm 
Newbie

Joined: Wed Jun 30, 2010 1:48 pm
Posts: 1
Hi

I have configured a dao object using LocalSessionFactoryBean and injected Atomikos userTransactionManager. I can see that there is a transaction running with a specific id. But when I try to save a object using the dao I see the following error in Hibernate:

[2010-06-30 11:34:18.489] Thread-92 org.hibernate.transaction.JTATransaction DEBUG Looking for UserTransaction under: java:comp/UserTransaction
[2010-06-30 11:34:19.380] Thread-92 org.hibernate.transaction.JTATransaction ERROR Could not find UserTransaction in JNDI javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:60)
at org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:57)
at org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:172)
at org.hibernate.impl.SessionImpl.checkTransactionSynchStatus(SessionImpl.java:1867)
at org.hibernate.impl.SessionImpl.getFlushMode(SessionImpl.java:1295)
at org.springframework.orm.hibernate3.HibernateTemplate.checkWriteOperationAllowed(HibernateTemplate.java:1174)
at org.springframework.orm.hibernate3.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:685)
at org.springframework.orm.hibernate3.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:1)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
at org.springframework.orm.hibernate3.HibernateTemplate.save(HibernateTemplate.java:683)



Any reason why Hibernate is still looking in jndi to find a session? I even tried the Hibernate properties approach and it's the same result. Any help is much appreciated.

thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.