You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Ephemeris Lappis <ep...@gmail.com> on 2022/08/16 07:27:47 UTC

Karaf 4.4.1 & ActiveMQ / How to ?

Hello.

I'm trying to install JMS and ActiveMQ features, considering an
external ActiveMQ 5.16.5 server.

I've tried installing first features :
feature:install jms
feature:install pax-jms-activemq

But the second command leads to an exception in the bundle
activemq-osgi for which Spring seems to be missing :
java.lang.ClassNotFoundException:
org.springframework.beans.factory.config.BeanFactoryPostProcessor not
found by org.apache.activemq.activemq-osgi [73]

And indeed the bundle 73 is failing :
73 | Failure  |  80 | 5.16.1             | activemq-osgi

I've installed Spring with :
feature:install spring

and after restarting the failing bundle, it seems ok :
73 | Active   |  80 | 5.16.1             | activemq-osgi

To be sure of my Karaf state, I've fully reinstalled it, and play the
spring install before the pax-jms-activemq, and all seems fine.

QUESTION : Is this missing feature a bug ?

Then I tried to create the connection factory, connecting to my
external ActiveMQ server :
jms:create -t activemq -u application -p secret --url
tcp://localhost:61616 my_amq

And checked the creation :
jms:connectionfactories
JMS Connection Factory
----------------------
jms/my_amq

And I also see created connections on the ActiveMQ server side.

I've also tried to send messages :
jms:send jms/my_amq test-queue-1 "TEST001"

And look at them :
jms:browse jms/my_amq test-queue-1
Message ID                                   | Content | Charset |
Type | Correlation ID | Delivery Mode | Destination          |
Expiration | Priority | Redelivered | ReplyTo | Timestamp
---------------------------------------------+---------+---------+------+----------------+---------------+----------------------+------------+----------+-------------+---------+------------------------------
ID:ITEM-S96181-64974-1660634559117-1:1:1:1:1 | TEST001 | UTF-8   |
 |                | Persistent    | queue://test-queue-1 | Never
| 4        | false       |         | Tue Aug 16 09:22:39 CEST 2022

All seems to work... But after some unknown time, or stopping-starting
my Karaf, no jms command works any more. The jms connection factory
doesn't appear...

QUESTION : What am I missing in my installation procedure ?

Thanks in advance for your help.

Regards.

Re: Karaf 4.4.1 & ActiveMQ / How to ?

Posted by Ephemeris Lappis <ep...@gmail.com>.
Hello again.

(sorry to answer twice...)

I've checked the imported packages and I can see that :
imports | grep org.springframework.beans.factory.config
org.springframework.beans.factory.config         | [4.0.0,5.0.0)  |
unresolved | 73 | org.apache.activemq.activemq-osgi

But for exported packages :
exports | grep org.springframework.beans.factory.config

No bundle seems to export the needed package...

Thanks again.

Regards.

Le mar. 16 août 2022 à 11:07, Jean-Baptiste Onofré <jb...@nanthrax.net> a écrit :
>
> Hi,
>
> you need to add spring-legacy features repository as ActiveMQ 5.16.x
> uses Spring 4.x.
>
> So, you have to do feature:repo-add spring-legacy (you don't have to
> install spring feature else it would be Spring 5.x).
>
> NB: ActiveMQ 5.17.x uses Spring 5.x so you don't need spring-legacy
> anymore with AMQ 5.17.x.
>
> Regards
> JB
>
> On Tue, Aug 16, 2022 at 9:27 AM Ephemeris Lappis
> <ep...@gmail.com> wrote:
> >
> > Hello.
> >
> > I'm trying to install JMS and ActiveMQ features, considering an
> > external ActiveMQ 5.16.5 server.
> >
> > I've tried installing first features :
> > feature:install jms
> > feature:install pax-jms-activemq
> >
> > But the second command leads to an exception in the bundle
> > activemq-osgi for which Spring seems to be missing :
> > java.lang.ClassNotFoundException:
> > org.springframework.beans.factory.config.BeanFactoryPostProcessor not
> > found by org.apache.activemq.activemq-osgi [73]
> >
> > And indeed the bundle 73 is failing :
> > 73 | Failure  |  80 | 5.16.1             | activemq-osgi
> >
> > I've installed Spring with :
> > feature:install spring
> >
> > and after restarting the failing bundle, it seems ok :
> > 73 | Active   |  80 | 5.16.1             | activemq-osgi
> >
> > To be sure of my Karaf state, I've fully reinstalled it, and play the
> > spring install before the pax-jms-activemq, and all seems fine.
> >
> > QUESTION : Is this missing feature a bug ?
> >
> > Then I tried to create the connection factory, connecting to my
> > external ActiveMQ server :
> > jms:create -t activemq -u application -p secret --url
> > tcp://localhost:61616 my_amq
> >
> > And checked the creation :
> > jms:connectionfactories
> > JMS Connection Factory
> > ----------------------
> > jms/my_amq
> >
> > And I also see created connections on the ActiveMQ server side.
> >
> > I've also tried to send messages :
> > jms:send jms/my_amq test-queue-1 "TEST001"
> >
> > And look at them :
> > jms:browse jms/my_amq test-queue-1
> > Message ID                                   | Content | Charset |
> > Type | Correlation ID | Delivery Mode | Destination          |
> > Expiration | Priority | Redelivered | ReplyTo | Timestamp
> > ---------------------------------------------+---------+---------+------+----------------+---------------+----------------------+------------+----------+-------------+---------+------------------------------
> > ID:ITEM-S96181-64974-1660634559117-1:1:1:1:1 | TEST001 | UTF-8   |
> >  |                | Persistent    | queue://test-queue-1 | Never
> > | 4        | false       |         | Tue Aug 16 09:22:39 CEST 2022
> >
> > All seems to work... But after some unknown time, or stopping-starting
> > my Karaf, no jms command works any more. The jms connection factory
> > doesn't appear...
> >
> > QUESTION : What am I missing in my installation procedure ?
> >
> > Thanks in advance for your help.
> >
> > Regards.

Re: Karaf 4.4.1 & ActiveMQ / How to ?

Posted by Ephemeris Lappis <ep...@gmail.com>.
Hello.

I've tried your commands for ActveMQ client installation, and it seems
to work fine. Thanks !!!

I've adapted a bit your commands and added 3 more commands to create
my connection factory :

# Installing ActiveMQ client and JMS features
feature:repo-add mvn:org.apache.karaf.features/spring-legacy/4.4.1/xml/features
feature:repo-add mvn:org.apache.activemq/activemq-karaf/5.16.5/xml/features
feature:install activemq-client
feature:install jms
feature:install pax-jms-activemq
# Creating a connection factory on external ActiveMQ broker
jms:create -t activemq -u application -p secret --url
tcp://localhost:61616 my_amq

