You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Christian Schneider <ch...@die-schneider.net> on 2009/10/26 18:56:15 UTC

Problem using a CamelTransportFactory from a junit 4 unit test or together with

Hi all,

I recently tried to convert my unit tests to junit 4 using the new Spring test framework.

Since then I get the following exception when calling the test.
Error creating bean with name 'org.apache.camel.component.cxf.transport.CamelTransportFactory#0': Injection of resource methods failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [java.lang.String] found for dependency [collection of java.lang.String]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}

The same happens when I activate /<context:annotation-config/>/

I think it has to do with autowiring. Do you have any idea what goes wrong here and how I can fix it?

Greetings

Christian

---


17:45:16,928 INFO  org.springframework.test.context.TestContextManager retrieveTestExecutionListeners - @TestExecutionListeners is not present for class [class net.enbw.endur.ServiceTest]: using defaults.
17:45:17,116 INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions - Loading XML bean definitions from class path resource [applicationContext.xml]
17:45:17,350 INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions - Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
17:45:17,397 INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions - Loading XML bean definitions from class path resource [META-INF/cxf/cxf-extension-soap.xml]
17:45:17,444 INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions - Loading XML bean definitions from class path resource [META-INF/cxf/cxf-extension-camel.xml]
17:45:17,553 INFO  org.apache.camel.spring.handler.CamelNamespaceHandler init - camel-osgi.jar not detected in classpath
17:45:18,412 INFO  org.springframework.context.support.GenericApplicationContext prepareRefresh - Refreshing org.springframework.context.support.GenericApplicationContext@fd918a: display name [org.springframework.context.support.GenericApplicationContext@fd918a]; startup date [Mon Oct 26 17:45:18 CET 2009]; root of context hierarchy
17:45:18,412 INFO  org.springframework.context.support.GenericApplicationContext obtainFreshBeanFactory - Bean factory for application context [org.springframework.context.support.GenericApplicationContext@fd918a]: org.springframework.beans.factory.support.DefaultListableBeanFactory@ef9d00
17:45:59,628 INFO  org.springframework.beans.factory.config.PropertyPlaceholderConfigurer loadProperties - Loading properties file from class path resource [jms.properties]
17:46:13,767 INFO  org.springframework.context.support.GenericApplicationContext postProcessAfterInitialization - Bean 'cxf' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
17:46:13,829 INFO  org.apache.camel.impl.DefaultCamelContext <init> - JMX enabled. Using InstrumentationLifecycleStrategy.
17:46:14,001 INFO  org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@ef9d00: defining beans [cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.camel.component.cxf.transport.CamelTransportFactory#0,configProps,appModule,serviceImpl,customerServiceEndpoint,customerService.proxyFactory,customerService,template,consumerTemplate,camelContext:beanPostProcessor,camelContext,jms,jmsConfiguration,jmsConnectionFactory,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor]; root of factory hierarchy
26.10.2009 17:46:17 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service {http://examples.etg.services.enbw.net/}CustomerService from class net.enbw.services.etg.examples.customerservice.CustomerServiceV1
17:46:30,609 INFO  org.springframework.beans.factory.support.DefaultListableBeanFactory destroySingletons - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@ef9d00: defining beans [cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.camel.component.cxf.transport.CamelTransportFactory#0,configProps,appModule,serviceImpl,customerServiceEndpoint,customerService.proxyFactory,customerService,template,consumerTemplate,camelContext:beanPostProcessor,camelContext,jms,jmsConfiguration,jmsConnectionFactory,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor]; root of factory hierarchy
17:46:30,609 ERROR org.springframework.test.context.TestContextManager prepareTestInstance - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@1639ff] to prepare test instance [net.enbw.endur.ServiceTest@1399671]
java.lang.IllegalStateException: Failed to load ApplicationContext
	at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:203)
	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
	at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:255)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:93)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:130)
	at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
	at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
	at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
	at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appModule' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'customerService' while setting bean property 'customerService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.camel.component.cxf.transport.CamelTransportFactory#0': Injection of resource methods failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [java.lang.String] found for dependency [collection of java.lang.String]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	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:221)
	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.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84)
	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:42)
	at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:173)
	at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:199)
	... 16 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.camel.component.cxf.transport.CamelTransportFactory#0': Injection of resource methods failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [java.lang.String] found for dependency [collection of java.lang.String]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:127)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116)
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:98)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1285)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:217)
	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.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
	... 35 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.camel.component.cxf.transport.CamelTransportFactory#0': Injection of resource methods failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [java.lang.String] found for dependency [collection of java.lang.String]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:305)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:998)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	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:221)
	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.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)
	at org.apache.cxf.configuration.spring.AbstractSpringBeanMap.get(AbstractSpringBeanMap.java:136)
	at org.apache.cxf.configuration.spring.AbstractSpringBeanMap$Entry.getValue(AbstractSpringBeanMap.java:209)
	at org.apache.cxf.transport.DestinationFactoryManagerImpl.getDestinationFactoryForUri(DestinationFactoryManagerImpl.java:132)
	at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:240)
	at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:146)
	at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
	at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
	at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:115)
	at org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser$JAXWSSpringClientProxyFactoryBean.getObject(JaxWsProxyFactoryBeanDefinitionParser.java:74)
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121)
	... 43 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [java.lang.String] found for dependency [collection of java.lang.String]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:726)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:571)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:431)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:409)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:537)
	at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:192)
	at org.springframework.beans.factory.annotation.InjectionMetadata.injectMethods(InjectionMetadata.java:117)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:302)
	... 64 more

