The cxf is the bus name, you need to specify it in your engine-factory.

BTW, you may need to include the resource like this to have the bean instance which name is cxf.

<import resource="classpath:META-INF/cxf/cxf.xml"/>

On 4/24/12 1:38 AM, Castyn wrote:
I am trying to setup the conduit and jetty engine much like in the SVN
example.  For some reason I am getting an error:

13:31:50,019 | ERROR | xtenderThread-11 | ContextLoaderListener            |
?                                   ? | 84 -
org.springframework.osgi.extender - 1.2.1 | Application context refresh
failed (OsgiBundleXmlApplicationContext(bundle=mdm-realtime-route,
config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'tls-config': Cannot resolve reference to bean 'cxf' while setting
constructor argument; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'cxf' is defined
         at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:616)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)[75:org.springframework.context:3.0.5.RELEASE]
         at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[81:org.springframework.osgi.core:1.2.1]
         at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[81:org.springframework.osgi.core:1.2.1]
         at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[81:org.springframework.osgi.core:1.2.1]
         at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[81:org.springframework.osgi.core:1.2.1]
         at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[84:org.springframework.osgi.extender:1.2.1]
         at java.lang.Thread.run(Thread.java:662)[:1.6.0_23]
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException:
No bean named 'cxf' is defined
         at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:527)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1083)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:274)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)[73:org.springframework.beans:3.0.5.RELEASE]
         at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)[73:org.springframework.beans:3.0.5.RELEASE]
         ... 19 more


My beans are below.  I amnot sure why it is referencing a bean named cxf.

     <httpj:engine-factory id="tls-config">
       <httpj:engine port="9191">
         <httpj:tlsServerParameters>
           <sec:keyManagers keyPassword="pass">
             <sec:keyStore type="JKS" password="pass"

resource="/apps/apache-servicemix-4.4.1-fuse-01-13/etc/sdg.jks"/>
           </sec:keyManagers>
           <sec:cipherSuitesFilter>
             <sec:include>.*_WITH_3DES_.*</sec:include>
             <sec:include>.*_WITH_DES_.*</sec:include>
             <sec:exclude>.*_WITH_NULL_.*</sec:exclude>
             <sec:exclude>.*_DH_anon_.*</sec:exclude>
           </sec:cipherSuitesFilter>
           <sec:clientAuthentication want="true" required="false"/>
         </httpj:tlsServerParameters>
       </httpj:engine>
     </httpj:engine-factory>

<http:conduit name="*.http-conduit">
   <http:client ConnectionTimeout="3000000" ReceiveTimeout="3000000" />
  <http:tlsClientParameters disableCNCheck="true">
  <sec:keyManagers keyPassword="pass">
   <sec:keyStore type="JKS" password="pass"
file="/apps/apache-servicemix-4.4.1-fuse-01-13/etc/sdg.jks" />
   </sec:keyManagers>
   </http:tlsClientParameters>
   </http:conduit>

--
View this message in context: 
http://camel.465427.n5.nabble.com/SSL-and-CXF-Consumers-tp5638480p5660019.html
Sent from the Camel - Users mailing list archive at Nabble.com.



--
Willem
----------------------------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Reply via email to