Now I have an exception when I deploy my applicative feature with
Camel routes, using my own repository like that :

repo-add mvn:my.tests/my-test-26-karaf-2-routes/0.0.1-SNAPSHOT/XML/features
feature:install my-test-26-karaf-2-routes

My feature that includes my own bundle and a dependency on another
feature that pulls activemq-camel for my routes. They are defined with
these repository files :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0"
name="my-test-26-karaf-2-routes">
    <repository>mvn:my.tests/my-test-26-karaf-x-feature/0.0.1-SNAPSHOT/xml/features</repository>
    <feature name="my-test-26-karaf-2-routes-cfg"
description="Fifi-T26 :: Camel routes - Configuration"
version="0.0.1.SNAPSHOT">
        <details>Fifi-T26 :: Camel routes - Configuration</details>
        <configfile
finalname="/etc/my_test_26_karaf_2_routes.cfg">mvn:my.tests/my-test-26-karaf-2-routes/0.0.1-SNAPSHOT/cfg/configuration</configfile>
    </feature>
    <feature name="my-test-26-karaf-2-routes" description="Fifi-T26 ::
Camel" version="0.0.1.SNAPSHOT">
        <details>Fifi-T26 :: Camel routes</details>
        <feature version="0.0.1-SNAPSHOT">my-test-26-karaf-x-feature</feature>
        <feature version="0.0.1-SNAPSHOT"
prerequisite="true">my-test-26-karaf-2-routes-cfg</feature>
        <feature version="2.25.4">camel-csv</feature>
        <bundle>mvn:my.tests/my-test-26-karaf-2-routes/0.0.1-SNAPSHOT</bundle>
        <bundle>mvn:my.tests/my-test-26-karaf-1-api/0.0.1-SNAPSHOT</bundle>
    </feature>
</features>

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0"
name="my-test-26-karaf">
    <repository>mvn:org.apache.camel.karaf/apache-camel/2.25.4/xml/features</repository>
    <repository>mvn:org.apache.activemq/activemq-karaf/5.16.5/xml/features</repository>
    <feature name="my-test-26-karaf-x-feature" description="Fifi-T26
:: Feature" version="0.0.1.SNAPSHOT">
        <details>Fifi-T26 :: Feature Definition</details>
        <feature
version="0.0.1-SNAPSHOT">my-test-26-karaf-x-feature-activemq</feature>
        <feature version="2.25.4">camel-blueprint</feature>
        <feature version="2.25.4">camel-groovy</feature>
        <bundle>mvn:my.tests/my-test-26-karaf-1-service/0.0.1-SNAPSHOT</bundle>
        <bundle>mvn:my.tests/my-test-26-karaf-1-api/0.0.1-SNAPSHOT</bundle>
    </feature>
    <feature name="my-test-26-karaf-x-feature-activemq"
version="0.0.1.SNAPSHOT">
        <feature version="5.16.5">activemq-camel</feature>
    </feature>
</features>

And during the Camel context startup I have the following error, about
missing class "org/apache/camel/component/jms/JmsBinding"

09:16:07.232 INFO [features-3-thread-1] Using custom
UnitOfWorkFactory:
my.test.t26.uow.service.SpecialUnitOfWorkFactory@94f8d8d
09:16:07.378 INFO [features-3-thread-1] Blueprint bundle
my-test-26-karaf-2-routes/0.0.1.SNAPSHOT has been started
09:16:07.380 INFO [Blueprint Event Dispatcher: 1] Attempting to start
CamelContext: K1-Test
09:16:07.384 INFO [Blueprint Event Dispatcher: 1] Apache Camel 2.25.4
(CamelContext: K1-Test) is starting
09:16:07.388 INFO [Blueprint Event Dispatcher: 1] StreamCaching is
enabled on CamelContext: K1-Test
09:16:07.389 INFO [Blueprint Event Dispatcher: 1] MDC logging is
enabled on CamelContext: K1-Test
09:16:07.391 INFO [Blueprint Event Dispatcher: 1] JMX is enabled
09:16:07.666 WARN [Blueprint Event Dispatcher: 1] Ignoring converter
type: org.apache.activemq.camel.converter.ActiveMQMessageConverter as
a dependent class could not be found: java.lang.NoClassDefFoundError:
org/apache/camel/component/jms/JmsBinding
java.lang.NoClassDefFoundError: org/apache/camel/component/jms/JmsBinding

I don't understand what features are missing now.
The package seems to be exported by a started bundle, with the
matching Camel version :
org.apache.camel.component.jms                            | 2.25.4
    | 114 | org.apache.camel.camel-jms

But when I look at the imports of this package, I see a strange thing
: the bundle activemq-osgi seems to be installed twice now :
org.apache.camel.component.jms                   | [2.20.0,4.0.0)
   |            | 107 | org.apache.activemq.activemq-camel
org.apache.camel.component.jms                   | [2.20.0,4.0.0)
   | resolved   | 52  | org.apache.activemq.activemq-osgi
org.apache.camel.component.jms                   | [2.25.0,3.0.0)
   | resolved   | 108 | org.apache.activemq.activemq-osgi

The duplicated bundles :

 52 | Active   |  80 | 5.16.5             | activemq-osgi
108 | Active   |  80 | 5.16.1             | activemq-osgi

And the feature activemq-camel that I try to install as a dependency
from my feature can't resolve the JMS package 2.25.4 while it requires
[2.20.0,4.0.0), just like one of the activemq-osgi [52].

I don't understand why : with my previous commands for installing
ActiveMQ and JMS I had no JMS package issues...

Any idea about what I'm doing wrong ?

Thanks again.

Regards.

