-->
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: Could not find UserTransaction
PostPosted: Wed Jul 18, 2007 5:30 am 
Newbie

Joined: Thu Jun 28, 2007 9:39 am
Posts: 9
Hibernate version:3.0
WAS 5.1
SQL Server 2000

In the hibernate.cfg.xml file we have the following data source mapping:
<property name="transaction.factory_class">
org.hibernate.transaction.JTATransactionFactory
</property>
<property name="transaction.manager_lookup_class">
org.hibernate.transaction.WebSphereTransactionManagerLookup
</property>

<property name="connection.datasource">jdbc/data source name</property>

In some of the java methods it is throwing the following error.



[7/12/07 6:23:37:689 MDT] 6406c8e4 JTATransactio E org.hibernate.transaction.JTATransaction Could not find UserTransaction in JNDI

[7/12/07 6:23:37:705 MDT] 6406c8e4 JTATransactio E org.hibernate.transaction.JTATransaction TRAS0014I: The following exception was logged javax.naming.NameNotFoundException: Name "comp/UserTransaction" not found in context "java:".
at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1021)
at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:932)
at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1261)
at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:196)
at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:137)
at javax.naming.InitialContext.lookup(InitialContext.java:361)
at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:60)
at org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:57)
at org.hibernate.jdbc.JDBCContext.getTransaction(JDBCContext.java:193)
at org.hibernate.impl.SessionImpl.getTransaction(SessionImpl.java:1315)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1325)
at com.ms.epr.db.dao.HibernateUtil.beginTransaction(Unknown Source)
at com.ms.epr.util.EPRUtils.getDataByQuery(Unknown Source)
at com.ms.epr.core.SelfMgmt.isSrMgrExist(SelfMgmt.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at com.waveset.util.Reflection.invoke(Reflection.java(Compiled Code))
at com.waveset.util.Reflection.invoke(Reflection.java:756)
at com.waveset.expression.ExInvoke.evalInternal(ExInvoke.java:169)
at com.waveset.expression.ExNode.eval(ExNode.java(Compiled Code))
at com.waveset.expression.ExNode.evalChild(ExNode.java:517)
at com.waveset.expression.ExSet.evalInternal(ExSet.java:210)
at com.waveset.expression.ExNode.eval(ExNode.java(Compiled Code))
at com.waveset.expression.ExBlock.evalInternal(ExBlock.java(Compiled Code))
at com.waveset.expression.ExNode.eval(ExNode.java(Compiled Code))
at com.waveset.expression.ExBlock.eval(ExBlock.java:148)
at com.waveset.expression.ExNode.evalToObject(ExNode.java(Compiled Code))
at com.waveset.workflow.WorkflowEngine.evaluate(WorkflowEngine.java:1413)
at com.waveset.workflow.WorkflowEngine.callAction(WorkflowEngine.java:3821)
at com.waveset.workflow.WorkflowEngine.callAction(WorkflowEngine.java:3229)
at com.waveset.workflow.WorkflowEngine.execute(WorkflowEngine.java:3070)
at com.waveset.workflow.WorkflowEngine.makeTransition(WorkflowEngine.java:2809)
at com.waveset.workflow.WorkflowEngine.checkExplicitTransitions(WorkflowEngine.java:2700)
at com.waveset.workflow.WorkflowEngine.checkTransitions(WorkflowEngine.java:2486)
at com.waveset.workflow.WorkflowEngine.processSteps(WorkflowEngine.java:1891)
at com.waveset.workflow.WorkflowEngine.walkCases(WorkflowEngine.java:1748)
at com.waveset.workflow.WorkflowEngine.walkCases(WorkflowEngine.java:1731)
at com.waveset.workflow.WorkflowEngine.walkCases(WorkflowEngine.java:1731)
at com.waveset.workflow.WorkflowEngine.walkCases(WorkflowEngine.java:1656)
at com.waveset.workflow.WorkflowEngine.execute(WorkflowEngine.java:816)
at com.waveset.workflow.WorkflowEngine.execute(WorkflowEngine.java:478)
at com.waveset.workflow.WorkflowExecutor.execute(WorkflowExecutor.java:235)
at com.waveset.task.TaskThread.run(TaskThread.java:116)
.
javax.naming.NameNotFoundException: Name "comp/UserTransaction" not found in context "java:".
at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1021)
at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:932)
at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1261)
at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:196)
at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:137)
at javax.naming.InitialContext.lookup(InitialContext.java:361)
at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:60)
at org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:57)
at org.hibernate.jdbc.JDBCContext.getTransaction(JDBCContext.java:193)
at org.hibernate.impl.SessionImpl.getTransaction(SessionImpl.java:1315)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1325)
at com.ms.epr.db.dao.HibernateUtil.beginTransaction(Unknown Source)
at com.ms.epr.util.EPRUtils.getDataByQuery(Unknown Source)
at com.ms.epr.core.SelfMgmt.isSrMgrExist(SelfMgmt.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at com.waveset.util.Reflection.invoke(Reflection.java(Compiled Code))
at com.waveset.util.Reflection.invoke(Reflection.java:756)
at com.waveset.expression.ExInvoke.evalInternal(ExInvoke.java:169)
at com.waveset.expression.ExNode.eval(ExNode.java(Compiled Code))
at com.waveset.expression.ExNode.evalChild(ExNode.java:517)
at com.waveset.expression.ExSet.evalInternal(ExSet.java:210)
at com.waveset.expression.ExNode.eval(ExNode.java(Compiled Code))
at com.waveset.expression.ExBlock.evalInternal(ExBlock.java(Compiled Code))
at com.waveset.expression.ExNode.eval(ExNode.java(Compiled Code))
at com.waveset.expression.ExBlock.eval(ExBlock.java:148)
at com.waveset.expression.ExNode.evalToObject(ExNode.java(Compiled Code))
at com.waveset.workflow.WorkflowEngine.evaluate(WorkflowEngine.java:1413)
at com.waveset.workflow.WorkflowEngine.callAction(WorkflowEngine.java:3821)
at com.waveset.workflow.WorkflowEngine.callAction(WorkflowEngine.java:3229)
at com.waveset.workflow.WorkflowEngine.execute(WorkflowEngine.java:3070)
at com.waveset.workflow.WorkflowEngine.makeTransition(WorkflowEngine.java:2809)
at com.waveset.workflow.WorkflowEngine.checkExplicitTransitions(WorkflowEngine.java:2700)
at com.waveset.workflow.WorkflowEngine.checkTransitions(WorkflowEngine.java:2486)
at com.waveset.workflow.WorkflowEngine.processSteps(WorkflowEngine.java:1891)
at com.waveset.workflow.WorkflowEngine.walkCases(WorkflowEngine.java:1748)
at com.waveset.workflow.WorkflowEngine.walkCases(WorkflowEngine.java:1731)
at com.waveset.workflow.WorkflowEngine.walkCases(WorkflowEngine.java:1731)
at com.waveset.workflow.WorkflowEngine.walkCases(WorkflowEngine.java:1656)
at com.waveset.workflow.WorkflowEngine.execute(WorkflowEngine.java:816)
at com.waveset.workflow.WorkflowEngine.execute(WorkflowEngine.java:478)
at com.waveset.workflow.WorkflowExecutor.execute(WorkflowExecutor.java:235)
at com.waveset.task.TaskThread.run(TaskThread.java:116)


Can Any one have any soultions for this.
The methods are working fine , without data source use in hibernate.cfg.xml files.
Let me know if any other info needs.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 18, 2007 8:22 am 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
Replace the Hibernate calls in one of your failing session beans with a direct lookup of UserTransaction. If it fails, then you have to diagnose what's wrong with your bean.

-Chris

_________________
Chris Bredesen
Senior Software Maintenance Engineer, JBoss


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.