Workbox doesn't load notifications and tasks and sometimes throw an exception

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

When you click on Workbox notifications  on the top right Confluence header it might throw an exception with no stack trace, and sometimes the Workbox will load indefinitely.

The following appears in the atlassian-confluence.log:

ERROR [http-8510-1] [mywork.host.rest.ExceptionLogger] toResponse Exception thrown from resource
 -- referer: http://skylar:8510/plugins/servlet/notifications-miniview | url: /rest/mywork/latest/configuration | userName: admin
java.lang.RuntimeException: org.codehaus.jackson.JsonParseException: Unexpected end-of-input: was expecting closing quote for a string value
 at [Source: java.io.StringReader@50362fee; line: 1, column: 17923]
	at com.atlassian.mywork.host.dao.ao.AORegistrationDao.getAll(AORegistrationDao.java:64)
	...

Diagnosis

If you check on the exception in the stack trace, it should be coming from AORegistrationDao.java and it should be asking for some data from the database.

public List<Registration> getAll()
    {
        AORegistration[] aoRegistrations = ao.find(AORegistration.class);
        List<Registration> registrations = Lists.newArrayListWithExpectedSize(aoRegistrations.length);
        for (AORegistration aoRegistration : aoRegistrations)
        {
            try
            {
                registrations.add(mapper.readValue(aoRegistration.getData(), Registration.class));
            }
            catch (IOException e)
            {
                throw new RuntimeException(e);
            }
        }
        return registrations;
    }

Check the AO_9412A1_AOREGISTRATION table in the Confluence database, specifically in the DATA field. There should be a corrupted json in there. You can check if a json is corrupted using a json validator (search for a json validator online, there are multiple free ones).

Cause

The data inside DATA field in AO_9412A1_AOREGISTRATION got corrupted. Sometimes this happens during a migration or upgrade.

Workaround

Copy over the consistent data (e.g. pre-upgrade state) from the AO_9412A1_AOREGISTRATION table, and replace the data inside the upgraded Confluence database. Restart Confluence. It might not be necessary to copy all the data inside the DATA table. Only the inconsistent data that needs to be replaced. Please backup the database anytime it is being modified.

Last modified on Jan 30, 2017

Was this helpful?

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