Le mar. 16 août 2022 à 16:10, Jean-Baptiste Onofré <jb...@nanthrax.net> a écrit :
>
> That's weird.
>
> Here's what I just did with Karaf 4.4.1 (on a fresh installation):
>
> - I tried the broker installation:
>
> karaf@root()> feature:repo-add spring-legacy
> Adding feature url
> mvn:org.apache.karaf.features/spring-legacy/4.4.1/xml/features
> karaf@root()> feature:repo-add activemq 5.16.5
> Adding feature url mvn:org.apache.activemq/activemq-karaf/5.16.5/xml/features
> karaf@root()> feature:install activemq-broker
>
> - I tried the client installation:
>
> karaf@root()> feature:repo-add spring-legacy
> Adding feature url
> mvn:org.apache.karaf.features/spring-legacy/4.4.1/xml/features
> karaf@root()> feature:repo-add activemq 5.16.5
> Adding feature url mvn:org.apache.activemq/activemq-karaf/5.16.5/xml/features
> karaf@root()> feature:install activemq-client
>
> So it works just fine.
>
> You can try this on a fresh install, I'm sure it works.
>
> Regards
> JB
>
> On Tue, Aug 16, 2022 at 11:20 AM Ephemeris Lappis
> <ep...@gmail.com> wrote:
> >
> > Hello.
> >
> > I've just tried it again on a clean empty Karaf, but it doesn't work :
> >
> > Adding the repo before installing the features leads to the same
> > exception about missing Spring class.
> >
> > The added repo for spring-legacy seems ok (is it the right version,
> > since I set none), but the class is still missing :
> >
> > repo-list
> > Repository                        | URL
> > ----------------------------------+---------------------------------------------------------------------------------------------
> > pax-jms-1.1.0                     |
> > mvn:org.ops4j.pax.jms/pax-jms-features/1.1.0/xml/features
> > org.ops4j.pax.jdbc-1.5.3          |
> > mvn:org.ops4j.pax.jdbc/pax-jdbc-features/1.5.3/xml/features
> > openjpa-3.2.2                     |
> > mvn:org.apache.openjpa/openjpa-features/3.2.2/xml/features
> > framework-4.4.1                   |
> > mvn:org.apache.karaf.features/framework/4.4.1/xml/features
> > aries-jpa-2.7.3                   |
> > mvn:org.apache.aries.jpa/jpa-features/2.7.3/xml/features
> > enterprise-4.4.1                  |
> > mvn:org.apache.karaf.features/enterprise/4.4.1/xml/features
> > spring-legacy-4.4.1               |
> > mvn:org.apache.karaf.features/spring-legacy/4.4.1/xml/features
> > pax-transx-0.5.0                  |
> > mvn:org.ops4j.pax.transx/pax-transx-features/0.5.0/xml/features
> > hibernate-validator-osgi-features |
> > mvn:org.hibernate.validator/hibernate-validator-osgi-karaf-features/7.0.2.Final/xml/features
> > org.ops4j.pax.web-8.0.6           |
> > mvn:org.ops4j.pax.web/pax-web-features/8.0.6/xml/features
> > spring-4.4.1                      |
> > mvn:org.apache.karaf.features/spring/4.4.1/xml/features
> > specs-4.4.1                       |
> > mvn:org.apache.karaf.features/specs/4.4.1/xml/features
> > standard-4.4.1                    |
> > mvn:org.apache.karaf.features/standard/4.4.1/xml/features
> > pax-transx-0.5.2                  |
> > mvn:org.ops4j.pax.transx/pax-transx-features/0.5.2/xml/features
> > org.ops4j.pax.cdi-1.1.4           |
> > mvn:org.ops4j.pax.cdi/pax-cdi-features/1.1.4/xml/features
> >
> > Is this the really right procedure to add ActiveMQ into my Karaf ?
> >
> > Thanks again.
> >
> > Regards.
> >
> > Le mar. 16 août 2022 à 11:07, Jean-Baptiste Onofré <jb...@nanthrax.net> a écrit :
> > >
> > > Hi,
> > >
> > > you need to add spring-legacy features repository as ActiveMQ 5.16.x
> > > uses Spring 4.x.
> > >
> > > So, you have to do feature:repo-add spring-legacy (you don't have to
> > > install spring feature else it would be Spring 5.x).
> > >
> > > NB: ActiveMQ 5.17.x uses Spring 5.x so you don't need spring-legacy
> > > anymore with AMQ 5.17.x.
> > >
> > > Regards
> > > JB
> > >
> > > On Tue, Aug 16, 2022 at 9:27 AM Ephemeris Lappis
> > > <ep...@gmail.com> wrote:
> > > >
> > > > Hello.
> > > >
> > > > I'm trying to install JMS and ActiveMQ features, considering an
> > > > external ActiveMQ 5.16.5 server.
> > > >
> > > > I've tried installing first features :
> > > > feature:install jms
> > > > feature:install pax-jms-activemq
> > > >
> > > > But the second command leads to an exception in the bundle
> > > > activemq-osgi for which Spring seems to be missing :
> > > > java.lang.ClassNotFoundException:
> > > > org.springframework.beans.factory.config.BeanFactoryPostProcessor not
> > > > found by org.apache.activemq.activemq-osgi [73]
> > > >
> > > > And indeed the bundle 73 is failing :
> > > > 73 | Failure  |  80 | 5.16.1             | activemq-osgi
> > > >
> > > > I've installed Spring with :
> > > > feature:install spring
> > > >
> > > > and after restarting the failing bundle, it seems ok :
> > > > 73 | Active   |  80 | 5.16.1             | activemq-osgi
> > > >
> > > > To be sure of my Karaf state, I've fully reinstalled it, and play the
> > > > spring install before the pax-jms-activemq, and all seems fine.
> > > >
> > > > QUESTION : Is this missing feature a bug ?
> > > >
> > > > Then I tried to create the connection factory, connecting to my
> > > > external ActiveMQ server :
> > > > jms:create -t activemq -u application -p secret --url
> > > > tcp://localhost:61616 my_amq
> > > >
> > > > And checked the creation :
> > > > jms:connectionfactories
> > > > JMS Connection Factory
> > > > ----------------------
> > > > jms/my_amq
> > > >
> > > > And I also see created connections on the ActiveMQ server side.
> > > >
> > > > I've also tried to send messages :
> > > > jms:send jms/my_amq test-queue-1 "TEST001"
> > > >
> > > > And look at them :
> > > > jms:browse jms/my_amq test-queue-1
> > > > Message ID                                   | Content | Charset |
> > > > Type | Correlation ID | Delivery Mode | Destination          |
> > > > Expiration | Priority | Redelivered | ReplyTo | Timestamp
> > > > ---------------------------------------------+---------+---------+------+----------------+---------------+----------------------+------------+----------+-------------+---------+------------------------------
> > > > ID:ITEM-S96181-64974-1660634559117-1:1:1:1:1 | TEST001 | UTF-8   |
> > > >  |                | Persistent    | queue://test-queue-1 | Never
> > > > | 4        | false       |         | Tue Aug 16 09:22:39 CEST 2022
> > > >
> > > > All seems to work... But after some unknown time, or stopping-starting
> > > > my Karaf, no jms command works any more. The jms connection factory
> > > > doesn't appear...
> > > >
> > > > QUESTION : What am I missing in my installation procedure ?
> > > >
> > > > Thanks in advance for your help.
> > > >
> > > > Regards.

Re: Karaf 4.4.1 & ActiveMQ / How to ?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

