org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'xmlOutputFactory' is defined

Atlassian JIRA | Kai Fung Chong [Atlassian] | 6 years ago
  1. 0

    I did a constructor injection in Table of Content plugin using xmlOutputFactory. Following is the error I get : {code} [INFO] [talledLocalContainer] -- referer: http://localhost:1990/confluence/admin/uninstallplugin.action?pluginKey=org.randombits.confluence.toc&atl_t oken=447d3e900004c553df6bb40c8cd8c5db9f9c176b | url: /confluence/admin/olduploadplugin.action | userName: admin | action: olduploadplugin [INFO] [talledLocalContainer] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'staxDocumentOutlineCreator' defi ned in URL [bundle://79.0:0/META-INF/spring/toc-context.xml]: Cannot resolve reference to bean 'xmlOutputFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'xmlOutputFactory' is defined [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver. java:275) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueRe solver.java:104) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java: 479) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:162) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCa pableBeanFactory.java:925) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCap ableBeanFactory.java:835) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBe anFactory.java:440) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFacto ry.java:409) [INFO] [talledLocalContainer] at java.security.AccessController.doPrivileged(Native Method) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBean Factory.java:380) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.ja va:222) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFa ctory.java:429) [INFO] [talledLocalContainer] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationC ontext.java:728) [INFO] [talledLocalContainer] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegated ExecutionApplicationContext.java:69) [INFO] [talledLocalContainer] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecut ionApplicationContext.java:355) [INFO] [talledLocalContainer] at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) [INFO] [talledLocalContainer] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDeleg atedExecutionApplicationContext.java:320) [INFO] [talledLocalContainer] at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$Complete RefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:619) [INFO] [talledLocalContainer] Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'xmlOutputFactory' is defined [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.j ava:387) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java :971) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver. java:269) {code} However in renderingContext.xml, I can see that xmlOutputFactory can be injected to other classes. For example, {code} <bean id="storageMacroMarshaller" class="com.atlassian.confluence.content.render.xhtml.storage.macro.StorageMacroMarshaller"> <constructor-arg ref="xmlOutputFactory"/> </bean> {code} xmlOutputFactory should be available to plugins as it is configured as "plugin:available="true""

    Atlassian JIRA | 6 years ago | Kai Fung Chong [Atlassian]
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'xmlOutputFactory' is defined
  2. 0

    I did a constructor injection in Table of Content plugin using xmlOutputFactory. Following is the error I get : {code} [INFO] [talledLocalContainer] -- referer: http://localhost:1990/confluence/admin/uninstallplugin.action?pluginKey=org.randombits.confluence.toc&atl_t oken=447d3e900004c553df6bb40c8cd8c5db9f9c176b | url: /confluence/admin/olduploadplugin.action | userName: admin | action: olduploadplugin [INFO] [talledLocalContainer] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'staxDocumentOutlineCreator' defi ned in URL [bundle://79.0:0/META-INF/spring/toc-context.xml]: Cannot resolve reference to bean 'xmlOutputFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'xmlOutputFactory' is defined [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver. java:275) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueRe solver.java:104) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java: 479) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:162) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCa pableBeanFactory.java:925) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCap ableBeanFactory.java:835) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBe anFactory.java:440) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFacto ry.java:409) [INFO] [talledLocalContainer] at java.security.AccessController.doPrivileged(Native Method) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBean Factory.java:380) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.ja va:222) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFa ctory.java:429) [INFO] [talledLocalContainer] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationC ontext.java:728) [INFO] [talledLocalContainer] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegated ExecutionApplicationContext.java:69) [INFO] [talledLocalContainer] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecut ionApplicationContext.java:355) [INFO] [talledLocalContainer] at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) [INFO] [talledLocalContainer] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDeleg atedExecutionApplicationContext.java:320) [INFO] [talledLocalContainer] at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$Complete RefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:619) [INFO] [talledLocalContainer] Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'xmlOutputFactory' is defined [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.j ava:387) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java :971) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver. java:269) {code} However in renderingContext.xml, I can see that xmlOutputFactory can be injected to other classes. For example, {code} <bean id="storageMacroMarshaller" class="com.atlassian.confluence.content.render.xhtml.storage.macro.StorageMacroMarshaller"> <constructor-arg ref="xmlOutputFactory"/> </bean> {code} xmlOutputFactory should be available to plugins as it is configured as "plugin:available="true""

    Atlassian JIRA | 6 years ago | Kai Fung Chong [Atlassian]
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'xmlOutputFactory' is defined
  3. 0

    No bean named 'openIdLoginTemplate' is defined

    YouTrack | 5 years ago
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'openIdLoginTemplate' is defined
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    No bean named 'openIdLoginTemplate' is defined

    YouTrack | 5 years ago
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'openIdLoginTemplate' is defined
  6. 0

    Cannot deploy YouTrack on JBOSS 7

    YouTrack | 4 years ago
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'centralManager' is defined

  1. gehel 2 times, last 1 week ago
  2. Andreas Häber 4 times, last 1 month ago
  3. Luka 1 times, last 2 months ago
  4. mortalman7 11 times, last 4 months ago
  5. serious2monkeys 5 times, last 3 months ago
3 more registered users
52 unregistered visitors
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. org.springframework.beans.factory.NoSuchBeanDefinitionException

    No bean named 'xmlOutputFactory' is defined

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition()
  2. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:387)
    2. org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:971)
    3. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246)
    4. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    5. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    5 frames