You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Sorin Silaghi <so...@gmail.com> on 2011/04/19 18:44:22 UTC
Using osgi:reference in a service unit throws error
Hi,
I'm trying to access a service in SMX 4.3.0 from a service unit
but I get the error "Unrecognized xbean namespace mapping:
http://www.springframework.org/schema/osgi".
I've tried just about everything I can think but I couldn't get it
to work. Below is my camel-context.xml file. Any ideas ?
<?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:osgi="http://www.springframework.org/schema/osgi"
xsi:schemaLocation="
http://camel.apache.org/schema/osgi/
http://www.springframework.org/schema/beans/spring-beans-2.0.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
">
<osgi:reference id="myServiceBean"
interface="org.apache.camel.Processor" bean-name="myService"/>
<camelContext xmlns="http://camel.apache.org/schema/spring"
id="camelContext">
.......
</camelContext>
</beans>
Re: Using osgi:reference in a service unit throws error
Posted by Sorin Silaghi <so...@gmail.com>.
Hi,
thanks that worked.
Sorin.
On Tue, Apr 19, 2011 at 9:59 PM, Jon Anstey <ja...@gmail.com> wrote:
> You should just have to add this to your camel-context.xml file:
>
> <classpath>
> <library>osgi:org.springframework.osgi.core</library>
> </classpath>
>
> On Tue, Apr 19, 2011 at 2:14 PM, Sorin Silaghi <so...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I'm trying to access a service in SMX 4.3.0 from a service unit
> > but I get the error "Unrecognized xbean namespace mapping:
> > http://www.springframework.org/schema/osgi".
> >
> > I've tried just about everything I can think but I couldn't get
> it
> > to work. Below is my camel-context.xml file. Any ideas ?
> >
> > <?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:osgi="http://www.springframework.org/schema/osgi"
> > xsi:schemaLocation="
> > http://camel.apache.org/schema/osgi/
> > http://www.springframework.org/schema/beans/spring-beans-2.0.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
> > ">
> >
> > <osgi:reference id="myServiceBean"
> > interface="org.apache.camel.Processor" bean-name="myService"/>
> >
> > <camelContext xmlns="http://camel.apache.org/schema/spring"
> > id="camelContext">
> > .......
> > </camelContext>
> >
> > </beans>
> >
>
>
>
> --
> Cheers,
> Jon
> ---------------
> FuseSource
> Email: jon@fusesource.com
> Web: fusesource.com
> Twitter: jon_anstey
> Blog: http://janstey.blogspot.com
> Author of Camel in Action: http://manning.com/ibsen
>
Re: Using osgi:reference in a service unit throws error
Posted by Jon Anstey <ja...@gmail.com>.
You should just have to add this to your camel-context.xml file:
<classpath>
<library>osgi:org.springframework.osgi.core</library>
</classpath>
On Tue, Apr 19, 2011 at 2:14 PM, Sorin Silaghi <so...@gmail.com> wrote:
> Hi,
>
> I'm trying to access a service in SMX 4.3.0 from a service unit
> but I get the error "Unrecognized xbean namespace mapping:
> http://www.springframework.org/schema/osgi".
>
> I've tried just about everything I can think but I couldn't get it
> to work. Below is my camel-context.xml file. Any ideas ?
>
> <?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:osgi="http://www.springframework.org/schema/osgi"
> xsi:schemaLocation="
> http://camel.apache.org/schema/osgi/
> http://www.springframework.org/schema/beans/spring-beans-2.0.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
> ">
>
> <osgi:reference id="myServiceBean"
> interface="org.apache.camel.Processor" bean-name="myService"/>
>
> <camelContext xmlns="http://camel.apache.org/schema/spring"
> id="camelContext">
> .......
> </camelContext>
>
> </beans>
>
--
Cheers,
Jon
---------------
FuseSource
Email: jon@fusesource.com
Web: fusesource.com
Twitter: jon_anstey
Blog: http://janstey.blogspot.com
Author of Camel in Action: http://manning.com/ibsen