Unable to install add ons in UPM due to duplicate key value in AO_6384AB_FEATURE_METADATA table

Still need help?

The Atlassian Community is here for you.

Ask the community

For Atlassian eyes only

This article is Not Validated and cannot be shared with customers.

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

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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

When installing add ons in UPM the operation will fails with a warning to check Confluence logs for more information. Once you check the atlassian-confluence.log the following will appear:

2015-05-08 18:09:48,690 ERROR [localhost-startStop-1] [atlassian.event.internal.AsynchronousAbleEventDispatcher] run There was an exception thrown trying to dispatch event [com.atlassian.config.lifecycle.events.ApplicationStartedEvent@330fd450] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.atlassian.confluence.plugins.featurediscovery.PluginModuleEventListener.onApplicationStart(com.atlassian.config.lifecycle.events.ApplicationStartedEvent), listener=com.atlassian.confluence.plugins.featurediscovery.PluginModuleEventListener@67996024}]
java.lang.RuntimeException: There was a SQL exception thrown by the Active Objects library:
Database:
	- name:PostgreSQL
	- version:9.1.15
	- minor version:1
	- major version:9
Driver:
	- name:PostgreSQL Native Driver
	- version:PostgreSQL 9.2 JDBC4 (build 1002)

org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "AO_6384AB_FEATURE_METADATA_AO_pkey"
  Detail: Key ("ID")=(16) already exists.
	at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:48)
	at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:107)
	at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:160)
	at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:79)
	at com.atlassian.confluence.event.TimingEventPublisher.publish(TimingEventPublisher.java:73)
	at com.atlassian.config.lifecycle.DefaultLifecycleManager.startUp(DefaultLifecycleManager.java:43)
	at com.atlassian.config.lifecycle.LifecycleServletContextListener.contextInitialized(LifecycleServletContextListener.java:17)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:

Cause

For some unknown reason one of the Confluence internal tasks is trying to re add a existing entry on AO_6384AB_FEATURE_METADATA  table, as we have a constraint in place that action will not be completed and hence UPM will fail to install the add on.

Resolution

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

  1. Shutdown Confluence.
  2. Run the below Query against Confluence database:

    delete from AO_6384AB_FEATURE_METADATA_AO;
  3. Start Confluence.

During the confluence start up the data will be rebuild on that table and you will be able to install add ons again without problems.

Last modified on Jan 2, 2025

Was this helpful?

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