Search results are missing content
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:
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
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 backup your data before performing any modifications to the database.
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;
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.