org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.confluence.extra.officeconnector.index.word.WordTextExtractor': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.atlassian.confluence.extra.officeconnector.index.word.WordTextExtractor

Atlassian JIRA | Olli Nevalainen [OOO until 6 Oct] | 11 months ago
  1. 0

    {{AbstractExtractorModuleDescriptor#createModule}} is meant to catch any {{Errors}} that happen during plugin module initialisation, but module initialisation code can in some situations wrap these problems inside {{org.springframework.beans.factory.BeanCreationException}} which causes extractor initialisation errors to bubble up to {{AddDocumentIndexTask#perform}} causing the searchable to not get indexed even if it didn't need the extractor. {noformat} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.confluence.extra.officeconnector.index.word.WordTextExtractor': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.atlassian.confluence.extra.officeconnector.index.word.WordTextExtractor at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:342) at sun.reflect.GeneratedMethodAccessor160.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugin.osgi.spring.DefaultSpringContainerAccessor.createBean(DefaultSpringContainerAccessor.java:97) at com.atlassian.confluence.plugin.ConfluencePluginUtils.instantiatePluginModule(ConfluencePluginUtils.java:162) at com.atlassian.confluence.plugin.descriptor.AbstractExtractorModuleDescriptor.createModule(AbstractExtractorModuleDescriptor.java:111) at com.atlassian.confluence.plugin.descriptor.ExtractorModuleDescriptor.createModule(ExtractorModuleDescriptor.java:57) at com.atlassian.confluence.plugin.descriptor.ExtractorModuleDescriptor.createModule(ExtractorModuleDescriptor.java:12) at com.atlassian.confluence.plugin.module.PluginModuleHolder.createModule(PluginModuleHolder.java:78) at com.atlassian.confluence.plugin.module.PluginModuleHolder.getModule(PluginModuleHolder.java:104) at com.atlassian.confluence.plugin.descriptor.AbstractExtractorModuleDescriptor.getModule(AbstractExtractorModuleDescriptor.java:70) at com.atlassian.confluence.plugin.descriptor.AbstractExtractorModuleDescriptor.getModule(AbstractExtractorModuleDescriptor.java:26) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:352) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at com.atlassian.confluence.search.lucene.ConfluenceDocumentBuilder.extractWithLuceneExtractors(ConfluenceDocumentBuilder.java:175) at com.atlassian.confluence.search.lucene.ConfluenceDocumentBuilder.getDocument(ConfluenceDocumentBuilder.java:121) at com.atlassian.confluence.search.lucene.tasks.AddDocumentIndexTask.perform(AddDocumentIndexTask.java:55) at com.atlassian.confluence.search.lucene.ReindexWorkBatch.indexCollection(ReindexWorkBatch.java:140) at com.atlassian.confluence.search.lucene.ReindexWorkBatch.lambda$executeTransaction$227(ReindexWorkBatch.java:108) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at com.atlassian.confluence.search.lucene.ReindexWorkBatch.executeTransaction(ReindexWorkBatch.java:83) at com.atlassian.confluence.search.lucene.ReindexWorkBatch.run(ReindexWorkBatch.java:71) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at com.atlassian.confluence.tenant.TenantGate$3.call(TenantGate.java:164) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.atlassian.confluence.extra.officeconnector.index.word.WordTextExtractor at sun.reflect.GeneratedConstructorAccessor309.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89) ... 38 more {noformat}

    Atlassian JIRA | 11 months ago | Olli Nevalainen
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.confluence.extra.officeconnector.index.word.WordTextExtractor': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.atlassian.confluence.extra.officeconnector.index.word.WordTextExtractor
  2. 0

    {{AbstractExtractorModuleDescriptor#createModule}} is meant to catch any {{Errors}} that happen during plugin module initialisation, but module initialisation code can in some situations wrap these problems inside {{org.springframework.beans.factory.BeanCreationException}} which causes extractor initialisation errors to bubble up to {{AddDocumentIndexTask#perform}} causing the searchable to not get indexed even if it didn't need the extractor. {noformat} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.confluence.extra.officeconnector.index.word.WordTextExtractor': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.atlassian.confluence.extra.officeconnector.index.word.WordTextExtractor at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:342) at sun.reflect.GeneratedMethodAccessor160.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugin.osgi.spring.DefaultSpringContainerAccessor.createBean(DefaultSpringContainerAccessor.java:97) at com.atlassian.confluence.plugin.ConfluencePluginUtils.instantiatePluginModule(ConfluencePluginUtils.java:162) at com.atlassian.confluence.plugin.descriptor.AbstractExtractorModuleDescriptor.createModule(AbstractExtractorModuleDescriptor.java:111) at com.atlassian.confluence.plugin.descriptor.ExtractorModuleDescriptor.createModule(ExtractorModuleDescriptor.java:57) at com.atlassian.confluence.plugin.descriptor.ExtractorModuleDescriptor.createModule(ExtractorModuleDescriptor.java:12) at com.atlassian.confluence.plugin.module.PluginModuleHolder.createModule(PluginModuleHolder.java:78) at com.atlassian.confluence.plugin.module.PluginModuleHolder.getModule(PluginModuleHolder.java:104) at com.atlassian.confluence.plugin.descriptor.AbstractExtractorModuleDescriptor.getModule(AbstractExtractorModuleDescriptor.java:70) at com.atlassian.confluence.plugin.descriptor.AbstractExtractorModuleDescriptor.getModule(AbstractExtractorModuleDescriptor.java:26) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:352) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at com.atlassian.confluence.search.lucene.ConfluenceDocumentBuilder.extractWithLuceneExtractors(ConfluenceDocumentBuilder.java:175) at com.atlassian.confluence.search.lucene.ConfluenceDocumentBuilder.getDocument(ConfluenceDocumentBuilder.java:121) at com.atlassian.confluence.search.lucene.tasks.AddDocumentIndexTask.perform(AddDocumentIndexTask.java:55) at com.atlassian.confluence.search.lucene.ReindexWorkBatch.indexCollection(ReindexWorkBatch.java:140) at com.atlassian.confluence.search.lucene.ReindexWorkBatch.lambda$executeTransaction$227(ReindexWorkBatch.java:108) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at com.atlassian.confluence.search.lucene.ReindexWorkBatch.executeTransaction(ReindexWorkBatch.java:83) at com.atlassian.confluence.search.lucene.ReindexWorkBatch.run(ReindexWorkBatch.java:71) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at com.atlassian.confluence.tenant.TenantGate$3.call(TenantGate.java:164) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.atlassian.confluence.extra.officeconnector.index.word.WordTextExtractor at sun.reflect.GeneratedConstructorAccessor309.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89) ... 38 more {noformat}

    Atlassian JIRA | 11 months ago | Olli Nevalainen [OOO until 6 Oct]
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.confluence.extra.officeconnector.index.word.WordTextExtractor': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.atlassian.confluence.extra.officeconnector.index.word.WordTextExtractor
  3. 0

    HibernatePersistence class not found exception with JPA + Hibernate + OSGI

    Stack Overflow | 2 years ago | user1926519
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter#53308cd' defined in OSGi resource[classpath:/spring/gdl-commons-db-jpa-context.xml|bnd.id=177|bnd.sym=gdl-open-domain]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/ejb/HibernatePersistence
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to configure spring commonj workManager in webSphere liberty profile server 8.5

    Stack Overflow | 2 years ago | user3767688
    java.lang.NoClassDefFoundError: commonj/work/WorkException
  6. 0

    Bet6e.com Maven: NoClassDefFoundError: org.springframework.test.context.junit4.SpringJUnit4ClassRunner -

    bet6e.com | 1 year ago
    java.lang.NoClassDefFoundError: Could not initialize class org.springframework.test.context.junit4.SpringJUnit4ClassRunner
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NoClassDefFoundError

    Could not initialize class com.atlassian.confluence.extra.officeconnector.index.word.WordTextExtractor

    at sun.reflect.GeneratedConstructorAccessor309.newInstance()
  2. Java RT
    Constructor.newInstance
    1. sun.reflect.GeneratedConstructorAccessor309.newInstance(Unknown Source)
    2. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    3. java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    3 frames
  3. Spring Beans
    AbstractAutowireCapableBeanFactory.createBean
    1. org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
    2. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:342)
    6 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor160.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    3. java.lang.reflect.Method.invoke(Method.java:497)
    3 frames
  5. com.atlassian.plugin
    DefaultSpringContainerAccessor.createBean
    1. com.atlassian.plugin.osgi.spring.DefaultSpringContainerAccessor.createBean(DefaultSpringContainerAccessor.java:97)
    1 frame
  6. com.atlassian.confluence
    AbstractExtractorModuleDescriptor.getModule
    1. com.atlassian.confluence.plugin.ConfluencePluginUtils.instantiatePluginModule(ConfluencePluginUtils.java:162)
    2. com.atlassian.confluence.plugin.descriptor.AbstractExtractorModuleDescriptor.createModule(AbstractExtractorModuleDescriptor.java:111)
    3. com.atlassian.confluence.plugin.descriptor.ExtractorModuleDescriptor.createModule(ExtractorModuleDescriptor.java:57)
    4. com.atlassian.confluence.plugin.descriptor.ExtractorModuleDescriptor.createModule(ExtractorModuleDescriptor.java:12)
    5. com.atlassian.confluence.plugin.module.PluginModuleHolder.createModule(PluginModuleHolder.java:78)
    6. com.atlassian.confluence.plugin.module.PluginModuleHolder.getModule(PluginModuleHolder.java:104)
    7. com.atlassian.confluence.plugin.descriptor.AbstractExtractorModuleDescriptor.getModule(AbstractExtractorModuleDescriptor.java:70)
    8. com.atlassian.confluence.plugin.descriptor.AbstractExtractorModuleDescriptor.getModule(AbstractExtractorModuleDescriptor.java:26)
    8 frames
  7. Java RT
    ReferencePipeline.forEach
    1. java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    2. java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:352)
    3. java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
    4. java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    5. java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
    6. java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
    7. java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    8. java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
    8 frames
  8. com.atlassian.confluence
    ReindexWorkBatch.lambda$executeTransaction$227
    1. com.atlassian.confluence.search.lucene.ConfluenceDocumentBuilder.extractWithLuceneExtractors(ConfluenceDocumentBuilder.java:175)
    2. com.atlassian.confluence.search.lucene.ConfluenceDocumentBuilder.getDocument(ConfluenceDocumentBuilder.java:121)
    3. com.atlassian.confluence.search.lucene.tasks.AddDocumentIndexTask.perform(AddDocumentIndexTask.java:55)
    4. com.atlassian.confluence.search.lucene.ReindexWorkBatch.indexCollection(ReindexWorkBatch.java:140)
    5. com.atlassian.confluence.search.lucene.ReindexWorkBatch.lambda$executeTransaction$227(ReindexWorkBatch.java:108)
    5 frames
  9. Spring Tx
    TransactionTemplate.execute
    1. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
    1 frame
  10. com.atlassian.confluence
    ReindexWorkBatch.run
    1. com.atlassian.confluence.search.lucene.ReindexWorkBatch.executeTransaction(ReindexWorkBatch.java:83)
    2. com.atlassian.confluence.search.lucene.ReindexWorkBatch.run(ReindexWorkBatch.java:71)
    2 frames
  11. Java RT
    Executors$RunnableAdapter.call
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    1 frame
  12. com.atlassian.confluence
    TenantGate$3.call
    1. com.atlassian.confluence.tenant.TenantGate$3.call(TenantGate.java:164)
    1 frame
  13. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    4. java.lang.Thread.run(Thread.java:745)
    4 frames