activemq-camel component has been removed. You should now use
camel-jms (or camel-activemq) directly provider by Camel.

And ActiveeMQ 5.17.1 works without problem: Karaf itself has itests
with ActiveMQ 5.17.x and I'm using it in production without problem.
So, probably something wrong on your environment. It's hard to say
without saying a test case to reproduce the issue.

Regards
JB

On Fri, Aug 19, 2022 at 2:55 PM Ephemeris Lappis
<ep...@gmail.com> wrote:
>
> Hello again !
>
> As I can't find a working solution with my ActiveMQ 5.16.5 I've changed to use 5.17.1 (this is also a good thing to use latest versions). I've upgraded my repo, features and bundles with this version of ActiveMQ, and now the Karaf level installation seems to be OK.
>
> But I have a new issue : the feature activemq-camel that comes with 5.17.1 doesn't provide anymore the camel component camel-activemq... I've been looking for a solution on this side, but did not get any...
>
> Asking for help on Camel's users group, a solution should be to change my routes to use camel-jms instead of camel-active-mq. But the jms component seems to ignore the unique default connection factory I've created, and ask for an explicit connection factory...
>
> An idea of the best way to integrate ActiveMQ and Camel on Karaf using their latest versions ???
> It seems very strange that these kind of features that worked very well for a long time on ServiceMix could not be working again, no ?
>
> Thanks in advance for any idea, feedback and so on.
>
> Regards.
>
>
>
> Le mar. 16 août 2022 à 16:10, Jean-Baptiste Onofré <jb...@nanthrax.net> a écrit :
>>
>> That's weird.
>>
>> Here's what I just did with Karaf 4.4.1 (on a fresh installation):
>>
>> - I tried the broker installation:
>>
>> karaf@root()> feature:repo-add spring-legacy
>> Adding feature url
>> mvn:org.apache.karaf.features/spring-legacy/4.4.1/xml/features
>> karaf@root()> feature:repo-add activemq 5.16.5
>> Adding feature url mvn:org.apache.activemq/activemq-karaf/5.16.5/xml/features
>> karaf@root()> feature:install activemq-broker
>>
>> - I tried the client installation:
>>
>> karaf@root()> feature:repo-add spring-legacy
>> Adding feature url
>> mvn:org.apache.karaf.features/spring-legacy/4.4.1/xml/features
>> karaf@root()> feature:repo-add activemq 5.16.5
>> Adding feature url mvn:org.apache.activemq/activemq-karaf/5.16.5/xml/features
>> karaf@root()> feature:install activemq-client
>>
>> So it works just fine.
>>
>> You can try this on a fresh install, I'm sure it works.
>>
>> Regards
>> JB
>>
>> On Tue, Aug 16, 2022 at 11:20 AM Ephemeris Lappis
>> <ep...@gmail.com> wrote:
>> >
>> > Hello.
>> >
>> > I've just tried it again on a clean empty Karaf, but it doesn't work :
>> >
>> > Adding the repo before installing the features leads to the same
>> > exception about missing Spring class.
>> >
>> > The added repo for spring-legacy seems ok (is it the right version,
>> > since I set none), but the class is still missing :
>> >
>> > repo-list
>> > Repository                        | URL
>> > ----------------------------------+---------------------------------------------------------------------------------------------
>> > pax-jms-1.1.0                     |
>> > mvn:org.ops4j.pax.jms/pax-jms-features/1.1.0/xml/features
>> > org.ops4j.pax.jdbc-1.5.3          |
>> > mvn:org.ops4j.pax.jdbc/pax-jdbc-features/1.5.3/xml/features
>> > openjpa-3.2.2                     |
>> > mvn:org.apache.openjpa/openjpa-features/3.2.2/xml/features
>> > framework-4.4.1                   |
>> > mvn:org.apache.karaf.features/framework/4.4.1/xml/features
>> > aries-jpa-2.7.3                   |
>> > mvn:org.apache.aries.jpa/jpa-features/2.7.3/xml/features
>> > enterprise-4.4.1                  |
>> > mvn:org.apache.karaf.features/enterprise/4.4.1/xml/features
>> > spring-legacy-4.4.1               |
>> > mvn:org.apache.karaf.features/spring-legacy/4.4.1/xml/features
>> > pax-transx-0.5.0                  |
>> > mvn:org.ops4j.pax.transx/pax-transx-features/0.5.0/xml/features
>> > hibernate-validator-osgi-features |
>> > mvn:org.hibernate.validator/hibernate-validator-osgi-karaf-features/7.0.2.Final/xml/features
>> > org.ops4j.pax.web-8.0.6           |
>> > mvn:org.ops4j.pax.web/pax-web-features/8.0.6/xml/features
>> > spring-4.4.1                      |
>> > mvn:org.apache.karaf.features/spring/4.4.1/xml/features
>> > specs-4.4.1                       |
>> > mvn:org.apache.karaf.features/specs/4.4.1/xml/features
>> > standard-4.4.1                    |
>> > mvn:org.apache.karaf.features/standard/4.4.1/xml/features
>> > pax-transx-0.5.2                  |
>> > mvn:org.ops4j.pax.transx/pax-transx-features/0.5.2/xml/features
>> > org.ops4j.pax.cdi-1.1.4           |
>> > mvn:org.ops4j.pax.cdi/pax-cdi-features/1.1.4/xml/features
>> >
>> > Is this the really right procedure to add ActiveMQ into my Karaf ?
>> >
>> > Thanks again.
>> >
>> > Regards.
>> >
>> > Le mar. 16 août 2022 à 11:07, Jean-Baptiste Onofré <jb...@nanthrax.net> a écrit :
>> > >
>> > > Hi,
>> > >
>> > > you need to add spring-legacy features repository as ActiveMQ 5.16.x
>> > > uses Spring 4.x.
>> > >
>> > > So, you have to do feature:repo-add spring-legacy (you don't have to
>> > > install spring feature else it would be Spring 5.x).
>> > >
>> > > NB: ActiveMQ 5.17.x uses Spring 5.x so you don't need spring-legacy
>> > > anymore with AMQ 5.17.x.
>> > >
>> > > Regards
>> > > JB
>> > >
>> > > On Tue, Aug 16, 2022 at 9:27 AM Ephemeris Lappis
>> > > <ep...@gmail.com> wrote:
>> > > >
>> > > > Hello.
>> > > >
>> > > > I'm trying to install JMS and ActiveMQ features, considering an
>> > > > external ActiveMQ 5.16.5 server.
>> > > >
>> > > > I've tried installing first features :
>> > > > feature:install jms
>> > > > feature:install pax-jms-activemq
>> > > >
>> > > > But the second command leads to an exception in the bundle
>> > > > activemq-osgi for which Spring seems to be missing :
>> > > > java.lang.ClassNotFoundException:
>> > > > org.springframework.beans.factory.config.BeanFactoryPostProcessor not
>> > > > found by org.apache.activemq.activemq-osgi [73]
>> > > >
>> > > > And indeed the bundle 73 is failing :
>> > > > 73 | Failure  |  80 | 5.16.1             | activemq-osgi
>> > > >
>> > > > I've installed Spring with :
>> > > > feature:install spring
>> > > >
>> > > > and after restarting the failing bundle, it seems ok :
>> > > > 73 | Active   |  80 | 5.16.1             | activemq-osgi
>> > > >
>> > > > To be sure of my Karaf state, I've fully reinstalled it, and play the
>> > > > spring install before the pax-jms-activemq, and all seems fine.
>> > > >
>> > > > QUESTION : Is this missing feature a bug ?
>> > > >
>> > > > Then I tried to create the connection factory, connecting to my
>> > > > external ActiveMQ server :
>> > > > jms:create -t activemq -u application -p secret --url
>> > > > tcp://localhost:61616 my_amq
>> > > >
>> > > > And checked the creation :
>> > > > jms:connectionfactories
>> > > > JMS Connection Factory
>> > > > ----------------------
>> > > > jms/my_amq
>> > > >
>> > > > And I also see created connections on the ActiveMQ server side.
>> > > >
>> > > > I've also tried to send messages :
>> > > > jms:send jms/my_amq test-queue-1 "TEST001"
>> > > >
>> > > > And look at them :
>> > > > jms:browse jms/my_amq test-queue-1
>> > > > Message ID                                   | Content | Charset |
>> > > > Type | Correlation ID | Delivery Mode | Destination          |
>> > > > Expiration | Priority | Redelivered | ReplyTo | Timestamp
>> > > > ---------------------------------------------+---------+---------+------+----------------+---------------+----------------------+------------+----------+-------------+---------+------------------------------
>> > > > ID:ITEM-S96181-64974-1660634559117-1:1:1:1:1 | TEST001 | UTF-8   |
>> > > >  |                | Persistent    | queue://test-queue-1 | Never
>> > > > | 4        | false       |         | Tue Aug 16 09:22:39 CEST 2022
>> > > >
>> > > > All seems to work... But after some unknown time, or stopping-starting
>> > > > my Karaf, no jms command works any more. The jms connection factory
>> > > > doesn't appear...
>> > > >
>> > > > QUESTION : What am I missing in my installation procedure ?
>> > > >
>> > > > Thanks in advance for your help.
>> > > >
>> > > > Regards.

