OSGi Integration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

OSGi Integration

dejanb
Hi all,

just put up an article explaining how to deploy and run ActiveMQ broker and
web console in Apache Karaf and ServiceMix.

http://www.nighttale.net/activemq/activemq-osgi-integration.html

Cheers
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net
Reply | Threaded
Open this post in threaded view
|

Re: OSGi Integration

srinidandi
Hi,

I am trying to make ActiveMQ + camel work with Apache Felix Karaf 1.2.0, and for this have deployed activemq and its dependencies in Karaf.

I have set up a simple camel route using spring dsl that reads a queue and writes it to a bean as below.

<route>
      <from uri="activemq:queue:example.A" />
      <to uri="bean:myMessageHandler?method=handleMessage" />
</route> 

and have also defined the activemq bean in the same xml as below

<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
 <property name="brokerURL" value="tcp://localhost:61616"/>
</bean>

On deploying the application bundle (the bundle has the activenmq related package in the import) I get the following exception at run time.


karaf@root> Exception in thread "SpringOsgiExtenderThread-4" org.springframework
.beans.factory.BeanCreationException: Error creating bean with name 'activemq' d
efined in URL [bundle://384.0:0/META-INF/spring/camelContext.xml]: Error setting
 property values; nested exception is org.springframework.beans.PropertyBatchUpd
ateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException:
Property 'brokerURL' threw exception; nested exception is java.lang.NoClassDefFo
undError: org/springframework/context/Lifecycle


Can you please let me know if I am missing anything?

Thanks
   
Dejan Bosanac wrote
Hi all,

just put up an article explaining how to deploy and run ActiveMQ broker and
web console in Apache Karaf and ServiceMix.

http://www.nighttale.net/activemq/activemq-osgi-integration.html

Cheers
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


-----
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net
Reply | Threaded
Open this post in threaded view
|

Re: OSGi Integration

Guillaume Nodet-4
Could you try to run the following command:
   features:install spring-dm
then restart (to make sure all optional imports on spring are wired correctly).

On Wed, Feb 10, 2010 at 13:40, srinidandi
<[hidden email]> wrote:

>
> Hi,
>
> I am trying to make ActiveMQ + camel work with Apache Felix Karaf 1.2.0, and
> for this have deployed activemq and its dependencies in Karaf.
>
> I have set up a simple camel route using spring dsl that reads a queue and
> writes it to a bean as below.
>
> <route>
>      <from uri="activemq:queue:example.A" />
>      <to uri="bean:myMessageHandler?method=handleMessage" />
> </route>
>
> and have also defined the activemq bean in the same xml as below
>
> <bean id="activemq"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>  <property name="brokerURL" value="tcp://localhost:61616"/>
> </bean>
>
> On deploying the application bundle (the bundle has the activenmq related
> package in the import) I get the following exception at run time.
>
>
> karaf@root> Exception in thread "SpringOsgiExtenderThread-4"
> org.springframework
> .beans.factory.BeanCreationException: Error creating bean with name
> 'activemq' d
> efined in URL [bundle://384.0:0/META-INF/spring/camelContext.xml]: Error
> setting
>  property values; nested exception is
> org.springframework.beans.PropertyBatchUpd
> ateException; nested PropertyAccessExceptions (1) are:
> PropertyAccessException 1:
> org.springframework.beans.MethodInvocationException:
> Property 'brokerURL' threw exception; nested exception is
> java.lang.NoClassDefFo
> undError: org/springframework/context/Lifecycle
>
>
> Can you please let me know if I am missing anything?
>
> Thanks
>
>
> Dejan Bosanac wrote:
>>
>> Hi all,
>>
>> just put up an article explaining how to deploy and run ActiveMQ broker
>> and
>> web console in Apache Karaf and ServiceMix.
>>
>> http://www.nighttale.net/activemq/activemq-osgi-integration.html
>>
>> Cheers
>> --
>> Dejan Bosanac
>>
>> Open Source Integration - http://fusesource.com/
>> ActiveMQ in Action - http://www.manning.com/snyder/
>> Blog - http://www.nighttale.net
>>
>>
>> -----
>> Dejan Bosanac
>>
>> Open Source Integration - http://fusesource.com/
>> ActiveMQ in Action - http://www.manning.com/snyder/
>> Blog - http://www.nighttale.net
>>
>
> --
> View this message in context: http://old.nabble.com/OSGi-Integration-tp23963942p27530587.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
>



--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com
Reply | Threaded
Open this post in threaded view
|

Re: OSGi Integration

srinidandi
have already run the command before deploying the application bundle in Karaf.. any other feature(s) I need to install to get this working?

Thanks    


gnodet wrote
Could you try to run the following command:
   features:install spring-dm
then restart (to make sure all optional imports on spring are wired correctly).

On Wed, Feb 10, 2010 at 13:40, srinidandi
<shrinivas.dandibhotla@corpus.com> wrote:
>
> Hi,
>
> I am trying to make ActiveMQ + camel work with Apache Felix Karaf 1.2.0, and
> for this have deployed activemq and its dependencies in Karaf.
>
> I have set up a simple camel route using spring dsl that reads a queue and
> writes it to a bean as below.
>
> <route>
>      <from uri="activemq:queue:example.A" />
>      <to uri="bean:myMessageHandler?method=handleMessage" />
> </route>
>
> and have also defined the activemq bean in the same xml as below
>
> <bean id="activemq"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>  <property name="brokerURL" value="tcp://localhost:61616"/>
> </bean>
>
> On deploying the application bundle (the bundle has the activenmq related
> package in the import) I get the following exception at run time.
>
>
> karaf@root> Exception in thread "SpringOsgiExtenderThread-4"
> org.springframework
> .beans.factory.BeanCreationException: Error creating bean with name
> 'activemq' d
> efined in URL [bundle://384.0:0/META-INF/spring/camelContext.xml]: Error
> setting
>  property values; nested exception is
> org.springframework.beans.PropertyBatchUpd
> ateException; nested PropertyAccessExceptions (1) are:
> PropertyAccessException 1:
> org.springframework.beans.MethodInvocationException:
> Property 'brokerURL' threw exception; nested exception is
> java.lang.NoClassDefFo
> undError: org/springframework/context/Lifecycle
>
>
> Can you please let me know if I am missing anything?
>
> Thanks
>
>
> Dejan Bosanac wrote:
>>
>> Hi all,
>>
>> just put up an article explaining how to deploy and run ActiveMQ broker
>> and
>> web console in Apache Karaf and ServiceMix.
>>
>> http://www.nighttale.net/activemq/activemq-osgi-integration.html
>>
>> Cheers
>> --
>> Dejan Bosanac
>>
>> Open Source Integration - http://fusesource.com/
>> ActiveMQ in Action - http://www.manning.com/snyder/
>> Blog - http://www.nighttale.net
>>
>>
>> -----
>> Dejan Bosanac
>>
>> Open Source Integration - http://fusesource.com/
>> ActiveMQ in Action - http://www.manning.com/snyder/
>> Blog - http://www.nighttale.net
>>
>
> --
> View this message in context: http://old.nabble.com/OSGi-Integration-tp23963942p27530587.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
>



--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com
Reply | Threaded
Open this post in threaded view
|

Re: OSGi Integration

dejanb
You can check out new ActiveMQ karaf feature

https://repository.apache.org/content/repositories/snapshots/org/apache/activemq/activemq-karaf/5.4-SNAPSHOT/

it contains everything you need to install and start activemq inside karaf.

Once properly set, you can use

features:install activemq
features:install pax-web
features:install activemq-web-console

Proper documentation is still pending though.

Cheers
--
Dejan Bosanac - http://twitter.com/dejanb

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Wed, Feb 10, 2010 at 2:11 PM, srinidandi <
[hidden email]> wrote:

>
> have already run the command before deploying the application bundle in
> Karaf.. any other feature(s) I need to install to get this working?
>
> Thanks
>
>
>
> gnodet wrote:
> >
> > Could you try to run the following command:
> >    features:install spring-dm
> > then restart (to make sure all optional imports on spring are wired
> > correctly).
> >
> > On Wed, Feb 10, 2010 at 13:40, srinidandi
> > <[hidden email]> wrote:
> >>
> >> Hi,
> >>
> >> I am trying to make ActiveMQ + camel work with Apache Felix Karaf 1.2.0,
> >> and
> >> for this have deployed activemq and its dependencies in Karaf.
> >>
> >> I have set up a simple camel route using spring dsl that reads a queue
> >> and
> >> writes it to a bean as below.
> >>
> >> <route>
> >>      <from uri="activemq:queue:example.A" />
> >>      <to uri="bean:myMessageHandler?method=handleMessage" />
> >> </route>
> >>
> >> and have also defined the activemq bean in the same xml as below
> >>
> >> <bean id="activemq"
> >> class="org.apache.activemq.camel.component.ActiveMQComponent">
> >>  <property name="brokerURL" value="tcp://localhost:61616"/>
> >> </bean>
> >>
> >> On deploying the application bundle (the bundle has the activenmq
> related
> >> package in the import) I get the following exception at run time.
> >>
> >>
> >> karaf@root> Exception in thread "SpringOsgiExtenderThread-4"
> >> org.springframework
> >> .beans.factory.BeanCreationException: Error creating bean with name
> >> 'activemq' d
> >> efined in URL [bundle://384.0:0/META-INF/spring/camelContext.xml]: Error
> >> setting
> >>  property values; nested exception is
> >> org.springframework.beans.PropertyBatchUpd
> >> ateException; nested PropertyAccessExceptions (1) are:
> >> PropertyAccessException 1:
> >> org.springframework.beans.MethodInvocationException:
> >> Property 'brokerURL' threw exception; nested exception is
> >> java.lang.NoClassDefFo
> >> undError: org/springframework/context/Lifecycle
> >>
> >>
> >> Can you please let me know if I am missing anything?
> >>
> >> Thanks
> >>
> >>
> >> Dejan Bosanac wrote:
> >>>
> >>> Hi all,
> >>>
> >>> just put up an article explaining how to deploy and run ActiveMQ broker
> >>> and
> >>> web console in Apache Karaf and ServiceMix.
> >>>
> >>> http://www.nighttale.net/activemq/activemq-osgi-integration.html
> >>>
> >>> Cheers
> >>> --
> >>> Dejan Bosanac
> >>>
> >>> Open Source Integration - http://fusesource.com/
> >>> ActiveMQ in Action - http://www.manning.com/snyder/
> >>> Blog - http://www.nighttale.net
> >>>
> >>>
> >>> -----
> >>> Dejan Bosanac
> >>>
> >>> Open Source Integration - http://fusesource.com/
> >>> ActiveMQ in Action - http://www.manning.com/snyder/
> >>> Blog - http://www.nighttale.net
> >>>
> >>
> >> --
> >> View this message in context:
> >> http://old.nabble.com/OSGi-Integration-tp23963942p27530587.html
> >> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> > ------------------------
> > Open Source SOA
> > http://fusesource.com
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/OSGi-Integration-tp23963942p27530949.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
>