Jira doesn't start after the upgrade due to the "Only one result is allowed for fetchOne" calls error
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
Problem
Jira doesn't start after the upgrade and it throws an error regarding some plugins and multiple records in the database tables:
2024-04-21 10:26:42,739+0000 ThreadPoolAsyncTaskExecutor::Thread 1 ERROR [o.e.g.b.e.internal.support.ExtenderConfiguration] Application context refresh failed (NonValidatingOsgiBundleXmlApplicationCon
text(bundle=com.atlassian.analytics.client, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productInformation' defined in OSGi resource[classpath:com/atlassian/analytics/client/logger/AnalyticsLoggerConfigura
tion.class|bnd.id=12|bnd.sym=com.atlassian.analytics.client]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [
com.atlassian.analytics.client.properties.ProductProperties]: Factory method 'productInformation' threw exception; nested exception is com.atlassian.cache.CacheException: com.querydsl.core.NonUniqueResultE
xception: Only one result is allowed for fetchOne calls
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:633)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:929)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:57)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:322)
at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:287)
at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.analytics.client.properties.ProductProperties]: Factory method 'productInformation' threw exception; ne
sted exception is com.atlassian.cache.CacheException: com.querydsl.core.NonUniqueResultException: Only one result is allowed for fetchOne calls
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:648)
... 19 more
Caused by: com.atlassian.cache.CacheException: com.querydsl.core.NonUniqueResultException: Only one result is allowed for fetchOne calls
at com.atlassian.cache.ehcache.DelegatingCache.get(DelegatingCache.java:114)
at com.atlassian.cache.impl.metrics.InstrumentedCache.get(InstrumentedCache.java:72)
at com.atlassian.jira.cache.stats.CacheWithStats.get(CacheWithStats.java:46)
at com.atlassian.jira.config.properties.v2.DefaultCachingApplicationPropertiesManager.get(DefaultCachingApplicationPropertiesManager.java:93)
at com.atlassian.jira.config.properties.v2.ApplicationPropertiesBackedPropertySet.get(ApplicationPropertiesBackedPropertySet.java:41)
at com.opensymphony.module.propertyset.AbstractPropertySet.getString(AbstractPropertySet.java:305)
at com.atlassian.jira.config.properties.ApplicationPropertiesStore.getStringFromDb(ApplicationPropertiesStore.java:251)
at com.atlassian.jira.config.properties.ApplicationPropertiesImpl.getString(ApplicationPropertiesImpl.java:59)
at com.atlassian.jira.license.MultiLicenseStoreImpl.retrieveServerId(MultiLicenseStoreImpl.java:94)
at com.atlassian.jira.license.JiraLicenseManagerImpl.getServerId(JiraLicenseManagerImpl.java:79)
at com.atlassian.jira.bc.license.JiraLicenseServiceImpl.getServerId(JiraLicenseServiceImpl.java:76)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
One of the scenarios is when there are multiple records of jira.sid.key values in the propertyentry table. The root cause is unknown.
10102,jira.properties,1,jira.sid.key,5
10103,jira.properties,1,jira.sid.key,5
Resolution
Remove one of the records (it doesn't matter which one) and restart Jira:
delete propertyentry where id= 10103;
Was this helpful?