Re: Karaf 4.4.1 & ActiveMQ / How to ?

Posted by Ephemeris Lappis <ep...@gmail.com>.
Hello again !

As I can't find a working solution with my ActiveMQ 5.16.5 I've changed to
use 5.17.1 (this is also a good thing to use latest versions). I've
upgraded my repo, features and bundles with this version of ActiveMQ, and
now the Karaf level installation seems to be OK.

But I have a new issue : the feature activemq-camel that comes with 5.17.1
doesn't provide anymore the camel component camel-activemq... I've been
looking for a solution on this side, but did not get any...

Asking for help on Camel's users group, a solution should be to change my
routes to use camel-jms instead of camel-active-mq. But the jms component
seems to ignore the unique default connection factory I've created, and ask
for an explicit connection factory...

An idea of the best way to integrate ActiveMQ and Camel on Karaf using
their latest versions ???
It seems very strange that these kind of features that worked very well for
a long time on ServiceMix could not be working again, no ?

Thanks in advance for any idea, feedback and so on.

Regards.



Le mar. 16 août 2022 à 16:10, Jean-Baptiste Onofré <jb...@nanthrax.net> a
écrit :

> That's weird.
>
> Here's what I just did with Karaf 4.4.1 (on a fresh installation):
>
> - I tried the broker installation:
>
> karaf@root()> feature:repo-add spring-legacy
> Adding feature url
> mvn:org.apache.karaf.features/spring-legacy/4.4.1/xml/features
> karaf@root()> feature:repo-add activemq 5.16.5
> Adding feature url
> mvn:org.apache.activemq/activemq-karaf/5.16.5/xml/features
> karaf@root()> feature:install activemq-broker
>
> - I tried the client installation:
>
> karaf@root()> feature:repo-add spring-legacy
> Adding feature url
> mvn:org.apache.karaf.features/spring-legacy/4.4.1/xml/features
> karaf@root()> feature:repo-add activemq 5.16.5
> Adding feature url
> mvn:org.apache.activemq/activemq-karaf/5.16.5/xml/features
> karaf@root()> feature:install activemq-client
>
> So it works just fine.
>
> You can try this on a fresh install, I'm sure it works.
>
> Regards
> JB
>
> On Tue, Aug 16, 2022 at 11:20 AM Ephemeris Lappis
> <ep...@gmail.com> wrote:
> >
> > Hello.
> >
> > I've just tried it again on a clean empty Karaf, but it doesn't work :
> >
> > Adding the repo before installing the features leads to the same
> > exception about missing Spring class.
> >
> > The added repo for spring-legacy seems ok (is it the right version,
> > since I set none), but the class is still missing :
> >
> > repo-list
> > Repository                        | URL
> >
> ----------------------------------+---------------------------------------------------------------------------------------------
> > pax-jms-1.1.0                     |
> > mvn:org.ops4j.pax.jms/pax-jms-features/1.1.0/xml/features
> > org.ops4j.pax.jdbc-1.5.3          |
> > mvn:org.ops4j.pax.jdbc/pax-jdbc-features/1.5.3/xml/features
> > openjpa-3.2.2                     |
> > mvn:org.apache.openjpa/openjpa-features/3.2.2/xml/features
> > framework-4.4.1                   |
> > mvn:org.apache.karaf.features/framework/4.4.1/xml/features
> > aries-jpa-2.7.3                   |
> > mvn:org.apache.aries.jpa/jpa-features/2.7.3/xml/features
> > enterprise-4.4.1                  |
> > mvn:org.apache.karaf.features/enterprise/4.4.1/xml/features
> > spring-legacy-4.4.1               |
> > mvn:org.apache.karaf.features/spring-legacy/4.4.1/xml/features
> > pax-transx-0.5.0                  |
> > mvn:org.ops4j.pax.transx/pax-transx-features/0.5.0/xml/features
> > hibernate-validator-osgi-features |
> >
> mvn:org.hibernate.validator/hibernate-validator-osgi-karaf-features/7.0.2.Final/xml/features
> > org.ops4j.pax.web-8.0.6           |
> > mvn:org.ops4j.pax.web/pax-web-features/8.0.6/xml/features
> > spring-4.4.1                      |
> > mvn:org.apache.karaf.features/spring/4.4.1/xml/features
> > specs-4.4.1                       |
> > mvn:org.apache.karaf.features/specs/4.4.1/xml/features
> > standard-4.4.1                    |
> > mvn:org.apache.karaf.features/standard/4.4.1/xml/features
> > pax-transx-0.5.2                  |
> > mvn:org.ops4j.pax.transx/pax-transx-features/0.5.2/xml/features
> > org.ops4j.pax.cdi-1.1.4           |
> > mvn:org.ops4j.pax.cdi/pax-cdi-features/1.1.4/xml/features
> >
> > Is this the really right procedure to add ActiveMQ into my Karaf ?
> >
> > Thanks again.
> >
> > Regards.
> >
> > Le mar. 16 août 2022 à 11:07, Jean-Baptiste Onofré <jb...@nanthrax.net> a
> écrit :
> > >
> > > Hi,
> > >
> > > you need to add spring-legacy features repository as ActiveMQ 5.16.x
> > > uses Spring 4.x.
> > >
> > > So, you have to do feature:repo-add spring-legacy (you don't have to
> > > install spring feature else it would be Spring 5.x).
> > >
> > > NB: ActiveMQ 5.17.x uses Spring 5.x so you don't need spring-legacy
> > > anymore with AMQ 5.17.x.
> > >
> > > Regards
> > > JB
> > >
> > > On Tue, Aug 16, 2022 at 9:27 AM Ephemeris Lappis
> > > <ep...@gmail.com> wrote:
> > > >
> > > > Hello.
> > > >
> > > > I'm trying to install JMS and ActiveMQ features, considering an
> > > > external ActiveMQ 5.16.5 server.
> > > >
> > > > I've tried installing first features :
> > > > feature:install jms
> > > > feature:install pax-jms-activemq
> > > >
> > > > But the second command leads to an exception in the bundle
> > > > activemq-osgi for which Spring seems to be missing :
> > > > java.lang.ClassNotFoundException:
> > > > org.springframework.beans.factory.config.BeanFactoryPostProcessor not
> > > > found by org.apache.activemq.activemq-osgi [73]
> > > >
> > > > And indeed the bundle 73 is failing :
> > > > 73 | Failure  |  80 | 5.16.1             | activemq-osgi
> > > >
> > > > I've installed Spring with :
> > > > feature:install spring
> > > >
> > > > and after restarting the failing bundle, it seems ok :
> > > > 73 | Active   |  80 | 5.16.1             | activemq-osgi
> > > >
> > > > To be sure of my Karaf state, I've fully reinstalled it, and play the
> > > > spring install before the pax-jms-activemq, and all seems fine.
> > > >
> > > > QUESTION : Is this missing feature a bug ?
> > > >
> > > > Then I tried to create the connection factory, connecting to my
> > > > external ActiveMQ server :
> > > > jms:create -t activemq -u application -p secret --url
> > > > tcp://localhost:61616 my_amq
> > > >
> > > > And checked the creation :
> > > > jms:connectionfactories
> > > > JMS Connection Factory
> > > > ----------------------
> > > > jms/my_amq
> > > >
> > > > And I also see created connections on the ActiveMQ server side.
> > > >
> > > > I've also tried to send messages :
> > > > jms:send jms/my_amq test-queue-1 "TEST001"
> > > >
> > > > And look at them :
> > > > jms:browse jms/my_amq test-queue-1
> > > > Message ID                                   | Content | Charset |
> > > > Type | Correlation ID | Delivery Mode | Destination          |
> > > > Expiration | Priority | Redelivered | ReplyTo | Timestamp
> > > >
> ---------------------------------------------+---------+---------+------+----------------+---------------+----------------------+------------+----------+-------------+---------+------------------------------
> > > > ID:ITEM-S96181-64974-1660634559117-1:1:1:1:1 | TEST001 | UTF-8   |
> > > >  |                | Persistent    | queue://test-queue-1 | Never
> > > > | 4        | false       |         | Tue Aug 16 09:22:39 CEST 2022
> > > >
> > > > All seems to work... But after some unknown time, or
> stopping-starting
> > > > my Karaf, no jms command works any more. The jms connection factory
> > > > doesn't appear...
> > > >
> > > > QUESTION : What am I missing in my installation procedure ?
> > > >
> > > > Thanks in advance for your help.
> > > >
> > > > Regards.
>

