Search results are missing content

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

When searching Confluence, content is missing. For example:

  • Existing Pages or Blog Posts are not displayed in search results.

  • The Recently Updated Macro has missing results

  • The Blog Post Macro is not complete

In the catalina.out file (or standard out) you see errors such as:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Exception in thread "Indexer: 2" org.springframework.orm.hibernate.HibernateSystemException: Null value was assigned to a property of primitive type setter of com.atlassian.confluence.core.AbstractVersionedEntityObject.version; nested exception is net.sf.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.atlassian.confluence.core.AbstractVersionedEntityObject.version Caused by: net.sf.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.atlassian.confluence.core.AbstractVersionedEntityObject.version at net.sf.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:57) at net.sf.hibernate.persister.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:229) at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2224) at net.sf.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:319) at net.sf.hibernate.loader.Loader.doQuery(Loader.java:309) at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138) at net.sf.hibernate.loader.Loader.doList(Loader.java:1063) at net.sf.hibernate.loader.Loader.list(Loader.java:1054) at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1554) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1531) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1523) at sun.reflect.GeneratedMethodAccessor1314.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.orm.hibernate.HibernateTemplate$CloseSuppressingInvocationHandler.invoke(HibernateTemplate.java:1123) at $Proxy79.find(Unknown Source)

or

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Exception in thread "Indexer: 3" org.springframework.orm.hibernate.HibernateObjectRetrievalFailureException: No row with the given identifier exists: 32769, of class: com.atlassian.confluence.core.ContentEntityObject; nested exception is net.sf.hibernate.UnresolvableObjectException: No row with the given identifier exists: 32769, of class: com.atlassian.confluence.core.ContentEntityObject Caused by: net.sf.hibernate.UnresolvableObjectException: No row with the given identifier exists: 32769, of class: com.atlassian.confluence.core.ContentEntityObject at net.sf.hibernate.UnresolvableObjectException.throwIfNull(UnresolvableObjectException.java:38) at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1964) at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:69) at net.sf.hibernate.type.EntityType.resolveIdentifier(EntityType.java:208) at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2219) at net.sf.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:319) at net.sf.hibernate.loader.Loader.doQuery(Loader.java:309) at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138) at net.sf.hibernate.loader.Loader.doList(Loader.java:1063) at net.sf.hibernate.loader.Loader.list(Loader.java:1054) at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1554) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1531) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1523) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at org.springframework.orm.hibernate.HibernateTemplate$CloseSuppressingInvocationHandler.invoke(HibernateTemplate.java:1123) at $Proxy79.find(Unknown Source)

Cause

These issues are typically caused by certain rows in the database being corrupt.

Resolution

Run the following queries against your database:

Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

1 2 3 4 5 6 DELETE FROM ATTACHMENTDATA where ATTACHMENTID in (SELECT ATTACHMENTID from ATTACHMENTS where PAGEID not in (select CONTENTID from CONTENT)); DELETE FROM ATTACHMENTS where PAGEID not in (select CONTENTID from CONTENT); DELETE FROM LINKS where CONTENTID not in (select CONTENTID from CONTENT); DELETE FROM BODYCONTENT where CONTENTID not in (select CONTENTID from CONTENT); DELETE FROM CONFANCESTORS where DESCENDENTID not in (select CONTENTID from CONTENT); DELETE FROM CONTENT where VERSION is null;
Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.