[
https://issues.apache.org/activemq/browse/CAMEL-1937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53807#action_53807
]
Christian Schneider commented on CAMEL-1937:
--------------------------------------------
Hi Claus,
I am getting a test failure in camel-spring that could have to do with this
change.
The lifecycleStrategie
(org.apache.camel.management.DefaultManagedLifecycleStrategy) is initialized
with a constructor argument of type
org.apache.camel.management.ManagedManagementStrategy. But there is no such
constructor.
Greetings
Christian
----
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'camel': Invocation of init method failed; nested exception is
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name 'lifeCycleStrategy' defined in class path resource
[org/apache/camel/spring/management/jmxInstrumentationWithConnector.xml]:
Unsatisfied dependency expressed through constructor argument with index 0 of
type [org.apache.camel.CamelContext]: Could not convert constructor argument
value of type [org.apache.camel.management.ManagedManagementStrategy] to
required type [org.apache.camel.CamelContext]: Failed to convert value of type
[org.apache.camel.management.ManagedManagementStrategy] to required type
[org.apache.camel.CamelContext]; nested exception is
java.lang.IllegalArgumentException: Cannot convert value of type
[org.apache.camel.management.ManagedManagementStrategy] to required type
[org.apache.camel.CamelContext]: no matching editors or conversion strategy
found
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)
at
org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947)
at
org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:701)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:377)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at
org.apache.camel.spring.managment.JmxInstrumentationWithConnectorTest.createApplicationContext(JmxInstrumentationWithConnectorTest.java:36)
at
org.apache.camel.spring.SpringTestSupport.setUp(SpringTestSupport.java:46)
at junit.framework.TestCase.runBare(TestCase.java:132)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'lifeCycleStrategy' defined in class path
resource
[org/apache/camel/spring/management/jmxInstrumentationWithConnector.xml]:
Unsatisfied dependency expressed through constructor argument with index 0 of
type [org.apache.camel.CamelContext]: Could not convert constructor argument
value of type [org.apache.camel.management.ManagedManagementStrategy] to
required type [org.apache.camel.CamelContext]: Failed to convert value of type
[org.apache.camel.management.ManagedManagementStrategy] to required type
[org.apache.camel.CamelContext]; nested exception is
java.lang.IllegalArgumentException: Cannot convert value of type
[org.apache.camel.management.ManagedManagementStrategy] to required type
[org.apache.camel.CamelContext]: no matching editors or conversion strategy
found
at
org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:565)
at
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193)
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)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:297)
at
org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:941)
at
org.apache.camel.spring.spi.ApplicationContextRegistry.lookupByType(ApplicationContextRegistry.java:60)
at
org.apache.camel.spring.CamelContextFactoryBean.afterPropertiesSet(CamelContextFactoryBean.java:254)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 31 more
> Support multiple LifecycleStrategy
> ----------------------------------
>
> Key: CAMEL-1937
> URL: https://issues.apache.org/activemq/browse/CAMEL-1937
> Project: Apache Camel
> Issue Type: New Feature
> Components: camel-core, camel-spring
> Affects Versions: 2.0.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.1.0
>
>
> We need multiple support for {{LifecycleStrategy}} so 3rd party plugins can
> listening and react to lifecycle events, and add bootstapping if needed etc.
> Need to be able to just define spring bean as instanceof LifecycleStrategy
> and Camel will pick em up and add 'em to its list.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.