You need that import in your bundle On Jul 12, 2011, at 14:33, jstandard <[email protected]> wrote:
> I've modifed my configuration (below) which I think is more inline with what > was suggested. Still getting an exception, but it's something entirely > different now (also below). > > <?xml version="1.0" encoding="UTF-8"?> > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:camel-osgi="http://camel.apache.org/schema/osgi" > xmlns:osgi="http://www.springframework.org/schema/osgi" > xsi:schemaLocation=" > http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-2.5.xsd > http://www.springframework.org/schema/osgi > http://www.springframework.org/schema/osgi/spring-osgi.xsd > http://camel.apache.org/schema/spring > http://camel.apache.org/schema/spring/camel-spring.xsd > http://camel.apache.org/schema/osgi > http://camel.apache.org/schema/osgi/camel-osgi.xsd"> > > <camel-osgi:camelContext xmlns="http://camel.apache.org/schema/spring"> > <package>com.fusesource.camel</package> > </camel-osgi:camelContext> > > <bean id="jms" class="org.apache.camel.component.jms.JmsComponent"> > <property name="connectionFactory"> > <osgi:reference id="pooledConnectionFactory" > interface="javax.jms.ConnectionFactory" /> > </property> > </bean> > </beans> > > org.springframework.beans.factory.BeanCreationException: Error creating bean > with name > 'pooledConnectionFactory#org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean#0': > Initialization of bean failed; nested exception is > org.springframework.beans.TypeMismatchException: Failed to convert property > value of type 'java.lang.String' to required type 'java.lang.Class[]' for > property 'interfaces'; nested exception is > java.lang.IllegalArgumentException: Cannot find class > [javax.jms.ConnectionFactory] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)[68:org.springframework.beans:3.0.5.RELEASE] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[68:org.springframework.beans:3.0.5.RELEASE] > at > org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)[68:org.springframework.beans:3.0.5.RELEASE] > at > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)[68:org.springframework.beans:3.0.5.RELEASE] > at > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)[68:org.springframework.beans:3.0.5.RELEASE] > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)[68:org.springframework.beans:3.0.5.RELEASE] > at > org.springframework.osgi.extender.internal.dependencies.startup.MandatoryImporterDependencyFactory.getServiceDependencies(MandatoryImporterDependencyFactory.java:63)[85:org.springframework.osgi.extender:1.2.1] > at > org.springframework.osgi.extender.internal.dependencies.startup.DependencyServiceManager.doFindDependencies(DependencyServiceManager.java:272)[85:org.springframework.osgi.extender:1.2.1] > at > org.springframework.osgi.extender.internal.dependencies.startup.DependencyServiceManager.access$700(DependencyServiceManager.java:40)[85:org.springframework.osgi.extender:1.2.1] > at > org.springframework.osgi.extender.internal.dependencies.startup.DependencyServiceManager$1.run(DependencyServiceManager.java:213)[85:org.springframework.osgi.extender:1.2.1] > at > org.springframework.osgi.extender.internal.util.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:124)[85:org.springframework.osgi.extender:1.2.1] > at > org.springframework.osgi.extender.internal.dependencies.startup.DependencyServiceManager.findServiceDependencies(DependencyServiceManager.java:209)[85:org.springframework.osgi.extender:1.2.1] > at > org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:239)[85:org.springframework.osgi.extender:1.2.1] > at > org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169)[85:org.springframework.osgi.extender:1.2.1] > at > org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)[82:org.springframework.osgi.core:1.2.1] > at > org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)[85:org.springframework.osgi.extender:1.2.1] > at java.lang.Thread.run(Thread.java:662)[:1.6.0_26] > > -- > View this message in context: > http://servicemix.396122.n5.nabble.com/Accessing-blueprint-service-from-spring-tp4579885p4580214.html > Sent from the ServiceMix - User mailing list archive at Nabble.com.
