Jira server throws 500 page with column already exists error

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.

Problem

Accessing JIRA issues, project, and/or the Lexorank Management page results in 500 errors.

The following appears in the atlassian-jira.log

  • Error for MSQL:
2017-01-12 10:20:48,498 http-nio-8000-exec-22 ERROR anonymous 620x462x1 4ffbba 10.12.14.61 /browse/TEST [o.a.c.c.C.[.[localhost].[/].[default]] Servlet.service() for servlet default threw exception
java.lang.reflect.UndeclaredThrowableException
        at com.sun.proxy.$Proxy2946.getAll(Unknown Source)
        at com.atlassian.greenhopper.service.rapid.ProjectRapidViewServiceImpl.findRapidViewsByProject(ProjectRapidViewServiceImpl.java:42)
        at com.atlassian.greenhopper.web.sidebar.ProjectBoardsHelper.getProjectBoards(ProjectBoardsHelper.java:53)
        at com.atlassian.greenhopper.web.sidebar.BoardScopeFilterContextProviderImpl.getContext(BoardScopeFilterContextProviderImpl.java:47)
        at com.atlassian.jira.projects.context.ProjectContextPopulatorImpl.populateWithProject(ProjectContextPopulatorImpl.java:82)
        at com.atlassian.jira.projects.sidebar.navigation.SidebarNavigationService.getNavigationItemById(SidebarNavigationService.java:49)
        at com.atlassian.jira.projects.sidebar.lastvisited.LastVisitedNavigationItemHelper.getNavigationItemById(LastVisitedNavigationItemHelper.java:58)
        at com.atlassian.jira.projects.sidebar.lastvisited.LastVisitedItemInProjectService.lambda$getLastVisitedItem$0(LastVisitedItemInProjectService.java:81)
        at java.util.Optional.flatMap(Optional.java:241)
		...
Caused by: java.sql.SQLException: Column names in each table must be unique. Column name 'BUCKET' in table 'dbo.AO_60DB71_LEXORANK' is specified more than once.
        at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
        at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
        at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
        at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
        at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
        at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:809)
        at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1288)
        at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1241)
        at org.apache.commons.dbcp2.DelegatingStatement.executeUpdate(DelegatingStatement.java:234)
        at org.apache.commons.dbcp2.DelegatingStatement.executeUpdate(DelegatingStatement.java:234)
        at net.java.ao.DatabaseProvider.executeUpdate(DatabaseProvider.java:2238)
        at net.java.ao.DatabaseProvider.executeUpdateForAction(DatabaseProvider.java:2294)
        at net.java.ao.DatabaseProvider.executeUpdatesForActions(DatabaseProvider.java:2266)
        at com.atlassian.greenhopper.upgrade.AOUpgradeTask001.addColumn(AOUpgradeTask001.java:83)
        ... 51 more
  • Error for PosgreSQL
Caused by: org.postgresql.util.PSQLException: ERROR: column "BUCKET" of relation "AO_60DB71_LEXORANK" already exists
  • Error for Oracle
2018-04-19 03:52:49,424 http-nio-8090-exec-12 ERROR admin 232x124x1 bzw6pq 10.1.1.1 /browse/DEV-1 [c.a.j.web.component.ModuleWebComponentImpl] An exception occured while rendering the web panel: com.pyxis.greenhopper.jira:greenhopper-agile-issue-web-panel (null)
java.lang.reflect.UndeclaredThrowableException
	at com.sun.proxy.$Proxy3013.getSprint(Unknown Source)
	at com.atlassian.greenhopper.customfield.sprint.SprintCFType.convertDbValueToType(SprintCFType.java:460)
...
Caused by: com.atlassian.activeobjects.internal.ActiveObjectsInitException: bundle [com.pyxis.greenhopper.jira]
	at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:86)
	at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	... 1 more
Caused by: java.lang.RuntimeException: java.sql.SQLException: ORA-01430: column being added already exists in table

	at com.atlassian.greenhopper.upgrade.AOUpgradeTask001.addColumn(AOUpgradeTask001.java:88)
	at com.atlassian.greenhopper.upgrade.AOUpgradeTask001.upgrade(AOUpgradeTask001.java:66)
	at com.atlassian.activeobjects.internal.ActiveObjectUpgradeManagerImpl$1.doInTransaction(ActiveObjectUpgradeManagerImpl.java:68)
	at com.atlassian.activeobjects.internal.ActiveObjectUpgradeManagerImpl$1.doInTransaction(ActiveObjectUpgradeManagerImpl.java:64)
	at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:34)
	... 2 filtered

	... 6 more
Caused by: java.sql.SQLException: ORA-01430: column being added already exists in table

	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494)
	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446)
	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1054)
	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:623)
	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612)
	at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:213)
	at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:37)
	at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:896)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1119)
	at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1661)
	at oracle.jdbc.driver.OracleStatement.executeLargeUpdate(OracleStatement.java:1626)
	at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1613)
	at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:282)
	at org.apache.commons.dbcp2.DelegatingStatement.executeUpdate(DelegatingStatement.java:234)
	at org.apache.commons.dbcp2.DelegatingStatement.executeUpdate(DelegatingStatement.java:234)
	at net.java.ao.DatabaseProvider.executeUpdate(DatabaseProvider.java:2238)
	at net.java.ao.DatabaseProvider.executeUpdateForAction(DatabaseProvider.java:2294)
	at net.java.ao.DatabaseProvider.executeUpdatesForActions(DatabaseProvider.java:2266)
	at com.atlassian.greenhopper.upgrade.AOUpgradeTask001.addColumn(AOUpgradeTask001.java:83)
	... 52 more
Caused by: Error : 1430, Position : 38, Sql = ALTER TABLE "AO_60DB71_LEXORANK" ADD ("BUCKET" NUMBER(11) DEFAULT 0), OriginalSql = ALTER TABLE "AO_60DB71_LEXORANK" ADD ("BUCKET" NUMBER(11) DEFAULT 0), Error Msg = ORA-01430: column being added already exists in table

	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498)
	... 71 more


Diagnosis

Environment

  • JIRA Software 7.2.x (or later)

Diagnostic Steps

  • A JIRA restore/upgrade was recently performed

Cause

AO framework can't detect that BUCKET column is already present, so JIRA Agile is attempting to run steps to create the "AO_60DB71_LEXORANK.BUCKET" column when it already exists.

Workaround

Drop the "BUCKET" column, allowing JIRA Agile to complete the process.

  1. Shutdown JIRA
  2. Run the following SQL queries:

    SQL Server
    ALTER TABLE dbo.AO_60DB71_LEXORANK DROP CONSTRAINT df_AO_60DB71_LEXORANK_BUCKET;
    DROP INDEX AO_60DB71_LEXORANK.index_ao_60db71_lex1694305086;  -- only needed for 7.3.0. Index name may vary, please double check index names
    ALTER TABLE AO_60DB71_LEXORANK DROP COLUMN BUCKET;
    MySQL
    ALTER TABLE AO_60DB71_LEXORANK drop column BUCKET;
    DROP INDEX index_ao_60db71_lex1694305086 on AO_60DB71_LEXORANK; -- Index name may vary, please double check index names
    PostgreSQL or Oracle
     ALTER TABLE "AO_60DB71_LEXORANK" DROP COLUMN "BUCKET";
  3. Restart JIRA



Last modified on Sep 25, 2019

Was this helpful?

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