Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 3.3 RC3
-
Fix Version/s: 3.3 RC4
-
Component/s: Core: Exception Handling
-
Labels:
-
Environment:
Mac OS
-
User impact:High
-
Configuration:
-
Similar Issues:None
Description
When trying to define a default exception strategy referencing a choice exception strategy from the configuration element apps fails to start with this stack trace:
org.mule.module.launcher.DeploymentInitException: BeanCurrentlyInCreationException: Error creating bean with name 'logging-choice-exception-strategy': Requested bean is currently in creation: Is there an unresolvable circular reference? at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:220) at org.mule.module.launcher.application.ApplicationWrapper.init(ApplicationWrapper.java:64) at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:46) at org.mule.module.launcher.DeploymentService.guardedDeploy(DeploymentService.java:381) at org.mule.module.launcher.DeploymentService.start(DeploymentService.java:179) at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:157) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.mule.module.reboot.MuleContainerWrapper.start(MuleContainerWrapper.java:56) at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:3925) Caused by: org.mule.api.config.ConfigurationException: Error creating bean with name '_muleConfiguration': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'logging-choice-exception-strategy': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'logging-choice-exception-strategy': Requested bean is currently in creation: Is there an unresolvable circular reference? (org.mule.api.lifecycle.InitialisationException) (org.mule.api.config.ConfigurationException) at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:52) at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78) at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:80) at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:208) ... 11 more Caused by: org.mule.api.config.ConfigurationException: Error creating bean with name '_muleConfiguration': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'logging-choice-exception-strategy': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'logging-choice-exception-strategy': Requested bean is currently in creation: Is there an unresolvable circular reference? (org.mule.api.lifecycle.InitialisationException) at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:52) at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78) at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:101) at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:57) at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:46) ... 14 more Caused by: org.mule.api.lifecycle.InitialisationException: Error creating bean with name '_muleConfiguration': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'logging-choice-exception-strategy': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'logging-choice-exception-strategy': Requested bean is currently in creation: Is there an unresolvable circular reference? at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:117) at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:116) at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:73) at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:46) ... 18 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_muleConfiguration': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'logging-choice-exception-strategy': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'logging-choice-exception-strategy': Requested bean is currently in creation: Is there an unresolvable circular reference? at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1441) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:248) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:581) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:89) at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:109) ... 21 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'logging-choice-exception-strategy': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'logging-choice-exception-strategy': Requested bean is currently in creation: Is there an unresolvable circular reference? at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:313) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1093) at org.mule.config.spring.SpringRegistry.lookupObject(SpringRegistry.java:143) at org.mule.registry.AbstractRegistryBroker.lookupObject(AbstractRegistryBroker.java:124) at org.mule.registry.MuleRegistryHelper.lookupObject(MuleRegistryHelper.java:677) at org.mule.config.spring.MuleConfigurationConfigurator.validateDefaultExceptionStrategy(MuleConfigurationConfigurator.java:86) at org.mule.config.spring.MuleConfigurationConfigurator.getObject(MuleConfigurationConfigurator.java:72) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142) ... 30 more Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'logging-choice-exception-strategy': Requested bean is currently in creation: Is there an unresolvable circular reference? at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:255) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1093) at org.mule.config.spring.SpringRegistry.lookupObject(SpringRegistry.java:143) at org.mule.registry.AbstractRegistryBroker.lookupObject(AbstractRegistryBroker.java:124) at org.mule.registry.MuleRegistryHelper.lookupObject(MuleRegistryHelper.java:677) at org.mule.DefaultMuleContext.getDefaultExceptionStrategy(DefaultMuleContext.java:778) at org.mule.exception.ChoiceMessagingExceptionStrategy.addDefaultExceptionStrategyIfRequired(ChoiceMessagingExceptionStrategy.java:72) at org.mule.exception.ChoiceMessagingExceptionStrategy.initialise(ChoiceMessagingExceptionStrategy.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1581) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1522) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452) ... 41 more INFO 2012-04-19 15:38:05,257 [WrapperListener_start_runner] org.mule.module.launcher.StartupSummaryDeploymentListener:
The problem is that choice-exception-strategy use the default one as last exception strategy if there's no catch all exception strategy configured (es with empty when). So there's a cyclic reference because is trying to set it self as last exception strategy.
Fix it to show a nice message failing at start in that case.