[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-1064) Exception using JTATransaction in WebSphere 6

Steve Ebersole (JIRA) noreply at atlassian.com
Mon Mar 21 13:01:11 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole closed HHH-1064.
-------------------------------


Closing stale resolved issues

> Exception using JTATransaction in WebSphere 6
> ---------------------------------------------
>
>                 Key: HHH-1064
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1064
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.0.5
>         Environment: Hibernate 3.0.5, 3.1b3, IBM WebSphere 6 AS, Spring 1.2.5
>            Reporter: Andrey Grebnev
>            Assignee: Gavin King
>             Fix For: 3.1 rc3
>
>
> I have already posted this bug to you http://opensource2.atlassian.com/projects/hibernate/browse/HHH-1053 but you rejected it. Now I concrete it according discussion in forum http://forum.hibernate.org/viewtopic.php?t=948460
> I am porting my application AtLeap (https://atleap.dev.java.net) from Hibernate 2.1.8 and Spring 1.1.5 to Hibernate 3.0.5 and Spring 1.2.5. 
> AtLeap was working correctly under IBM WebSphere 6 AS with following settings: 
> <property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.JTATransactionFactory"/> 
> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WebSphereTransactionManagerLookup"/> 
>   
> However when I have ported AtLeap into Hibernate 3.0.5 and Spring 1.2.5 I have the following error: 
> [05.10.05 22:12:06:531 GEST] 00000058 Helpers W NMSV0605W: A Reference object looked up from the context 
> "agrebnevNode01Cell/nodes/agrebnevNode01/servers/server1" with the name "jta/usertransaction" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows: 
> Reference Factory Class Name: com.ibm.ws.Transaction.JTA.UtxJNDIFactory 
> Reference Factory Class Location URLs: <null> 
> Reference Class Name: java.lang.Object 
> Exception data follows: 
> javax.naming.ConfigurationException 
>     at com.ibm.ws.Transaction.JTA.UtxJNDIFactory.getObjectInstance(UtxJNDIFactory.java:107) 
>     at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:314) 
>     at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:874) 
>     at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:681) 
>     at com.ibm.ws.naming.jndicos.CNContextImpl.cacheLookup(CNContextImpl.java:3489) 
>     at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1755) 
>     at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1737) 
>     at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1444) 
>     at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1324) 
>     at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:144) 
>     at javax.naming.InitialContext.lookup(InitialContext.java:361) 
>     at org.hibernate.transaction.JTATransaction.begin(JTATransaction.java:58) 
>     at org.hibernate.transaction.JTATransactionFactory.beginTransaction(JTATransactionFactory.java:53) 
>     at org.hibernate.jdbc.JDBCContext.beginTransaction(JDBCContext.java:271) 
>     at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1079) 
>     at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:42 
> 6) 
>     at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatform 
> TransactionManager.java:281) 
>     at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(Transact 
> ionAspectSupport.java:217) 
>     at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:89) 
>     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) 
>     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174) 
>     at $Proxy72.findContentPageByUri(Unknown Source) 
> Many changes were done in org.hibernate.transaction.JTATransaction and org.hibernate.transaction.JTATransactionFactory in version 3.0.5 comparing with 2.1.8. Please look at the following code from JTATransactionFactory 
>       utName = props.getProperty(Environment.USER_TRANSACTION); 
>        
>       if (utName==null) { 
>          TransactionManagerLookup lookup = TransactionManagerLookupFactory.getTransactionManagerLookup(props); 
>          if (lookup!=null) utName = lookup.getUserTransactionName(); 
>       } 
>       if (utName==null) utName = DEFAULT_USER_TRANSACTION_NAME; 
> We can see that we call getUserTransactionName 
> Now let's look at WebSphereTransactionManagerLookup 
>    public String getUserTransactionName() { 
>       return version==5 ? 
>          "java:comp/UserTransaction": 
>          "jta/usertransaction"; 
>    } 
> the version variable will be initialized only after calling getTransactionManager, but we do not do it. As result we have utName equals jta/usertransaction, but it should be java:comp/UserTransaction 
> --
> Andrey Grebnev
> http://www.jroller.com/page/agrebnev

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list