-- 

Christian Schneider
---
http://www.liquid-reality.de



Re: Problem using a CamelTransportFactory from a junit 4 unit test or together with

Posted by Willem Jiang <wi...@gmail.com>.
We are closing to the Camel 2.1.0 release, there are only 16 issues for 
Camel 2.1.0. But we don't have a time line for the Camel 2.1.0 release.

As you can't control the release process, I think it is better to apply 
these two patch into Camel 2.0.0 yourself ;)

Willem

Christian Schneider wrote:
> Hi Willem,
> 
> a build without the tests works now. Thanks.
> 
> Is there an estimate when camel 2.1.0 will be released? I am thinking 
> about patching camel 2.0.0 with the two issues I reported and build a 
> fixed version for my company.
> 
> Greetings
> 
> Christian
> 
> 
> Willem Jiang schrieb:
>> Hi Christian,
>>
>> Thank you for the confirmation and build error report.
>> Since Servicemix just released a new version of bundle jars , it's 
>> time to switch to the released version.
>>
>> I just committed the fix[1] for it, please update your svn workspace 
>> and give it a try :)
>>
>> [1] http://svn.apache.org/viewvc?rev=830422&view=rev
>>
>> Willem
> 


Re: Problem using a CamelTransportFactory from a junit 4 unit test or together with

Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Willem,

a build without the tests works now. Thanks.

Is there an estimate when camel 2.1.0 will be released? I am thinking 
about patching camel 2.0.0 with the two issues I reported and build a 
fixed version for my company.

Greetings

Christian


Willem Jiang schrieb:
> Hi Christian,
>
> Thank you for the confirmation and build error report.
> Since Servicemix just released a new version of bundle jars , it's 
> time to switch to the released version.
>
> I just committed the fix[1] for it, please update your svn workspace 
> and give it a try :)
>
> [1] http://svn.apache.org/viewvc?rev=830422&view=rev
>
> Willem

-- 

Christian Schneider
---
http://www.liquid-reality.de


Re: Problem using a CamelTransportFactory from a junit 4 unit test or together with

Posted by Willem Jiang <wi...@gmail.com>.
Hi Christian,

Thank you for the confirmation and build error report.
Since Servicemix just released a new version of bundle jars , it's time 
to switch to the released version.

