NamingException while finding UserTransaction named java:comp/env/UserTransaction in JNDI

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

When JIRA application is running, the following exception is captured and flooding the logs file:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 [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:409) 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:543) at org.ofbiz.core.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:578) 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:66) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:60) 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) 2011-09-14 13:16:31,889 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.

Cause

This problem mainly affects JIRA EAR/WAR installation type, whereby the 'UserTransaction' Resource is missing from the server.xml file.

Resolution

  1. In order to fix the issue, we can add the UserTransaction in the server.xml file:

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

    ℹ️ Additional details on this are specified in the documentation on Configure JIRA's Context in Tomcat.

  2. Try to force JIRA to recompile the jsp files by doing the following:

    1. Shutdown JIRA

    2. Remove the work folder located in the tomcat installation directory to force JIRA recompile all jsp files.

    3. Delete the webapps/jira subdirectory of your Tomcat installation directory

    4. Restart JIRA

There is also a known issue with the configuration of dbconfig.xml as detailed in JIRA server functionality fails due to InstanceAlreadyExistsException that may additionally be related to this.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.