Migrating Confluence to another server throws HTTP Status 500 - java.lang.NullPointerException
Symptoms
After migrating Confluence to a new server, the following error message appears in the Confluence UI:
HTTP Status 500 - java.lang.NullPointerException
type Exception report
message java.lang.NullPointerException
description The server encountered an internal error that prevented it from fulfilling this request.
exception
com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException
com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
com.atlassian.confluence.setup.ConfluenceEncodingFilter.getGlobalSettings(ConfluenceEncodingFilter.java:47)
com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncodingInternal(ConfluenceEncodingFilter.java:37)
com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncoding(ConfluenceEncodingFilter.java:29)
com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:38)
com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44)
com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:65)
com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:50)
com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
root cause
java.lang.NullPointerException
com.atlassian.spring.container.ContainerManager.getComponent(ContainerManager.java:33)
com.atlassian.confluence.util.LazyComponentReference$Accessor.get(LazyComponentReference.java:46)
com.atlassian.util.concurrent.Lazy$Strong.create(Lazy.java:85)
com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:321)
com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)
com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
com.atlassian.confluence.setup.ConfluenceEncodingFilter.getGlobalSettings(ConfluenceEncodingFilter.java:47)
com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncodingInternal(ConfluenceEncodingFilter.java:37)
com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncoding(ConfluenceEncodingFilter.java:29)
com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:38)
com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44)
com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:65)
com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:50)
com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.47 logs.
The following appears in atlassian-confluence.log
:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luceneConnection' defined in class path resource [indexingSubsystemContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.bonnie.LuceneConnection]: Constructor threw exception; nested exception is com.atlassian.bonnie.LuceneException: java.io.EOFException: read past EOF: SimpleFSIndexInput(path="C:\Program Files\Atlassian\Application Data\Confluence\index\segments_8wc")
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
...
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.bonnie.LuceneConnection]: Constructor threw exception; nested exception is com.atlassian.bonnie.LuceneException: java.io.EOFException: read past EOF: SimpleFSIndexInput(path="C:\Program Files\Atlassian\Application Data\Confluence\index\segments_8wc")
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
...
Caused by: com.atlassian.bonnie.LuceneException: java.io.EOFException: read past EOF: SimpleFSIndexInput(path="C:\Program Files\Atlassian\Application Data\Confluence\index\segments_8wc")
at com.atlassian.bonnie.LuceneConnection.<init>(LuceneConnection.java:112)
at com.atlassian.bonnie.LuceneConnection.<init>(LuceneConnection.java:130)
...
Caused by: java.io.EOFException: read past EOF: SimpleFSIndexInput(path="C:\Program Files\Atlassian\Application Data\Confluence\index\segments_8wc")
at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:266)
at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:51)
at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:41)
at org.apache.lucene.store.DataInput.readInt(DataInput.java:84)
Cause
The Confluence index is corrupt.
Resolution
Please proceed to Rebuild the Content Indices from Scratch.
If your problem persists after rebuilding the content indices from scratch, please create a Support Ticket for further investigation.
Last modified on Nov 15, 2018
Powered by Confluence and Scroll Viewport.