Error when attempting to upgrade Refined for Confluence | Sites & Themes plug-in
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
Summary
Upgrading Refined for Confluence | Sites & Themes plug-in fails, preventing plug-in operation and sometimes resulting in Confluence startup issues. Plug-in failures and startup issues will be followed by handleUpdateError Exception executing SQL update <ALTER TABLE AO_A3F2EF_LAYOUT_VERSION ALTER COLUMN VERSION_NUMBER INTEGER NOT NULL>
error.
Environment
MS SQL DB
Diagnosis
The following error is thrown in the application logs
INFO [UpmAsynchronousTaskManager:thread-1] [atlassian.plugin.manager.DefaultPluginManager] updatePlugin Updating plugin 'com.refinedwiki.confluence.plugins.theme.original' from version '6.1.16' to version '6.1.17'
INFO [UpmAsynchronousTaskManager:thread-1] [atlassian.plugin.manager.DefaultPluginManager] broadcastPluginDisabling Disabling com.refinedwiki.confluence.plugins.theme.original
ERROR [active-objects-init-system tenant-0] [net.java.ao.sql] handleUpdateError Exception executing SQL update <ALTER TABLE AO_A3F2EF_LAYOUT_VERSION ALTER COLUMN VERSION_NUMBER INTEGER NOT NULL>
com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert the value NULL into column 'VERSION_NUMBER', table 'GKN_Confluence_wiki_test.dbo.AO_A3F2EF_LAYOUT_VERSION'; column does not allow nulls. UPDATE fails.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:260)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1547)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:857)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:757)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7342)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2688)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:224)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:204)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(SQLServerStatement.java:685)
at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:410)
at net.java.ao.DatabaseProvider.executeUpdate(DatabaseProvider.java:2246)
at net.java.ao.DatabaseProvider.executeUpdateForAction(DatabaseProvider.java:2302)
at net.java.ao.DatabaseProvider.executeUpdatesForActions(DatabaseProvider.java:2274)
at net.java.ao.schema.SchemaGenerator.migrate(SchemaGenerator.java:91)
at net.java.ao.EntityManager.migrate(EntityManager.java:128)
Cause
The upgrade process is attempting to insert NULL value into 'VERSION_NUMBER' column in plug-ins 'GKN_Confluence_wiki_test.dbo.AO_A3F2EF_LAYOUT_VERSION' table which does not allow such values. This action breaks plug-in on systems running MS SQL DB.
Solution
Uninstalling and then re-installing plug-in will resolve the problem.
No data will be lost as a result of plug-in re-install as it's stored on DB.