org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2

Atlassian JIRA | Marek Went [Atlassian] | 7 years ago
  1. 0

    On Oracle (but seen on HSQL too): 2009-07-20 16:27:18,357 ERROR [main] [UpgradeManagerImpl] org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2 org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2 at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:590) at org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:353) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337) at com.atlassian.bamboo.agent.elastic.server.ElasticImageConfigurationHibernateDao.getShippedWithBamboo(ElasticImageConfigurationHibernateDao.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy23.getShippedWithBamboo(Unknown Source) at com.atlassian.bamboo.agent.elastic.server.ElasticImageConfigurationAccessorImpl.getElasticImageConfigurationShippedWithBamboo(ElasticImageConfigurationAccessorImpl.java:48) at com.atlassian.bamboo.agent.elastic.server.ElasticImageConfigurationManagerImpl.getElasticImageConfigurationShippedWithBamboo(ElasticImageConfigurationManagerImpl.java:57) at com.atlassian.bamboo.upgrade.tasks.UpgradeTask1310UpdateEBSSnapshot.doUpgrade(UpgradeTask1310UpdateEBSSnapshot.java:60) at com.atlassian.bamboo.upgrade.UpgradeManagerImpl.runUpgradeTask(UpgradeManagerImpl.java:141) at com.atlassian.bamboo.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:97) at com.atlassian.bamboo.upgrade.UpgradeLauncher.upgradeAndStartBamboo(UpgradeLauncher.java:104) at com.atlassian.bamboo.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:37) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1239) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:466) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at com.atlassian.bamboo.server.Server.main(Server.java:60) 2009-07-20 16:27:18,358 INFO [main] [UpgradeManagerImpl] Completed upgrade task 1310 with errors.

    Atlassian JIRA | 7 years ago | Marek Went [Atlassian]
    org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2
  2. 0

    On Oracle (but seen on HSQL too): 2009-07-20 16:27:18,357 ERROR [main] [UpgradeManagerImpl] org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2 org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2 at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:590) at org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:353) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337) at com.atlassian.bamboo.agent.elastic.server.ElasticImageConfigurationHibernateDao.getShippedWithBamboo(ElasticImageConfigurationHibernateDao.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy23.getShippedWithBamboo(Unknown Source) at com.atlassian.bamboo.agent.elastic.server.ElasticImageConfigurationAccessorImpl.getElasticImageConfigurationShippedWithBamboo(ElasticImageConfigurationAccessorImpl.java:48) at com.atlassian.bamboo.agent.elastic.server.ElasticImageConfigurationManagerImpl.getElasticImageConfigurationShippedWithBamboo(ElasticImageConfigurationManagerImpl.java:57) at com.atlassian.bamboo.upgrade.tasks.UpgradeTask1310UpdateEBSSnapshot.doUpgrade(UpgradeTask1310UpdateEBSSnapshot.java:60) at com.atlassian.bamboo.upgrade.UpgradeManagerImpl.runUpgradeTask(UpgradeManagerImpl.java:141) at com.atlassian.bamboo.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:97) at com.atlassian.bamboo.upgrade.UpgradeLauncher.upgradeAndStartBamboo(UpgradeLauncher.java:104) at com.atlassian.bamboo.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:37) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1239) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:466) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at com.atlassian.bamboo.server.Server.main(Server.java:60) 2009-07-20 16:27:18,358 INFO [main] [UpgradeManagerImpl] Completed upgrade task 1310 with errors.

    Atlassian JIRA | 7 years ago | Marek Went [Atlassian]
    org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2
  3. 0

    My Project Name: AAAA My Chain Name: AAAA In one instance I tried to update an existing job to have the name AAAA. I got a validation error. I should theoretically be able to name my plan like this shouldn't I? During an attempt to reproduce the above behaviour, I tried to create a _new_ Job with the name AAAA. This submitted successfully. However now I get a whole bunch of other exceptions: {code} 2010-09-30 10:17:41,755 ERROR [1638360365@qtp-1196121930-6] [FiveOhOh] 500 Exception was thrown. org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2 at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:590) at org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:353) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337) at com.atlassian.bamboo.plan.PlanHibernateDao.getPlanByName(PlanHibernateDao.java:83) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) {code} The getPlanByName method only looks at the project name and plan name in the build table. And hence will return both the chain and the job. So we need to either a) prevent people from creating jobs with the same name as a plan (though this behaves the opposite to how we handle the keys) b) fix the getPlanByName method, and any other use cases which die because of the duplication.

    Atlassian JIRA | 6 years ago | Brydie McCoy [Atlassian]
    org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    A couple of days ago we started getting error messages back from many of our builds along the lines of the following: {noformat} System Error Details xxx - 6. yyy - Default Job 10 : Build Labeller custom build post complete action failed to run (java.lang.RuntimeException : Cannot add label '15_0_05_0917' to build results 'xxxxx-yyy-JOB1-10') Occurred: 02 Sep 2011, 6:02:53 AM java.lang.RuntimeException: Cannot add label '15_0_05_0917' to build results 'xxx-yyy-JOB1-10' at com.atlassian.bamboo.labels.LabelManagerImpl.addLabel(LabelManagerImpl.java:92) at sun.reflect.GeneratedMethodAccessor1147.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy42.addLabel(Unknown Source) at sun.reflect.GeneratedMethodAccessor1147.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.atlassian.bamboo.security.acegi.intercept.aopalliance.AuthorityOverrideMethodSecurityInterceptor.invoke(AuthorityOverrideMethodSecurityInterceptor.java:30) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy42.addLabel(Unknown Source) at com.atlassian.bamboo.plugins.labeller.BuildLabeller.labelBuildResult(BuildLabeller.java:304) at com.atlassian.bamboo.plugins.labeller.BuildLabeller.labelBuildResult(BuildLabeller.java:291) at com.atlassian.bamboo.plugins.labeller.BuildLabeller.call(BuildLabeller.java:85) at sun.reflect.GeneratedMethodAccessor712.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy362.call(Unknown Source) at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener$1.run(PostBuildCompletedEventListener.java:71) at com.atlassian.bamboo.variable.CustomVariableContextRunnerImpl.execute(CustomVariableContextRunnerImpl.java:25) at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.performAction(PostBuildCompletedEventListener.java:52) at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.handleEvent(PostBuildCompletedEventListener.java:41) at com.atlassian.event.legacy.LegacyListenerHandler$LegacyListenerInvoker.invoke(LegacyListenerHandler.java:55) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:60) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:50) at java.lang.Thread.run(Thread.java:662) Caused by: org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2 at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:590) at org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:353) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337) at com.atlassian.bamboo.labels.LabelHibernateDao.findLabelByNameAndNamespace(LabelHibernateDao.java:35) at sun.reflect.GeneratedMethodAccessor1269.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy13.findLabelByNameAndNamespace(Unknown Source) at com.atlassian.bamboo.labels.LabelManagerImpl.addLabel(LabelManagerImpl.java:392) at com.atlassian.bamboo.labels.LabelManagerImpl$1.call(LabelManagerImpl.java:80) at com.atlassian.bamboo.labels.LabelManagerImpl$1.call(LabelManagerImpl.java:75) at com.atlassian.bamboo.labels.LabelManagerImpl.withWriteLock(LabelManagerImpl.java:207) at com.atlassian.bamboo.labels.LabelManagerImpl.addLabel(LabelManagerImpl.java:74) ... 43 more {noformat} This happened for two separate and widely-used labels. It was pretty obvious from the hibernate exception that Bamboo had created duplicate labels in the DB. We ended up renaming the duplicate label and telling any builds that referenced it to use the original label. The relevant database contents prior to the fix were as follows: {noformat} mysql> select * from LABEL where NAME="14_0_36_21"; +----------+------------+-----------+---------------------+---------------------+ | LABEL_ID | NAME | NAMESPACE | CREATED_DATE | UPDATED_DATE | +----------+------------+-----------+---------------------+---------------------+ | 55410738 | 14_0_36_21 | label | 2011-09-02 05:08:56 | 2011-09-02 05:08:56 | | 55410739 | 14_0_36_21 | label | 2011-09-02 05:08:56 | 2011-09-02 05:08:56 | +----------+------------+-----------+---------------------+---------------------+ 2 rows in set (0.00 sec) mysql> select * from BUILDRESULTSUMMARY_LABEL where LABEL_ID="55410738"; +----------+----------+-----------------------+----------+------------+-----------+---------------------+---------------------+ | ID | LABEL_ID | BUILDRESULTSUMMARY_ID | BUILD_ID | PROJECT_ID | USER_NAME | CREATED_DATE | UPDATED_DATE | +----------+----------+-----------------------+----------+------------+-----------+---------------------+---------------------+ | 55345686 | 55410738 | 55054288 | 44367885 | 43155458 | NULL | 2011-09-02 05:08:56 | 2011-09-02 05:08:56 | +----------+----------+-----------------------+----------+------------+-----------+---------------------+---------------------+ 1 row in set (0.00 sec) mysql> select * from BUILDRESULTSUMMARY_LABEL where LABEL_ID="55410739"; +----------+----------+-----------------------+----------+------------+-----------+---------------------+---------------------+ | ID | LABEL_ID | BUILDRESULTSUMMARY_ID | BUILD_ID | PROJECT_ID | USER_NAME | CREATED_DATE | UPDATED_DATE | +----------+----------+-----------------------+----------+------------+-----------+---------------------+---------------------+ | 55345687 | 55410739 | 55054290 | 51183804 | 43155458 | NULL | 2011-09-02 05:08:56 | 2011-09-02 05:08:56 | +----------+----------+-----------------------+----------+------------+-----------+---------------------+---------------------+ 1 row in set (0.00 sec) mysql> select * from BUILDRESULTSUMMARY where BUILDRESULTSUMMARY_ID="55054288"; +-----------------------+---------------------+---------------------+----------------------+--------------+-------------+-----------------------+-------------------+---------------------+----------------------+----------+-------------+--------------------------------------------------------------------------+--------------+-------------+----------------+---------------------+---------------------+--------------------+--------------------+------------------+-------------------+---------------------+------------------+---------------------+----------------+------------+------------------+----------------------+-----------------------+--------------+ | BUILDRESULTSUMMARY_ID | CREATED_DATE | UPDATED_DATE | BUILD_KEY | BUILD_NUMBER | BUILD_STATE | SUCCESSFUL_TEST_COUNT | FAILED_TEST_COUNT | BUILD_DATE | BUILD_COMPLETED_DATE | DURATION | TIME_TO_FIX | TRIGGER_REASON | REVISION_KEY | DELTA_STATE | BUILD_AGENT_ID | VCS_UPDATE_TIME | QUEUE_TIME | FAILURE_TEST_COUNT | SUCCESS_TEST_COUNT | TOTAL_TEST_COUNT | BROKEN_TEST_COUNT | EXISTING_TEST_COUNT | FIXED_TEST_COUNT | TOTAL_TEST_DURATION | STAGERESULT_ID | BUILD_TYPE | LIFE_CYCLE_STATE | BUILD_CANCELLED_DATE | SKIPPED_COMMITS_COUNT | CHAIN_RESULT | +-----------------------+---------------------+---------------------+----------------------+--------------+-------------+-----------------------+-------------------+---------------------+----------------------+----------+-------------+--------------------------------------------------------------------------+--------------+-------------+----------------+---------------------+---------------------+--------------------+--------------------+------------------+-------------------+---------------------+------------------+---------------------+----------------+------------+------------------+----------------------+-----------------------+--------------+ | 55054288 | 2011-09-02 05:01:09 | 2011-09-02 05:08:55 | yyy-JOB1 | 3149 | Successful | NULL | NULL | 2011-09-02 05:02:22 | 2011-09-02 05:03:30 | 68367 | NULL | com.atlassian.bamboo.plugin.system.triggerReason:DependencyTriggerReason | 17035 | NONE | 41353237 | 2011-09-02 05:01:09 | 2011-09-02 05:01:09 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 55085118 | BUILD | Finished | NULL | 0 | 55054287 | +-----------------------+---------------------+---------------------+----------------------+--------------+-------------+-----------------------+-------------------+---------------------+----------------------+----------+-------------+--------------------------------------------------------------------------+--------------+-------------+----------------+---------------------+---------------------+--------------------+--------------------+------------------+-------------------+---------------------+------------------+---------------------+----------------+------------+------------------+----------------------+-----------------------+--------------+ 1 row in set (0.00 sec) mysql> select * from BUILDRESULTSUMMARY where BUILDRESULTSUMMARY_ID="55054290"; +-----------------------+---------------------+---------------------+--------------------------+--------------+-------------+-----------------------+-------------------+---------------------+----------------------+----------+-------------+--------------------------------------------------------------------------+--------------+-------------+----------------+---------------------+---------------------+--------------------+--------------------+------------------+-------------------+---------------------+------------------+---------------------+----------------+------------+------------------+----------------------+-----------------------+--------------+ | BUILDRESULTSUMMARY_ID | CREATED_DATE | UPDATED_DATE | BUILD_KEY | BUILD_NUMBER | BUILD_STATE | SUCCESSFUL_TEST_COUNT | FAILED_TEST_COUNT | BUILD_DATE | BUILD_COMPLETED_DATE | DURATION | TIME_TO_FIX | TRIGGER_REASON | REVISION_KEY | DELTA_STATE | BUILD_AGENT_ID | VCS_UPDATE_TIME | QUEUE_TIME | FAILURE_TEST_COUNT | SUCCESS_TEST_COUNT | TOTAL_TEST_COUNT | BROKEN_TEST_COUNT | EXISTING_TEST_COUNT | FIXED_TEST_COUNT | TOTAL_TEST_DURATION | STAGERESULT_ID | BUILD_TYPE | LIFE_CYCLE_STATE | BUILD_CANCELLED_DATE | SKIPPED_COMMITS_COUNT | CHAIN_RESULT | +-----------------------+---------------------+---------------------+--------------------------+--------------+-------------+-----------------------+-------------------+---------------------+----------------------+----------+-------------+--------------------------------------------------------------------------+--------------+-------------+----------------+---------------------+---------------------+--------------------+--------------------+------------------+-------------------+---------------------+------------------+---------------------+----------------+------------+------------------+----------------------+-----------------------+--------------+ | 55054290 | 2011-09-02 05:02:17 | 2011-09-02 05:08:55 | xxx-JOB1 | 667 | Successful | NULL | NULL | 2011-09-02 05:03:40 | 2011-09-02 05:05:58 | 137913 | NULL | com.atlassian.bamboo.plugin.system.triggerReason:DependencyTriggerReason | 17035 | NONE | 33128455 | 2011-09-02 05:02:18 | 2011-09-02 05:02:17 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 55085119 | BUILD | Finished | NULL | 0 | 55054289 | +-----------------------+---------------------+---------------------+--------------------------+--------------+-------------+-----------------------+-------------------+---------------------+----------------------+----------+-------------+--------------------------------------------------------------------------+--------------+-------------+----------------+---------------------+---------------------+--------------------+--------------------+------------------+-------------------+---------------------+------------------+---------------------+----------------+------------+------------------+----------------------+-----------------------+--------------+ 1 row in set (0.01 sec) mysql> select * from BUILD where BUILD_ID="44367885"; +----------+---------------------+---------------------+----------------------+----------+-------------+--------------+--------------------+---------------------+-------------------+-------------------------+---------------------+------------+------------------+-----------------+------------+-------------+----------+ | BUILD_ID | CREATED_DATE | UPDATED_DATE | FULL_KEY | BUILDKEY | TITLE | REVISION_KEY | FIRST_BUILD_NUMBER | LATEST_BUILD_NUMBER | NEXT_BUILD_NUMBER | SUSPENDED_FROM_BUILDING | MARKED_FOR_DELETION | PROJECT_ID | NOTIFICATION_SET | REQUIREMENT_SET | BUILD_TYPE | DESCRIPTION | STAGE_ID | +----------+---------------------+---------------------+----------------------+----------+-------------+--------------+--------------------+---------------------+-------------------+-------------------------+---------------------+------------+------------------+-----------------+------------+-------------+----------+ | 44367885 | 2011-07-03 06:10:37 | 2011-09-02 13:01:18 | yyy-JOB1 | JOB1 | Default Job | 17073 | 1 | 3157 | 3158 | | | 43155458 | 44466189 | 44400653 | JOB | | 44335117 | +----------+---------------------+---------------------+----------------------+----------+-------------+--------------+--------------------+---------------------+-------------------+-------------------------+---------------------+------------+------------------+-----------------+------------+-------------+----------+ 1 row in set (0.00 sec) mysql> select * from BUILD where BUILD_ID="51183804"; +----------+---------------------+---------------------+--------------------------+----------+-------------+--------------+--------------------+---------------------+-------------------+-------------------------+---------------------+------------+------------------+-----------------+------------+-------------+----------+ | BUILD_ID | CREATED_DATE | UPDATED_DATE | FULL_KEY | BUILDKEY | TITLE | REVISION_KEY | FIRST_BUILD_NUMBER | LATEST_BUILD_NUMBER | NEXT_BUILD_NUMBER | SUSPENDED_FROM_BUILDING | MARKED_FOR_DELETION | PROJECT_ID | NOTIFICATION_SET | REQUIREMENT_SET | BUILD_TYPE | DESCRIPTION | STAGE_ID | +----------+---------------------+---------------------+--------------------------+----------+-------------+--------------+--------------------+---------------------+-------------------+-------------------------+---------------------+------------+------------------+-----------------+------------+-------------+----------+ | 51183804 | 2011-08-05 02:01:37 | 2011-09-02 13:01:19 | xxx-JOB1 | JOB1 | Default Job | 17073 | 330 | 675 | 676 | | | 43155458 | 51249340 | 51216523 | JOB | | 51150929 | +----------+---------------------+---------------------+--------------------------+----------+-------------+--------------+--------------------+---------------------+-------------------+-------------------------+---------------------+------------+------------------+-----------------+------------+-------------+----------+ 1 row in set (0.00 sec) {noformat} We hit a very similar issue with a plan creation race condition (BAM-9231) recently. This appears to be caused by a separate race condition affecting the creation of labels.

    Atlassian JIRA | 5 years ago | David Corley
    java.lang.RuntimeException: Cannot add label '15_0_05_0917' to build results 'xxx-yyy-JOB1-10'
  6. 0

    I set up a new user in JIRA (shared user management between JIRA and Confluence). The user attempted to log in to confluence and got the following. Other users are able to log in to confluence no problem. {code} Cause org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2 at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:590) Stack Trace:[hide] org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2 at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:590) at org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:353) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337) at com.atlassian.confluence.user.persistence.dao.hibernate.HibernateConfluenceUserDao.findByUsername(HibernateConfluenceUserDao.java:82) at sun.reflect.GeneratedMethodAccessor351.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy25.findByUsername(Unknown Source) at com.atlassian.confluence.user.ConfluenceUserManager.getUser(ConfluenceUserManager.java:68) at sun.reflect.GeneratedMethodAccessor349.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy50.getUser(Unknown Source) at bucket.user.DefaultUserAccessor.getUser(DefaultUserAccessor.java:163) at com.atlassian.confluence.user.DefaultUserAccessor.getUserByName(DefaultUserAccessor.java:221) at sun.reflect.GeneratedMethodAccessor340.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy60.getUserByName(Unknown Source) at com.atlassian.confluence.security.login.DefaultLoginManager.getCurrentFailedLoginCount(DefaultLoginManager.java:266) at com.atlassian.confluence.security.login.DefaultLoginManager.requiresElevatedSecurityCheck(DefaultLoginManager.java:206) at sun.reflect.GeneratedMethodAccessor1355.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy65.requiresElevatedSecurityCheck(Unknown Source) at com.atlassian.confluence.security.seraph.ConfluenceElevatedSecurityGuard.performElevatedSecurityCheck(ConfluenceElevatedSecurityGuard.java:63) at com.atlassian.seraph.filter.PasswordBasedLoginFilter.runAuthentication(PasswordBasedLoginFilter.java:117) at com.atlassian.seraph.filter.PasswordBasedLoginFilter.login(PasswordBasedLoginFilter.java:78) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:110) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:70) at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:61) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:78) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:70) at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:78) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:72) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170) at com.atlassian.spring.filter.FlushingSpringSessionInViewFilter.doFilterInternal(FlushingSpringSessionInViewFilter.java:29) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.confluence.util.ConfluenceErrorFilter.doFilter(ConfluenceErrorFilter.java:29) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.confluence.core.datetime.RequestTimeThreadLocalFilter.doFilter(RequestTimeThreadLocalFilter.java:43) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:33) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:70) at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:33) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:78) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:70) at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:121) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:92) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:78) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:70) at com.atlassian.confluence.web.filter.ConfluenceTimingFilter.doFilter(ConfluenceTimingFilter.java:79) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:78) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:70) at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:78) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:70) at com.atlassian.confluence.extra.webdav.servlet.filter.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:427) at com.atlassian.confluence.extra.webdav.servlet.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:34) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:78) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter.doFilter(RequestParamValidationFilter.java:58) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.confluence.web.filter.TranslationModeFilter.doFilter(TranslationModeFilter.java:44) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.confluence.plugin.servlet.filter.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:73) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.confluence.web.filter.LanguageExtractionFilter.doFilter(LanguageExtractionFilter.java:53) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:32) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.confluence.web.filter.ResponseOutputStreamFilter.doFilter(ResponseOutputStreamFilter.java:25) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:50) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Referer URL https://tools.4rc.io:8091/login.action;jsessionid=DB03544C9DE542C69D0615DA53E4CA83?os_destination=%2Findex.action {code}

    Atlassian JIRA | 2 years ago | Reuben Firmin
    org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.springframework.dao.IncorrectResultSizeDataAccessException

      query did not return a unique result: 2

      at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException()
    2. Hibernate
      HibernateTemplate.execute
      1. org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:590)
      2. org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:353)
      3. org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375)
      4. org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337)
      4 frames
    3. com.atlassian.bamboo
      ElasticImageConfigurationHibernateDao.getShippedWithBamboo
      1. com.atlassian.bamboo.agent.elastic.server.ElasticImageConfigurationHibernateDao.getShippedWithBamboo(ElasticImageConfigurationHibernateDao.java:128)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:585)
      4 frames
    5. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      3 frames
    6. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      1 frame
    7. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    8. Unknown
      $Proxy23.getShippedWithBamboo
      1. $Proxy23.getShippedWithBamboo(Unknown Source)
      1 frame
    9. com.atlassian.bamboo
      UpgradeLauncher.contextInitialized
      1. com.atlassian.bamboo.agent.elastic.server.ElasticImageConfigurationAccessorImpl.getElasticImageConfigurationShippedWithBamboo(ElasticImageConfigurationAccessorImpl.java:48)
      2. com.atlassian.bamboo.agent.elastic.server.ElasticImageConfigurationManagerImpl.getElasticImageConfigurationShippedWithBamboo(ElasticImageConfigurationManagerImpl.java:57)
      3. com.atlassian.bamboo.upgrade.tasks.UpgradeTask1310UpdateEBSSnapshot.doUpgrade(UpgradeTask1310UpdateEBSSnapshot.java:60)
      4. com.atlassian.bamboo.upgrade.UpgradeManagerImpl.runUpgradeTask(UpgradeManagerImpl.java:141)
      5. com.atlassian.bamboo.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:97)
      6. com.atlassian.bamboo.upgrade.UpgradeLauncher.upgradeAndStartBamboo(UpgradeLauncher.java:104)
      7. com.atlassian.bamboo.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:37)
      7 frames
    10. Jetty Server
      WebAppContext.doStart
      1. org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
      2. org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
      3. org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1239)
      4. org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
      5. org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:466)
      5 frames
    11. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      1 frame
    12. Jetty Server
      Server.doStart
      1. org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
      2. org.mortbay.jetty.Server.doStart(Server.java:222)
      2 frames
    13. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      1 frame
    14. com.atlassian.bamboo
      Server.main
      1. com.atlassian.bamboo.server.Server.main(Server.java:60)
      1 frame