Failed to find UserTransaction named java:comp/env/UserTransaction in JNDI when deploying Jira on Tomcat 6

Mihai Mihai
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 27, 2012

Hi,

I'm having issues deploying Jira 5 on Tomcat 6.

Jira works, but it's very slow and catalina.out is full of messages like the one attached

012-03-28 07:28:55,535 QuartzWorker-1 WARN ServiceRunner    com.atlassian.jira.plugin.ext.bamboo.service.PlanStatusUpdateServiceImpl:job [core.entity.transaction.JNDIFactory] [JNDIFactory.getUserTransaction] Failed to find UserTransaction named java:comp/env/UserTransaction in JNDI.
2012-03-28 07:28:55,536 QuartzWorker-1 WARN ServiceRunner    com.atlassian.jira.plugin.ext.bamboo.service.PlanStatusUpdateServiceImpl:job [core.entity.transaction.JNDIFactory] NamingException while finding UserTransaction named java:comp/env/UserTransaction in JNDI.
javax.naming.NameNotFoundException: Name UserTransaction is not bound in this Context
        at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
        at org.apache.naming.SelectorContext.lookup(SelectorContext.java:152)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at org.ofbiz.core.entity.transaction.JNDIFactory.getUserTransaction(JNDIFactory.java:113)
        at org.ofbiz.core.entity.TransactionFactory.getUserTransaction(TransactionFactory.java:93)
        at org.ofbiz.core.entity.TransactionUtil.getStatus(TransactionUtil.java:81)
        at org.ofbiz.core.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:412)
        at org.ofbiz.core.entity.GenericDAO.select(GenericDAO.java:464)
        at org.ofbiz.core.entity.GenericHelperDAO.findByPrimaryKey(GenericHelperDAO.java:78)
        at org.ofbiz.core.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:541)
        at org.ofbiz.core.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:576)
        at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.get(OFBizPropertySet.java:277)
        at com.opensymphony.module.propertyset.AbstractPropertySet.getString(AbstractPropertySet.java:305)
        at com.atlassian.sal.jira.scheduling.JiraPluginSchedulerService.run(JiraPluginSchedulerService.java:71)
        at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61)
        at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:47)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
        at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)

The Transaction Factory in my entityengine.xml looks like this

<transaction-factory class="org.ofbiz.core.entity.transaction.JNDIFactory">                                                                                                                                                                                       
      <user-transaction-jndi jndi-server-name="default" jndi-name="java:comp/env/UserTransaction"/>                                                                                                                                                                            
      <transaction-manager-jndi jndi-server-name="default" jndi-name="java:comp/env/UserTransaction"/>                                                                                                                                                                         
    </transaction-factory>                                                                                                                                                                                                                                                     
                                     


I use Tomcat 6.0.35.

Does anyone know whant I can do to make jira work well on Tomcat 6?

Thanks a lot,

Mihai

1 answer

0 votes
Tiago Comasseto
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 22, 2012

Hi Mihai,

I was able to fix this issue following the instructions of this KB. After the modification, my jira.xml is now looking like this:

<Context path="/jira" docBase="/opt/Atlassian/atlassian-jira-5.1.5-war/install/dist-generic/atlassian-jira-5.1.5.war" debug="0" useHttpOnly="true">

<Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"
factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
<Manager pathname=""/>

</Context>

I hope this helps.

Cheers

Hui Zhang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 27, 2014

I have the same issues, and add the jira.xml file like Tiago said, but it's stil get the same issues. Can someone help? thanks,

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events