Null value was assigned to a property of primitive type setter of com.atlassian.confluence.mail.notification.Notification.digest
Platform Notice: Server, Data Center, and Cloud By Request - This article was written for the Atlassian server and data center platforms but may also be useful for Atlassian Cloud customers. If completing instructions in this article would help you, please contact Atlassian Support and mention it.
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
- While creating an XML backup from the Confluence UI an error gets thrown in the browser.
- XML Export doesn't get created.
- In addition to the errors in the browser the following appears in the
atlassian-confluence.log
:
2014-10-31 17:05:09,004 ERROR [http-bio-8090-exec-5] [confluence.importexport.impl.AbstractXmlExporter] backupEntities Couldn't backup database data.
-- referer: http://localhost:8090/authenticate.action?destination=/admin/dobackup.action?atl_token=f8aca7ffc027d4ca69611748c410ac8e8a81df99&backup=Back+Up | url: /admin/dobackup.action | userName: admin | action: dobackup
java.lang.RuntimeException: net.sf.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.atlassian.confluence.mail.notification.Notification.digest
at com.atlassian.confluence.importexport.impl.HibernateObjectHandleTranslator.handleToObject(HibernateObjectHandleTranslator.java:64)
at com.atlassian.hibernate.extras.XMLDatabinder.writeObjects(XMLDatabinder.java:190)
at com.atlassian.hibernate.extras.XMLDatabinder.toGenericXML(XMLDatabinder.java:169)
Diagnosis
Locate the null entries:
select * from NOTIFICATIONS where CONTENTID not in (select CONTENTID from CONTENT); select * from NOTIFICATIONS where DIGEST is null; select * from NOTIFICATIONS where CONTENTTYPE is null and SPACEID is null;
Cause
Null entries in the database are preventing the export from happening.
Resolution
If the first sql query has any rows returned, run the following:
delete from NOTIFICATIONS where CONTENTID not in (select CONTENTID from CONTENT);
If the second sql query has any rows returned, run the following:
delete from NOTIFICATIONS where DIGEST is null;
If the third sql query has any rows returned, run the following:
delete from NOTIFICATIONS where CONTENTTYPE is null and SPACEID is null;
Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.