Re: Karaf 4.4.1 & ActiveMQ / How to ?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
That's weird.

Here's what I just did with Karaf 4.4.1 (on a fresh installation):

- I tried the broker installation:

karaf@root()> feature:repo-add spring-legacy
Adding feature url
mvn:org.apache.karaf.features/spring-legacy/4.4.1/xml/features
karaf@root()> feature:repo-add activemq 5.16.5
Adding feature url mvn:org.apache.activemq/activemq-karaf/5.16.5/xml/features
karaf@root()> feature:install activemq-broker

- I tried the client installation:

karaf@root()> feature:repo-add spring-legacy
Adding feature url
mvn:org.apache.karaf.features/spring-legacy/4.4.1/xml/features
karaf@root()> feature:repo-add activemq 5.16.5
Adding feature url mvn:org.apache.activemq/activemq-karaf/5.16.5/xml/features
karaf@root()> feature:install activemq-client

So it works just fine.

You can try this on a fresh install, I'm sure it works.

Regards
JB

On Tue, Aug 16, 2022 at 11:20 AM Ephemeris Lappis
<ep...@gmail.com> wrote:
>
> Hello.
>
> I've just tried it again on a clean empty Karaf, but it doesn't work :
>
> Adding the repo before installing the features leads to the same
> exception about missing Spring class.
>
> The added repo for spring-legacy seems ok (is it the right version,
> since I set none), but the class is still missing :
>
> repo-list
> Repository                        | URL
> ----------------------------------+---------------------------------------------------------------------------------------------
> pax-jms-1.1.0                     |
> mvn:org.ops4j.pax.jms/pax-jms-features/1.1.0/xml/features
> org.ops4j.pax.jdbc-1.5.3          |
> mvn:org.ops4j.pax.jdbc/pax-jdbc-features/1.5.3/xml/features
> openjpa-3.2.2                     |
> mvn:org.apache.openjpa/openjpa-features/3.2.2/xml/features
> framework-4.4.1                   |
> mvn:org.apache.karaf.features/framework/4.4.1/xml/features
> aries-jpa-2.7.3                   |
> mvn:org.apache.aries.jpa/jpa-features/2.7.3/xml/features
> enterprise-4.4.1                  |
> mvn:org.apache.karaf.features/enterprise/4.4.1/xml/features
> spring-legacy-4.4.1               |
> mvn:org.apache.karaf.features/spring-legacy/4.4.1/xml/features
> pax-transx-0.5.0                  |
> mvn:org.ops4j.pax.transx/pax-transx-features/0.5.0/xml/features
> hibernate-validator-osgi-features |
> mvn:org.hibernate.validator/hibernate-validator-osgi-karaf-features/7.0.2.Final/xml/features
> org.ops4j.pax.web-8.0.6           |
> mvn:org.ops4j.pax.web/pax-web-features/8.0.6/xml/features
> spring-4.4.1                      |
> mvn:org.apache.karaf.features/spring/4.4.1/xml/features
> specs-4.4.1                       |
> mvn:org.apache.karaf.features/specs/4.4.1/xml/features
> standard-4.4.1                    |
> mvn:org.apache.karaf.features/standard/4.4.1/xml/features
> pax-transx-0.5.2                  |
> mvn:org.ops4j.pax.transx/pax-transx-features/0.5.2/xml/features
> org.ops4j.pax.cdi-1.1.4           |
> mvn:org.ops4j.pax.cdi/pax-cdi-features/1.1.4/xml/features
>
> Is this the really right procedure to add ActiveMQ into my Karaf ?
>
> Thanks again.
>
> Regards.
>
> Le mar. 16 août 2022 à 11:07, Jean-Baptiste Onofré <jb...@nanthrax.net> a écrit :
> >
> > Hi,
> >
> > you need to add spring-legacy features repository as ActiveMQ 5.16.x
> > uses Spring 4.x.
> >
> > So, you have to do feature:repo-add spring-legacy (you don't have to
> > install spring feature else it would be Spring 5.x).
> >
> > NB: ActiveMQ 5.17.x uses Spring 5.x so you don't need spring-legacy
> > anymore with AMQ 5.17.x.
> >
> > Regards
> > JB
> >
> > On Tue, Aug 16, 2022 at 9:27 AM Ephemeris Lappis
> > <ep...@gmail.com> wrote:
> > >
> > > Hello.
> > >
> > > I'm trying to install JMS and ActiveMQ features, considering an
> > > external ActiveMQ 5.16.5 server.
> > >
> > > I've tried installing first features :
> > > feature:install jms
> > > feature:install pax-jms-activemq
> > >
> > > But the second command leads to an exception in the bundle
> > > activemq-osgi for which Spring seems to be missing :
> > > java.lang.ClassNotFoundException:
> > > org.springframework.beans.factory.config.BeanFactoryPostProcessor not
> > > found by org.apache.activemq.activemq-osgi [73]
> > >
> > > And indeed the bundle 73 is failing :
> > > 73 | Failure  |  80 | 5.16.1             | activemq-osgi
> > >
> > > I've installed Spring with :
> > > feature:install spring
> > >
> > > and after restarting the failing bundle, it seems ok :
> > > 73 | Active   |  80 | 5.16.1             | activemq-osgi
> > >
> > > To be sure of my Karaf state, I've fully reinstalled it, and play the
> > > spring install before the pax-jms-activemq, and all seems fine.
> > >
> > > QUESTION : Is this missing feature a bug ?
> > >
> > > Then I tried to create the connection factory, connecting to my
> > > external ActiveMQ server :
> > > jms:create -t activemq -u application -p secret --url
> > > tcp://localhost:61616 my_amq
> > >
> > > And checked the creation :
> > > jms:connectionfactories
> > > JMS Connection Factory
> > > ----------------------
> > > jms/my_amq
> > >
> > > And I also see created connections on the ActiveMQ server side.
> > >
> > > I've also tried to send messages :
> > > jms:send jms/my_amq test-queue-1 "TEST001"
> > >
> > > And look at them :
> > > jms:browse jms/my_amq test-queue-1
> > > Message ID                                   | Content | Charset |
> > > Type | Correlation ID | Delivery Mode | Destination          |
> > > Expiration | Priority | Redelivered | ReplyTo | Timestamp
> > > ---------------------------------------------+---------+---------+------+----------------+---------------+----------------------+------------+----------+-------------+---------+------------------------------
> > > ID:ITEM-S96181-64974-1660634559117-1:1:1:1:1 | TEST001 | UTF-8   |
> > >  |                | Persistent    | queue://test-queue-1 | Never
> > > | 4        | false       |         | Tue Aug 16 09:22:39 CEST 2022
> > >
> > > All seems to work... But after some unknown time, or stopping-starting
> > > my Karaf, no jms command works any more. The jms connection factory
> > > doesn't appear...
> > >
> > > QUESTION : What am I missing in my installation procedure ?
> > >
> > > Thanks in advance for your help.
> > >
> > > Regards.

