ORA-01031 Insufficient Privileges Error when using JIRA Agile
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
Symptoms
When moving or cloning an issue, JIRA Agile throws an
ActiveObjectSqlException.
During a JIRA Agile upgrade, a
java.sql.SQLSyntaxErrorException
is thrown.Any operation within JIRA can throw a
.java.sql.SQLSyntaxErrorException: ORA-01031: insufficient privileges
The following appears in the atlassian-jira.log
:
1
2
3
4
5
6
7
8
9
10
11
net.java.ao.sql.ActiveObjectSqlException: java.sql.SQLException: ORA-01031: insufficient privileges
at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.migrate(EntityManagedActiveObjects.java:46)
at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory.create(AbstractActiveObjectsFactory.java:52)
at com.atlassian.activeobjects.internal.DelegatingActiveObjectsFactory.create(DelegatingActiveObjectsFactory.java:39)
at com.atlassian.activeobjects.internal.RegistryBasedActiveObjectsProvider.get(RegistryBasedActiveObjectsProvider.java:29)
at com.atlassian.activeobjects.osgi.DelegatingActiveObjects.getDelegate(DelegatingActiveObjects.java:126)
at com.atlassian.activeobjects.osgi.DelegatingActiveObjects.executeInTransaction(DelegatingActiveObjects.java:111)
at sun.reflect.GeneratedMethodAccessor8918.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:307)
OR:
1
2
3
4
5
6
7
8
9
2012-10-10 18:05:32,421 main INFO [com.atlassian.greenhopper.upgrade] Starting upgrade task (buildNumber=12) : Migrate labs ranking data to multi-rank-field implementation
2012-10-10 18:05:33,703 main ERROR [net.java.ao.sql] Exception executing SQL update <CREATE SEQUENCE "AO_60DB71_ISSUERANKING_ID_SEQ" INCREMENT BY 1 START WITH 1 NOMAXVALUE MINVALUE 1>
java.sql.SQLSyntaxErrorException: ORA-01031: insufficient privileges
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
Cause
This error indicates a failed upgrade (in this case, JIRA Agile), and has to do with the Active Objects component of JIRA. It is not directly related to JIRA Agile (except that JIRA Agile uses Active Objects). The Active Objects plugin requires the CREATE SEQUENCES and CREATE TRIGGER permissions for the Oracle user, and when this is not available, this error will occur.
Resolution
Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
The following is the procedure when an upgrade from JIRA 4.4.x breaks JIRA Agile/JIRA:
Stop JIRA.
Immediately roll back your JIRA upgrade Rolling Back a JIRA Upgrade
Restore your JIRA 4.4.x database.
Drop all AO_60DB71_ tables.
Make sure that the database user has CREATE SEQUENCES and CREATE TRIGGER permissions, as per Connecting JIRA to Oracle.
Upgrade JIRA again
ℹ️ Once restarted, JIRA should recreate the appropriate tables correctly including all triggers and sequences that were not created the first time around and this issue should be resolved.
Was this helpful?