-->
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: Cannot find UserTransaction with JBoss
PostPosted: Thu Dec 18, 2003 1:02 pm 
Newbie

Joined: Thu Dec 18, 2003 12:50 pm
Posts: 8
Location: FRANCE
I have installed my hibernate classes on JBoss using a service approach
as described in Hibernate's document.

At the beginning, I had my "Hibernate Service" called from a web application which is part of of an EAR. Everything worked fine. But I had to move part of the web application (the part that uses Hibernate) to another service. This service has a dependency to start after Hibernate.

Although Hibernate has been correctly started, my new service which tries to update the database within its startService method complains of not finding the UserTransacton in JNDI.

Obciously the name java:comp/UserTransaction is not found (see stack trace) and not already bound when my service starts which was not the case with a Web application. I suspect a missing dependency but which one?

I tried to restart the service after it fails but the same error occurs once again.

Regards

Olivier.

--------------------------------------------------------------------------------
STACK TRACE :

7:43:40,921 ERROR [JTATransaction] Could not find UserTransaction in JNDI
avax.naming.NameNotFoundException: UserTransaction not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:606)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at net.sf.hibernate.transaction.JTATransaction.begin(JTATransaction.java:96)
at net.sf.hibernate.transaction.JTATransactionFactory.beginTransaction(JTATransactionFactory.java:80)
at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1981)
at fr.mood.persistent.services.StorageManager.begin(StorageManager.java:103)
at fr.mood.repository.Terminator.<init>(Terminator.java:98)
at fr.mood.repository.RWTerminator.<init>(RWTerminator.java:173)
at fr.mood.repository.Repository.lockWrite(Repository.java:115)
at fr.mood.repository.RepositoryFactory.<init>(RepositoryFactory.java:53)
at fr.mood.repository.RepositoryFactory.<clinit>(RepositoryFactory.java:38)
at fr.mood.jboss.MoodService.startService(MoodService.java:65)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
...

[code][/code]


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 18, 2003 3:06 pm 
Senior
Senior

Joined: Tue Nov 25, 2003 9:35 am
Posts: 194
Location: San Francisco
What does the following attribute look like in your jboss-service.xml?

<attribute name="UserTransactionName">UserTransaction</attribute>


Have you checked out where the UserTransaction ends up in JNDI via the jmx console?


Sherman


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.