Re: Karaf 4.4.1 & ActiveMQ / How to ?

Posted by Ephemeris Lappis <ep...@gmail.com>.
Hello.

I've just tried it again on a clean empty Karaf, but it doesn't work :

Adding the repo before installing the features leads to the same
exception about missing Spring class.

The added repo for spring-legacy seems ok (is it the right version,
since I set none), but the class is still missing :

repo-list
Repository                        | URL
----------------------------------+---------------------------------------------------------------------------------------------
pax-jms-1.1.0                     |
mvn:org.ops4j.pax.jms/pax-jms-features/1.1.0/xml/features
org.ops4j.pax.jdbc-1.5.3          |
mvn:org.ops4j.pax.jdbc/pax-jdbc-features/1.5.3/xml/features
openjpa-3.2.2                     |
mvn:org.apache.openjpa/openjpa-features/3.2.2/xml/features
framework-4.4.1                   |
mvn:org.apache.karaf.features/framework/4.4.1/xml/features
aries-jpa-2.7.3                   |
mvn:org.apache.aries.jpa/jpa-features/2.7.3/xml/features
enterprise-4.4.1                  |
mvn:org.apache.karaf.features/enterprise/4.4.1/xml/features
spring-legacy-4.4.1               |
mvn:org.apache.karaf.features/spring-legacy/4.4.1/xml/features
pax-transx-0.5.0                  |
mvn:org.ops4j.pax.transx/pax-transx-features/0.5.0/xml/features
hibernate-validator-osgi-features |
mvn:org.hibernate.validator/hibernate-validator-osgi-karaf-features/7.0.2.Final/xml/features
org.ops4j.pax.web-8.0.6           |
mvn:org.ops4j.pax.web/pax-web-features/8.0.6/xml/features
spring-4.4.1                      |
mvn:org.apache.karaf.features/spring/4.4.1/xml/features
specs-4.4.1                       |
mvn:org.apache.karaf.features/specs/4.4.1/xml/features
standard-4.4.1                    |
mvn:org.apache.karaf.features/standard/4.4.1/xml/features
pax-transx-0.5.2                  |
mvn:org.ops4j.pax.transx/pax-transx-features/0.5.2/xml/features
org.ops4j.pax.cdi-1.1.4           |
mvn:org.ops4j.pax.cdi/pax-cdi-features/1.1.4/xml/features

