Cannot insert the value NULL into column 'USER', column does not allow nulls
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
The following appears in the atlassian-jira.log during database migration to MS SQL server.
1
2
3
4
5
6
7
8
9
10
java.sql.SQLException: Cannot insert the value NULL into column 'USER', table 'jiradb.JiraDB.AO_60DB71_AUDITENTRY'; column does not allow nulls. UPDATE fails.
at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.migrate(EntityManagedActiveObjects.java:48)
at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:74)
at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:68)
...
Caused by: java.sql.SQLException: Cannot insert the value NULL into column 'USER', table 'jiradb.JiraDB.AO_60DB71_AUDITENTRY'; column does not allow nulls. UPDATE fails.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)
...
Diagnosis
JIRA instance has an Agile plugin running on 6.3.13.1.
1 2 3 4 5
JIRA Agile : com.pyxis.greenhopper.jira Version : 6.3.13.1 Status : enabled Vendor : Atlassian Description : Agile Project Management for JIRA (Build: #a73d75f118867c66)
Cause
The above error was thrown because Agile version 6.3.13.1 does not allow null value for the user column, whereby it does in 6.4 version.
Resolution
To rectify this, you can input a dummy username for every null value in USER column under AO_60DB71_AUDITENTRY table.
1
select * from AO_60DB71_AUDITENTRY where USER is null;
Then insert a dummy username (preferably your username) then restart JIRA Agile plugin.
Was this helpful?