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
<[email protected]> 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é <[email protected]> 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
> > <[email protected]> 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.

Reply via email to