NetworkAndSiteNotificationTypesUpgradeTask Fails when Upgrading to 3.3.0

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When upgrading to Confluence 3.3.0, you will encounter two upgrade failures if you are using Oracle, SQL Server, or MySQL.

First Error

The following error is reported in the logs at the time of upgrading to Confluence v 3.3.0 on Oracle 10.x:

ERROR [main] [confluence.upgrade.upgradetask.NetworkAndSiteNotificationTypesUpgradeTask] doUpgrade Error while upgrading notifications table
java.sql.SQLSyntaxErrorException: ORA-00904: "FALSE": invalid identifier

Upgrading to Confluence v 3.3.0 on SQL Server reports a different error:

ERROR [Thread-1] [confluence.upgrade.upgradetask.NetworkAndSiteNotificationTypesUpgradeTask] doUpgrade Error while upgrading notifications table
java.sql.SQLException: Invalid column name 'false'.

In both the cases, the upgrade completes successfully and there are no immediate side-effects related to the these errors.

When creating or updating pages post upgrade, or when attaching files, the following exceptions are experienced:

2010-07-09 10:50:55,906 ERROR [http-80-9] [atlassian.confluence.event.ConfluenceEventManager]
   publishEvent An exception was encountered while processing the event:
   com.atlassian.confluence.event.events.content.page.PageUpdateEvent
   [source=com.atlassian.confluence.pages.DefaultPageManager@1490e5f]
   -- referer: http://wiki/pages/editpage.action?pageId=10092547 |
   url: /pages/doeditpage.action | userName: elias | action: doeditpage | page: 10092547
   org.springframework.orm.hibernate.HibernateSystemException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of com.atlassian.confluence.mail.notification.Notification.setDigest;
Second Error

The other possible error is:

ERROR [http-8080-1] [sf.hibernate.util.JDBCExceptionReporter] logExceptions ORA-00904: "NOTIFICATI0_"."CONTENTTYPE": invalid identifier

Cause

First Error Message
Oracle and SQL Server do not have a boolean column types, and instead use number(1,0). This causes the following query to fail during the update:

update NOTIFICATIONS set NETWORK = false where NETWORK is null;

With numeric column types

update NOTIFICATIONS set NETWORK = 0 where NETWORK is null;

for Oracle and for other DBs as well such as DB2 and SQLServer.

Second Error Message
Some columns were not created during the upgrade.

(info) You may also see only the first error instead of both.

Workaround

First Error Message
As a workaround, please run these queries on your database, to help fix the NOTIFICATIONS table:

update NOTIFICATIONS set NETWORK = 0 where NETWORK is null;

and

update NOTIFICATIONS set DIGEST = 1 where  SPACEID is null and PAGEID is null and DIGEST is null;

and

update NOTIFICATIONS set DIGEST = 0 where  DIGEST is null;

Second Error Message

  1. Confirm the DIGEST and NETWORK columns do not exist.
  2. Create them:

    SQL Server
    ALTER TABLE NOTIFICATIONS
    ADD ( 	DIGEST 	tinyint,
      	NETWORK	tinyint,
            CONTENTTYPE varchar(255))
    
    Oracle
    ALTER TABLE NOTIFICATIONS
    ADD ( 	DIGEST 	number(1),
      	NETWORK	number(1),
            CONTENTTYPE varchar2(255))
    
    MySQL
    ALTER TABLE NOTIFICATIONS
    ADD ( 	DIGEST 	bit(1),
      	NETWORK	bit(1),
            CONTENTTYPE varchar(255));
    

You also need to update the buildNumber in the confluence.cfg.xml file to 1905 (if it not already higher), which can be found in your confluence home or data directory. Failure to do so may cause errors in future upgrades.

<confluence-configuration>
...
  <buildNumber>1905</buildNumber>

Resolution

Upgrade to 3.3.1 or later. See the relevant bug report at CONF-20318.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Last modified on Mar 30, 2016

Was this helpful?

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