Jira fails to start with error message "java.lang.NoSuchMethodError"

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Problem

After an upgrade or when deploying new Jira Data Center nodes, Jira fails to be started with following stack traces shown in atlassian-jira.log:

2020-08-05 09:01:19,692-0400 JIRA-Bootstrap ERROR      [NoModule] Could not determine database type.
io.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NoSuchMethodError: com.atlassian.jira.util.BuildUtilsInfo.getAuditVersion()Ljava/lang/String;
	at io.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:156)
	at io.atlassian.util.concurrent.LazyReference.get(LazyReference.java:116)
	at io.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:95)
	at com.atlassian.jira.diagnostic.connection.DatabaseDiagnosticsCollectorDelegate.isEnabled(DatabaseDiagnosticsCollectorDelegate.java:35)
	at com.atlassian.jira.ofbiz.sql.JiraSupportedDatabasesCompatibleJNDIFactory.wrapForDiagnostics(JiraSupportedDatabasesCompatibleJNDIFactory.java:51)
	at com.atlassian.jira.ofbiz.sql.JiraSupportedDatabasesCompatibleJNDIFactory.getConnection(JiraSupportedDatabasesCompatibleJNDIFactory.java:38)
	at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:114)
	at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)
	at org.ofbiz.core.entity.config.DatasourceInfo.getDatabaseTypeFromJDBCConnection(DatasourceInfo.java:348)
	at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:829)
	at org.ofbiz.core.entity.GenericHelperDAO.findListIteratorByCondition(GenericHelperDAO.java:216)
	at org.ofbiz.core.entity.GenericDelegator.findListIteratorByCondition(GenericDelegator.java:1243)
	at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findListIteratorByCondition(DefaultOfBizDelegator.java:405)
	at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.findListIteratorByCondition(WrappingOfBizDelegator.java:283)
	at com.atlassian.jira.entity.SelectQueryImpl$ExecutionContextImpl.forEach(SelectQueryImpl.java:227)
	at com.atlassian.jira.entity.SelectQueryImpl$ExecutionContextImpl.asList(SelectQueryImpl.java:164)
	at com.atlassian.jira.user.util.UserKeyStoreImpl.buildCache(UserKeyStoreImpl.java:226)
	at com.atlassian.jira.user.util.UserKeyStoreImpl.<init>(UserKeyStoreImpl.java:69)
	... 3 filtered
...
Caused by: java.lang.NoSuchMethodError: com.atlassian.jira.util.BuildUtilsInfo.getAuditVersion()Ljava/lang/String;
	at com.atlassian.jira.plugin.DefaultPackageScannerConfiguration.<init>(DefaultPackageScannerConfiguration.java:123)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

or

2020-08-05 06:21:53,680-0400 localhost-startStop-1 ERROR      [c.a.jira.startup.ComponentContainerLauncher] A fatal error occurred during initialisation. JIRA has been locked.
net.sf.ehcache.CacheException: java.lang.NoSuchFieldError: CLUSTERING
	at net.sf.ehcache.CacheManager.init(CacheManager.java:426)
	at net.sf.ehcache.CacheManager.<init>(CacheManager.java:270)
	at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1116)
	at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1092)
	at com.atlassian.jira.component.pico.registrar.CacheManagerRegistrar.getCacheManagerDelegate(CacheManagerRegistrar.java:264)
	at com.atlassian.jira.component.pico.registrar.CacheManagerRegistrar.registerCacheManager(CacheManagerRegistrar.java:162)
	at com.atlassian.jira.component.pico.registrar.ContainerRegistrar.registerCacheManager(ContainerRegistrar.java:3920)
	at com.atlassian.jira.component.pico.registrar.ContainerRegistrar.registerComponents(ContainerRegistrar.java:3867)
	at com.atlassian.jira.component.pico.ComponentManager.createFullContainer(ComponentManager.java:209)
	at com.atlassian.jira.startup.ComponentContainerLauncher.populateFullPicoContainer(ComponentContainerLauncher.java:50)
	at com.atlassian.jira.startup.ComponentContainerLauncher.start(ComponentContainerLauncher.java:30)
	at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$postDbLaunch$2(DefaultJiraLauncher.java:140)
	at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:301)
	at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseActivated(DatabaseConfigurationManagerImpl.java:196)
	at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:137)
	at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$start$0(DefaultJiraLauncher.java:104)
	at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:31)
	at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:102)
	at com.atlassian.jira.startup.LauncherContextListener.initSlowStuff(LauncherContextListener.java:154)
	at com.atlassian.jira.startup.LauncherContextListener.initSlowStuffInBackground(LauncherContextListener.java:139)
	at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:101)
	... 5 filtered
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchFieldError: CLUSTERING
	at com.atlassian.jira.auditing.handlers.ClusterNodeAuditHandlerImpl.auditTypeForAction(ClusterNodeAuditHandlerImpl.java:47)
	at com.atlassian.jira.auditing.handlers.ClusterNodeAuditHandlerImpl.<clinit>(ClusterNodeAuditHandlerImpl.java:37)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

Diagnosis

Environment

  • Jira installed in Windows or Linux environment

Diagnostic Steps

  • Verify whether there was an error during the upgrade if exe file was used to upgrade Jira.

  • Verify whether the JIRA_INSTALL directory copied from one node to another has the same contents, and if the permissions of all files match.

Cause

  • This problem can happen if during the upgrade process, the upgrade wizard throws "Error while attempting to remove the previous installation directory. Some files may be in use. Please close all related programs and try again." error and user choose to skip the error instead of fixing the cause of the error.
  • Another known cause is when copying the contents of JIRA_INSTALL from one node to another after the installer was originally used to deploy the first node.

Resolution

To resolve this problem, follow the suggestion below:

  • Ensure that user executing the installer has the appropriate permissions to the JIRA directory.
  • Stop the JIRA service prior to executing the upgrade.
  • Check that no applications are accessing those files during the upgrade process. In Windows, this can be done with the Process Explorer using Find as in the below example:

  • If the issue is occuring when deploying additional nodes, we recommend:
    • Renaming the previous JIRA_INSTALL directory instead of trying to overwrite the files, or;
    • Following the steps from the section 5. Add the remaining nodes to the cluster - If Jira was installed using a .bin or .exe installer on the first node of the KB article Installing Jira Data Center.


Description
ProductJira Server

Last modified on Oct 20, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.