Is this the really right procedure to add ActiveMQ into my Karaf ?

Thanks again.

Regards.

Le mar. 16 août 2022 à 11:07, Jean-Baptiste Onofré <jb...@nanthrax.net> a écrit :
>
> Hi,
>
> you need to add spring-legacy features repository as ActiveMQ 5.16.x
> uses Spring 4.x.
>
> So, you have to do feature:repo-add spring-legacy (you don't have to
> install spring feature else it would be Spring 5.x).
>
> NB: ActiveMQ 5.17.x uses Spring 5.x so you don't need spring-legacy
> anymore with AMQ 5.17.x.
>
> Regards
> JB
>
> On Tue, Aug 16, 2022 at 9:27 AM Ephemeris Lappis
> <ep...@gmail.com> wrote:
> >
> > Hello.
> >
> > I'm trying to install JMS and ActiveMQ features, considering an
> > external ActiveMQ 5.16.5 server.
> >
> > I've tried installing first features :
> > feature:install jms
> > feature:install pax-jms-activemq
> >
> > But the second command leads to an exception in the bundle
> > activemq-osgi for which Spring seems to be missing :
> > java.lang.ClassNotFoundException:
> > org.springframework.beans.factory.config.BeanFactoryPostProcessor not
> > found by org.apache.activemq.activemq-osgi [73]
> >
> > And indeed the bundle 73 is failing :
> > 73 | Failure  |  80 | 5.16.1             | activemq-osgi
> >
> > I've installed Spring with :
> > feature:install spring
> >
> > and after restarting the failing bundle, it seems ok :
> > 73 | Active   |  80 | 5.16.1             | activemq-osgi
> >
> > To be sure of my Karaf state, I've fully reinstalled it, and play the
> > spring install before the pax-jms-activemq, and all seems fine.
> >
> > QUESTION : Is this missing feature a bug ?
> >
> > Then I tried to create the connection factory, connecting to my
> > external ActiveMQ server :
> > jms:create -t activemq -u application -p secret --url
> > tcp://localhost:61616 my_amq
> >
> > And checked the creation :
> > jms:connectionfactories
> > JMS Connection Factory
> > ----------------------
> > jms/my_amq
> >
> > And I also see created connections on the ActiveMQ server side.
> >
> > I've also tried to send messages :
> > jms:send jms/my_amq test-queue-1 "TEST001"
> >
> > And look at them :
> > jms:browse jms/my_amq test-queue-1
> > Message ID                                   | Content | Charset |
> > Type | Correlation ID | Delivery Mode | Destination          |
> > Expiration | Priority | Redelivered | ReplyTo | Timestamp
> > ---------------------------------------------+---------+---------+------+----------------+---------------+----------------------+------------+----------+-------------+---------+------------------------------
> > ID:ITEM-S96181-64974-1660634559117-1:1:1:1:1 | TEST001 | UTF-8   |
> >  |                | Persistent    | queue://test-queue-1 | Never
> > | 4        | false       |         | Tue Aug 16 09:22:39 CEST 2022
> >
> > All seems to work... But after some unknown time, or stopping-starting
> > my Karaf, no jms command works any more. The jms connection factory
> > doesn't appear...
> >
> > QUESTION : What am I missing in my installation procedure ?
> >
> > Thanks in advance for your help.
> >
> > Regards.

Re: Karaf 4.4.1 & ActiveMQ / How to ?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

you need to add spring-legacy features repository as ActiveMQ 5.16.x
uses Spring 4.x.

So, you have to do feature:repo-add spring-legacy (you don't have to
install spring feature else it would be Spring 5.x).

NB: ActiveMQ 5.17.x uses Spring 5.x so you don't need spring-legacy
anymore with AMQ 5.17.x.

Regards
JB

On Tue, Aug 16, 2022 at 9:27 AM Ephemeris Lappis
<ep...@gmail.com> wrote:
>
> Hello.
>
> I'm trying to install JMS and ActiveMQ features, considering an
> external ActiveMQ 5.16.5 server.
>
> I've tried installing first features :
> feature:install jms
> feature:install pax-jms-activemq
>
> But the second command leads to an exception in the bundle
> activemq-osgi for which Spring seems to be missing :
> java.lang.ClassNotFoundException:
> org.springframework.beans.factory.config.BeanFactoryPostProcessor not
> found by org.apache.activemq.activemq-osgi [73]
>
> And indeed the bundle 73 is failing :
> 73 | Failure  |  80 | 5.16.1             | activemq-osgi
>
> I've installed Spring with :
> feature:install spring
>
> and after restarting the failing bundle, it seems ok :
> 73 | Active   |  80 | 5.16.1             | activemq-osgi
>
> To be sure of my Karaf state, I've fully reinstalled it, and play the
> spring install before the pax-jms-activemq, and all seems fine.
>
> QUESTION : Is this missing feature a bug ?
>
> Then I tried to create the connection factory, connecting to my
> external ActiveMQ server :
> jms:create -t activemq -u application -p secret --url
> tcp://localhost:61616 my_amq
>
> And checked the creation :
> jms:connectionfactories
> JMS Connection Factory
> ----------------------
> jms/my_amq
>
> And I also see created connections on the ActiveMQ server side.
>
> I've also tried to send messages :
> jms:send jms/my_amq test-queue-1 "TEST001"
>
> And look at them :
> jms:browse jms/my_amq test-queue-1
> Message ID                                   | Content | Charset |
> Type | Correlation ID | Delivery Mode | Destination          |
> Expiration | Priority | Redelivered | ReplyTo | Timestamp
> ---------------------------------------------+---------+---------+------+----------------+---------------+----------------------+------------+----------+-------------+---------+------------------------------
> ID:ITEM-S96181-64974-1660634559117-1:1:1:1:1 | TEST001 | UTF-8   |
>  |                | Persistent    | queue://test-queue-1 | Never
> | 4        | false       |         | Tue Aug 16 09:22:39 CEST 2022
>
> All seems to work... But after some unknown time, or stopping-starting
> my Karaf, no jms command works any more. The jms connection factory
> doesn't appear...
>
> QUESTION : What am I missing in my installation procedure ?
>
> Thanks in advance for your help.
>
> Regards.