I just committed the fix[1] for it, please update your svn workspace and 
give it a try :)

[1] http://svn.apache.org/viewvc?rev=830422&view=rev

Willem
Christian Schneider wrote:
> Hi Willem,
> 
> I have tested with the current trunk and it works. The exception does 
> not appear anymore.
> I had a problem while doing the build though. The error is appended 
> below. Seems like there is a snapshot dependency that I do not have in 
> my local repo.
> 
> Greetings
> 
> Christian
> 
> -------
> [INFO] Building Camel :: Mail
> [INFO]    task-segment: [install]
> [INFO] 
> ------------------------------------------------------------------------
> Downloading: 
> http://download.java.net/maven/2//org/apache/servicemix/bundles/bundles-pom/4-SNAPSHOT/bundles-pom-4-SNAPSHOT.pom 
> 
> [INFO] Unable to find resource 
> 'org.apache.servicemix.bundles:bundles-pom:pom:4-SNAPSHOT' in repository 
> java.net.m2 (http://download.java.net/maven/2/)
> Downloading: 
> http://repository.apache.org/snapshots/org/apache/servicemix/bundles/bundles-pom/4-SNAPSHOT/bundles-pom-4-SNAPSHOT.pom 
> 
> [INFO] Unable to find resource 
> 'org.apache.servicemix.bundles:bundles-pom:pom:4-SNAPSHOT' in repository 
> apache.snapshots (http://repository.apache.org/snapshots)
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
> 
> 
> Project ID: 
> org.apache.servicemix.bundles:org.apache.servicemix.bundles.javax.mail:bundle:1.4.1_1-SNAPSHOT 
> 
> 
> Reason: Cannot find parent: org.apache.servicemix.bundles:bundles-pom 
> for project: 
> org.apache.servicemix.bundles:org.apache.servicemix.bundles.javax.mail:bundle:1.4.1_1-SNAPSHOT 
> for project 
> org.apache.servicemix.bundles:org.apache.servicemix.bundles.javax.mail:bundle:1.4.1_1-SNAPSHOT 
> 
> 
> 
> [INFO] 
> ------------------------------------------------------------------------
> 
> Willem Jiang schrieb:
>> Hi Christian,
>>
>> I just did quick fix for all your issues, please check them out if you 
>> have time to try the latest camel 2.1-SNAPSHOT.
>>
>> Willem
> 


Re: Problem using a CamelTransportFactory from a junit 4 unit test or together with

Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Willem,

I have tested with the current trunk and it works. The exception does 
not appear anymore.
I had a problem while doing the build though. The error is appended 
below. Seems like there is a snapshot dependency that I do not have in 
my local repo.

Greetings

Christian

-------
[INFO] Building Camel :: Mail
[INFO]    task-segment: [install]
[INFO] 
------------------------------------------------------------------------
Downloading: 
http://download.java.net/maven/2//org/apache/servicemix/bundles/bundles-pom/4-SNAPSHOT/bundles-pom-4-SNAPSHOT.pom
[INFO] Unable to find resource 
'org.apache.servicemix.bundles:bundles-pom:pom:4-SNAPSHOT' in repository 
java.net.m2 (http://download.java.net/maven/2/)
Downloading: 
http://repository.apache.org/snapshots/org/apache/servicemix/bundles/bundles-pom/4-SNAPSHOT/bundles-pom-4-SNAPSHOT.pom
[INFO] Unable to find resource 
'org.apache.servicemix.bundles:bundles-pom:pom:4-SNAPSHOT' in repository 
apache.snapshots (http://repository.apache.org/snapshots)
[INFO] 
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] 
------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: 
org.apache.servicemix.bundles:org.apache.servicemix.bundles.javax.mail:bundle:1.4.1_1-SNAPSHOT

Reason: Cannot find parent: org.apache.servicemix.bundles:bundles-pom 
for project: 
org.apache.servicemix.bundles:org.apache.servicemix.bundles.javax.mail:bundle:1.4.1_1-SNAPSHOT 
for project 
org.apache.servicemix.bundles:org.apache.servicemix.bundles.javax.mail:bundle:1.4.1_1-SNAPSHOT


[INFO] 
------------------------------------------------------------------------

Willem Jiang schrieb:
> Hi Christian,
>
> I just did quick fix for all your issues, please check them out if you 
> have time to try the latest camel 2.1-SNAPSHOT.
>
> Willem

-- 

Christian Schneider
---
http://www.liquid-reality.de


Re: Problem using a CamelTransportFactory from a junit 4 unit test or together with

Posted by Willem Jiang <wi...@gmail.com>.
Hi Christian,

I just did quick fix for all your issues, please check them out if you 
have time to try the latest camel 2.1-SNAPSHOT.

Willem

Christian Schneider wrote:
> Hi Claus,
> 
> I am using Camel 2.0.0 and Spring 2.5.5. I am not sure which exact junit 
> 4 version it is. Have to look at work.
> I do not think that it really is a junit 4 problem. It only seems that 
> when using the new spring test framework that autowiring is activated 
> for the whole spring config.
> I debugged into the problem and think that it has to do with 
> CamelTranportFactory.setActivationNamespaces(Collection<String> ans). It 
> seems to look for an autowiring candidate for
> this setter.
> 
> I have created a jira issue for the problem together with  a sample 
> project:
> https://issues.apache.org/activemq/browse/CAMEL-2112
> 
> Btw. while looking into the issue I found that I had a mix of CXF jars 
> from CXF 2.2.2 and 2.2.4 in my project. This seems to originate from 
> camel-cxf. I have created another issue for this:
> https://issues.apache.org/activemq/browse/CAMEL-2111
> First I thought my first problem had to do with this mix but when I 
> adjusted my pom so only the cxf 2.2.4 version were used the problem did 
> not vanish.
> 
> Greetings
> 
> Christian
> 
> 
> 
> Claus Ibsen schrieb:
>> Hi
>>
>> Which version of Camel, spring and junit are you using?
>>
>> We use junit 4.x to unit test many of the camel components. Such as
>> camel-jms, camel-quartz etc.
>>   
> 


Re: Problem using a CamelTransportFactory from a junit 4 unit test or together with

Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Claus,

I am using Camel 2.0.0 and Spring 2.5.5. I am not sure which exact junit 
4 version it is. Have to look at work.
I do not think that it really is a junit 4 problem. It only seems that 
when using the new spring test framework that autowiring is activated 
for the whole spring config.
I debugged into the problem and think that it has to do with 
CamelTranportFactory.setActivationNamespaces(Collection<String> ans). It 
seems to look for an autowiring candidate for
this setter.

I have created a jira issue for the problem together with  a sample project:
https://issues.apache.org/activemq/browse/CAMEL-2112

Btw. while looking into the issue I found that I had a mix of CXF jars 
from CXF 2.2.2 and 2.2.4 in my project. This seems to originate from 
camel-cxf. I have created another issue for this:
https://issues.apache.org/activemq/browse/CAMEL-2111
First I thought my first problem had to do with this mix but when I 
adjusted my pom so only the cxf 2.2.4 version were used the problem did 
not vanish.

Greetings

Christian



Claus Ibsen schrieb:
> Hi
>
> Which version of Camel, spring and junit are you using?
>
> We use junit 4.x to unit test many of the camel components. Such as
> camel-jms, camel-quartz etc.
>   

Re: Problem using a CamelTransportFactory from a junit 4 unit test or together with

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Which version of Camel, spring and junit are you using?

We use junit 4.x to unit test many of the camel components. Such as
camel-jms, camel-quartz etc.


On Mon, Oct 26, 2009 at 6:56 PM, Christian Schneider
<ch...@die-schneider.net> wrote:
> Hi all,
>
> I recently tried to convert my unit tests to junit 4 using the new Spring
> test framework.
>
> Since then I get the following exception when calling the test.
> Error creating bean with name
> 'org.apache.camel.component.cxf.transport.CamelTransportFactory#0':
> Injection of resource methods failed; nested exception is
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching
> bean of type [java.lang.String] found for dependency [collection of
> java.lang.String]: expected at least 1 bean which qualifies as autowire
> candidate for this dependency. Dependency annotations: {}
>
> The same happens when I activate /<context:annotation-config/>/
>
> I think it has to do with autowiring. Do you have any idea what goes wrong
> here and how I can fix it?
>
> Greetings
>
> Christian
>
> ---
>
>
> 17:45:16,928 INFO  org.springframework.test.context.TestContextManager
> retrieveTestExecutionListeners - @TestExecutionListeners is not present for
> class [class net.enbw.endur.ServiceTest]: using defaults.
> 17:45:17,116 INFO
>  org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> loadBeanDefinitions - Loading XML bean definitions from class path resource
> [applicationContext.xml]
> 17:45:17,350 INFO
>  org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> loadBeanDefinitions - Loading XML bean definitions from class path resource
> [META-INF/cxf/cxf.xml]
> 17:45:17,397 INFO
>  org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> loadBeanDefinitions - Loading XML bean definitions from class path resource
> [META-INF/cxf/cxf-extension-soap.xml]
> 17:45:17,444 INFO
>  org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> loadBeanDefinitions - Loading XML bean definitions from class path resource
> [META-INF/cxf/cxf-extension-camel.xml]
> 17:45:17,553 INFO  org.apache.camel.spring.handler.CamelNamespaceHandler
> init - camel-osgi.jar not detected in classpath
> 17:45:18,412 INFO
>  org.springframework.context.support.GenericApplicationContext
> prepareRefresh - Refreshing
> org.springframework.context.support.GenericApplicationContext@fd918a:
> display name
> [org.springframework.context.support.GenericApplicationContext@fd918a];
> startup date [Mon Oct 26 17:45:18 CET 2009]; root of context hierarchy
> 17:45:18,412 INFO
>  org.springframework.context.support.GenericApplicationContext
> obtainFreshBeanFactory - Bean factory for application context
> [org.springframework.context.support.GenericApplicationContext@fd918a]:
> org.springframework.beans.factory.support.DefaultListableBeanFactory@ef9d00
> 17:45:59,628 INFO
>  org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
> loadProperties - Loading properties file from class path resource
> [jms.properties]
> 17:46:13,767 INFO
>  org.springframework.context.support.GenericApplicationContext
> postProcessAfterInitialization - Bean 'cxf' is not eligible for getting
> processed by all BeanPostProcessors (for example: not eligible for
> auto-proxying)
> 17:46:13,829 INFO  org.apache.camel.impl.DefaultCamelContext <init> - JMX
> enabled. Using InstrumentationLifecycleStrategy.
> 17:46:14,001 INFO
>  org.springframework.beans.factory.support.DefaultListableBeanFactory
> preInstantiateSingletons - Pre-instantiating singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@ef9d00:
> defining beans
> [cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.camel.component.cxf.transport.CamelTransportFactory#0,configProps,appModule,serviceImpl,customerServiceEndpoint,customerService.proxyFactory,customerService,template,consumerTemplate,camelContext:beanPostProcessor,camelContext,jms,jmsConfiguration,jmsConnectionFactory,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor];
> root of factory hierarchy
> 26.10.2009 17:46:17
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromClass
> INFO: Creating Service
> {http://examples.etg.services.enbw.net/}CustomerService from class
> net.enbw.services.etg.examples.customerservice.CustomerServiceV1
> 17:46:30,609 INFO
>  org.springframework.beans.factory.support.DefaultListableBeanFactory
> destroySingletons - Destroying singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@ef9d00:
> defining beans
> [cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.camel.component.cxf.transport.CamelTransportFactory#0,configProps,appModule,serviceImpl,customerServiceEndpoint,customerService.proxyFactory,customerService,template,consumerTemplate,camelContext:beanPostProcessor,camelContext,jms,jmsConfiguration,jmsConnectionFactory,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor];
> root of factory hierarchy
> 17:46:30,609 ERROR org.springframework.test.context.TestContextManager
> prepareTestInstance - Caught exception while allowing TestExecutionListener
> [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@1639ff]
> to prepare test instance [net.enbw.endur.ServiceTest@1399671]
> java.lang.IllegalStateException: Failed to load ApplicationContext
>        at
> org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:203)
>        at
> org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
>        at
> org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
>        at
> org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:255)
>        at
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:93)
>        at
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:130)
>        at
> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>        at
> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
>        at
> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>        at
> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>        at
> org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
>        at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
>        at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>        at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>        at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>        at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>        at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'appModule' defined in class path resource
> [applicationContext.xml]: Cannot resolve reference to bean 'customerService'
> while setting bean property 'customerService'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'customerService': FactoryBean threw exception on object creation;
> nested exception is org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name
> 'org.apache.camel.component.cxf.transport.CamelTransportFactory#0':
> Injection of resource methods failed; nested exception is
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching
> bean of type [java.lang.String] found for dependency [collection of
> java.lang.String]: expected at least 1 bean which qualifies as autowire
> candidate for this dependency. Dependency annotations: {}
>        at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
>        at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
>        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:221)
>        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.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
>        at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
>        at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
>        at
> org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84)
>        at
> org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:42)
>        at
> org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:173)
>        at
> org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:199)
>        ... 16 more
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'customerService': FactoryBean threw exception on
> object creation; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name
> 'org.apache.camel.component.cxf.transport.CamelTransportFactory#0':
> Injection of resource methods failed; nested exception is
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching
> bean of type [java.lang.String] found for dependency [collection of
> java.lang.String]: expected at least 1 bean which qualifies as autowire
> candidate for this dependency. Dependency annotations: {}
>        at
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:127)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116)
>        at
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:98)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1285)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:217)
>        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.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
>        ... 35 more
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name
> 'org.apache.camel.component.cxf.transport.CamelTransportFactory#0':
> Injection of resource methods failed; nested exception is
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching
> bean of type [java.lang.String] found for dependency [collection of
> java.lang.String]: expected at least 1 bean which qualifies as autowire
> candidate for this dependency. Dependency annotations: {}
>        at
> org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:305)
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:998)
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
>        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:221)
>        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.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)
>        at
> org.apache.cxf.configuration.spring.AbstractSpringBeanMap.get(AbstractSpringBeanMap.java:136)
>        at
> org.apache.cxf.configuration.spring.AbstractSpringBeanMap$Entry.getValue(AbstractSpringBeanMap.java:209)
>        at
> org.apache.cxf.transport.DestinationFactoryManagerImpl.getDestinationFactoryForUri(DestinationFactoryManagerImpl.java:132)
>        at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:240)
>        at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:146)
>        at
> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
>        at
> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
>        at
> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:115)
>        at
> org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser$JAXWSSpringClientProxyFactoryBean.getObject(JaxWsProxyFactoryBeanDefinitionParser.java:74)
>        at
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121)
>        ... 43 more
> Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException:
> No matching bean of type [java.lang.String] found for dependency [collection
> of java.lang.String]: expected at least 1 bean which qualifies as autowire
> candidate for this dependency. Dependency annotations: {}
>        at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:726)
>        at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:571)
>        at
> org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:431)
>        at
> org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:409)
>        at
> org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:537)
>        at
> org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:192)
>        at
> org.springframework.beans.factory.annotation.InjectionMetadata.injectMethods(InjectionMetadata.java:117)
>        at
> org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:302)
>        ... 64 more
>
> --
>
> Christian Schneider
> ---
> http://www.liquid-reality.de
>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus