Re: How do I load configuration within a shell command?

2022-05-12 Thread Jean-Baptiste Onofré
Hi Paul,

Not sure I understand exactly the request, but you can do:

config:edit pid
config:property-list ...
config:cancel | config:commit

Regards
JB

On Thu, May 12, 2022 at 6:38 PM Paul Spencer  wrote:
>
> Karaf 4.3.6
> I am looking to load configuration into a shell command, but I do not see 
> where to set the configuration PID nor do I see where the configuration is 
> passed or injected into the Action class.
>
>
> In a component, the configuration loaded by @Activate is defined by 
> @Component and the configurationPid attribute. What are the equivalents for 
> shell commands, class that implement org.apache.karaf.shell.api.action.Action?
>
> Paul Spencer


How do I load configuration within a shell command?

2022-05-12 Thread Paul Spencer
Karaf 4.3.6
I am looking to load configuration into a shell command, but I do not see where 
to set the configuration PID nor do I see where the configuration is passed or 
injected into the Action class.


In a component, the configuration loaded by @Activate is defined by @Component 
and the configurationPid attribute. What are the equivalents for shell 
commands, class that implement org.apache.karaf.shell.api.action.Action?

Paul Spencer

Re: AW: Problems setting up Karaf with ActiveMQ and Blueprint

2022-05-12 Thread Jean-Baptiste Onofré
Did you see my previous email ? About the topic/queue name format ?

Regards
JB

On Thu, May 12, 2022 at 6:08 PM Steuer Heribert  wrote:
>
> Hello Martin,
>
> unfortunately this is not the case.  We do not use maven projects but install 
> features in Karaf directly. The ones we use are:
>
> feature:install activemq-broker
> feature:install camel-jms
> feature:install camel-blueprint
>
> Also tried adding camel-activemq feature without success.
>
>
> Cheers,
> Heri
>
> 
> Von: Martin Lichtin 
> Gesendet: Donnerstag, 12. Mai 2022 17:52
> An: Steuer Heribert ; user@karaf.apache.org 
> 
> Betreff: Re: AW: Problems setting up Karaf with ActiveMQ and Blueprint
>
>
> Hi Heri
>
>
> The dreaded
>
>
> IllegalArgumentException: wrong number of arguments
>
>
> happens because your're using the Camel ActiveMQ component from "activemq", 
> but with Camel 3 you need to use the component as provided by Camel
>
> So instead of
>
>
> 
>   org.apache.activemq
>   activemq-camel
> 
>
> use
>
>
> 
>   org.apache.camel
>   camel-activemq
> 
>
>
> - Martin
>
>
> On 05/05/2022 15:13, Steuer Heribert wrote:
>
> Hello Karsten,
>
> thanks for you reply. The default rollout already provides the file 
> ${KARAF_BASE}/etc/org.apache.activemq.server-default.cfg which is also 
> mentioned
> in the documentation at https://activemq.apache.org/osgi-integration.html.  
> Also, the activemq.xml file is present in the etc directory and looks okay 
> for me (compared to the one in Servicemix).
> Both files are default and I did not touch them.
>
> Walking through e.g. http://liquid-reality.de/Karaf-Tutorial/05/ leads to the 
> same issue.
>
> Would be great if you could point me to the right direction ...
>
>
> Cheers,
> Heri
>
>
>
> 
> Von: Karsten Blume 
> Gesendet: Donnerstag, 5. Mai 2022 12:18
> An: user@karaf.apache.org 
> Betreff: AW: Problems setting up Karaf with ActiveMQ and Blueprint
>
>
> Hello Heribert,
>
> You need to use the endpoint or the component parameters to define the broker 
> (URL, user, pwd,…).
>
>
>
> You could configure the AMQ component as bean including the above parameters, 
> then all “activemq” endpoints in your context use this.
>
> Or you define all the parameters in the endpoint URL.
>
> The camel and karaf examples for AMQ should give a direction.
>
> BR
>
> Karsten
>
>
>
> Von: Steuer Heribert 
> Gesendet: Donnerstag, 5. Mai 2022 11:41
> An: user@karaf.apache.org
> Betreff: AW: Problems setting up Karaf with ActiveMQ and Blueprint
>
>
>
> Hello Erne,
>
>
>
> thanks for your answer. I tried that already which leads to the same 
> exception (see below), just the endpoint looks a little bit different now.
>
>
>
>
>
> 11:38:38.860 ERROR [Blueprint Event Dispatcher: 1] Error occurred during 
> starting CamelContext: camel-6
>
> org.apache.camel.FailedToCreateRouteException: Failed to create route test: 
> Route(test)[From[activemq:queue:in] -> [Log[PROCESSED MESSAG... because of 
> Failed to resolve endpoint: activemq://queue:in due to: 
> java.lang.IllegalArgumentException: wrong number of arguments
>
>
>
>
>
> Any other ideas?
>
>
>
> Cheers,
>
> Heri
>
>
>
> 
>
> Von: Tasi, Erne 
> Gesendet: Donnerstag, 5. Mai 2022 11:09
> An: user@karaf.apache.org 
> Betreff: AW: Problems setting up Karaf with ActiveMQ and Blueprint
>
>
>
> Sorry, the correct URL to the Documentation would be ActiveMQ :: Apache Camel.
>
> At first I could not send the previous mail and afterwards something went 
> wrong as I copy-pasted my original answer.
>
>
>
> Cheers,
>
> Erne
>
>
>
> Von: Tasi, Erne
> Gesendet: Donnerstag, 5. Mai 2022 10:42
> An: user@karaf.apache.org
> Betreff: AW: Problems setting up Karaf with ActiveMQ and Blueprint
>
>
>
> Hi Heri,
>
>
>
> As the Exception states you did not provide all the needed arguments in you=  
> from and to statements.
>
> According to the documentation ActiveMQ :: Apache Camel e.org/components/3.16.x/activemq-component.html> your Route would have to 
> look something like this:
>
>
>
>   
>
> 
>
> 
>
> 
>
>   
>
>
>
> Best Regards,
>
> Erne
>
>
>
>
>
> Von: Steuer Heribert [mailto:ste...@patronas.com]
> Gesendet: Donnerstag, 5. Mai 2022 09:57
> An: user@karaf.apache.org
> Betreff: Problems setting up Karaf with ActiveMQ and Blueprint
>
>
>
> Hello,
>
>
>
> we are currently trying to upgrade a couple of old Apache Servicemix 
> installations which came pre-bundled with Karaf, ActiveMQ, Camel and 
> Blueprint support. As it seems that Servicemix is no
>
> longer maintained, I would like to set up a similar instance with Karaf and 
> the appropriate bundles.
>
>
>
> Setup: Karaf 4.3.7 running on openjdk version "17.0.1" 2021-10-19
>
>
>
> On a freshly unpacked Karaf instance, I execute the following commands:
>
>
>
> feature:repo-add activemq 5.16.4
>
> feature:repo-add camel 3.16.0
>
> feature:repo-refresh
>

AW: AW: Problems setting up Karaf with ActiveMQ and Blueprint

2022-05-12 Thread Steuer Heribert
Hello Martin,

unfortunately this is not the case.  We do not use maven projects but install 
features in Karaf directly. The ones we use are:

feature:install activemq-broker
feature:install camel-jms
feature:install camel-blueprint

Also tried adding camel-activemq feature without success.


Cheers,
Heri


Von: Martin Lichtin 
Gesendet: Donnerstag, 12. Mai 2022 17:52
An: Steuer Heribert ; user@karaf.apache.org 

Betreff: Re: AW: Problems setting up Karaf with ActiveMQ and Blueprint


Hi Heri


The dreaded


IllegalArgumentException: wrong number of arguments


happens because your're using the Camel ActiveMQ component from "activemq", but 
with Camel 3 you need to use the component as provided by Camel

So instead of



  org.apache.activemq
  activemq-camel



use



  org.apache.camel
  camel-activemq



- Martin


On 05/05/2022 15:13, Steuer Heribert wrote:
Hello Karsten,

thanks for you reply. The default rollout already provides the file 
${KARAF_BASE}/etc/org.apache.activemq.server-default.cfg which is also mentioned
in the documentation at https://activemq.apache.org/osgi-integration.html.  
Also, the activemq.xml file is present in the etc directory and looks okay for 
me (compared to the one in Servicemix).
Both files are default and I did not touch them.

Walking through e.g. http://liquid-reality.de/Karaf-Tutorial/05/ leads to the 
same issue.

Would be great if you could point me to the right direction ...


Cheers,
Heri




Von: Karsten Blume 
Gesendet: Donnerstag, 5. Mai 2022 12:18
An: user@karaf.apache.org 

Betreff: AW: Problems setting up Karaf with ActiveMQ and Blueprint


Hello Heribert,

You need to use the endpoint or the component parameters to define the broker 
(URL, user, pwd,…).



You could configure the AMQ component as bean including the above parameters, 
then all “activemq” endpoints in your context use this.

Or you define all the parameters in the endpoint URL.

The camel and karaf examples for AMQ should give a direction.

BR

Karsten



Von: Steuer Heribert 
Gesendet: Donnerstag, 5. Mai 2022 11:41
An: user@karaf.apache.org
Betreff: AW: Problems setting up Karaf with ActiveMQ and Blueprint



Hello Erne,



thanks for your answer. I tried that already which leads to the same exception 
(see below), just the endpoint looks a little bit different now.





11:38:38.860 ERROR [Blueprint Event Dispatcher: 1] Error occurred during 
starting CamelContext: camel-6

org.apache.camel.FailedToCreateRouteException: Failed to create route test: 
Route(test)[From[activemq:queue:in] -> [Log[PROCESSED MESSAG... because of 
Failed to resolve endpoint: activemq://queue:in due to: 
java.lang.IllegalArgumentException: wrong number of arguments





Any other ideas?



Cheers,

Heri





Von: Tasi, Erne mailto:e.t...@cenit.com>>
Gesendet: Donnerstag, 5. Mai 2022 11:09
An: user@karaf.apache.org 
mailto:user@karaf.apache.org>>
Betreff: AW: Problems setting up Karaf with ActiveMQ and Blueprint



Sorry, the correct URL to the Documentation would be ActiveMQ :: Apache 
Camel.

At first I could not send the previous mail and afterwards something went wrong 
as I copy-pasted my original answer.



Cheers,

Erne



Von: Tasi, Erne
Gesendet: Donnerstag, 5. Mai 2022 10:42
An: user@karaf.apache.org
Betreff: AW: Problems setting up Karaf with ActiveMQ and Blueprint



Hi Heri,



As the Exception states you did not provide all the needed arguments in you=  
from and to statements.

According to the documentation ActiveMQ :: Apache Camel>
 your Route would have to look something like this:



  







  



Best Regards,

Erne





Von: Steuer Heribert [mailto:ste...@patronas.com]
Gesendet: Donnerstag, 5. Mai 2022 09:57
An: user@karaf.apache.org
Betreff: Problems setting up Karaf with ActiveMQ and Blueprint



Hello,



we are currently trying to upgrade a couple of old Apache Servicemix 
installations which came pre-bundled with Karaf, ActiveMQ, Camel and Blueprint 
support. As it seems that Servicemix is no

longer maintained, I would like 

Re: Error post upgrade to Karaf 4.3.7

2022-05-12 Thread Jean-Baptiste Onofré
Hmm, I upgraded the ASM version in Aries Proxy. Let me check the Aries
Proxy version used in Karaf 4.3.7.

Regards
JB

On Thu, May 12, 2022 at 6:33 AM Chandan Singh <
mailbox.chandansi...@gmail.com> wrote:

> uninstalling   Aries Proxy Service , Resolves the issue . But not sure if
> it is right thing to do
>
> [image: image.png]
>
> On Thu, May 12, 2022 at 10:01 AM Chandan Singh <
> mailbox.chandansi...@gmail.com> wrote:
>
>> Jdk 11.
>>
>> On Thu, 12 May 2022 at 09:55, Jean-Baptiste Onofré 
>> wrote:
>>
>>> Hi
>>>
>>> With which JDK did you compile your bundles ?
>>>
>>> Regards
>>> JB
>>>
>>> Le mer. 11 mai 2022 à 22:35, Chandan Singh <
>>> mailbox.chandansi...@gmail.com> a écrit :
>>>
 Hi All ,

 After upgrading to apache karaf 4.37  ,  We are seeing this error in
 logs and the bundle fails to start  . any ideas ?


 Caused by: java.lang.IllegalArgumentException: Unsupported api 589824

 at org.objectweb.asm.ClassVisitor.(ClassVisitor.java:76)
 ~[?:?]

 at org.objectweb.asm.ClassVisitor.(ClassVisitor.java:57)
 ~[?:?]

 at
 org.apache.aries.proxy.impl.interfaces.InterfaceCombiningClassAdapter.(InterfaceCombiningClassAdapter.java:64)
 ~[?:?]

 at
 org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.createProxyClass(ProxyClassLoader.java:155)
 ~[?:?]

 at
 org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator.getProxyInstance(InterfaceProxyGenerator.java:97)
 ~[?:?]

 at
 org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:80)
 ~[?:?]

 at
 org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:77)
 ~[?:?]

 at
 org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:42)
 ~[?:?]

 at
 org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:332)
 ~[?:?]

 at
 org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:125)
 ~[?:?]

 at
 org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:81)
 ~[?:?]

 at java.util.concurrent.FutureTask.run(FutureTask.java:264)
 ~[?:?]

 at
 org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:90)
 ~[?:?]

 at
 org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:810)
 ~[?:?]

 at
 org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:784)
 ~[?:?]

 at
 org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:765)
 ~[?:?]

 at
 org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:699)
 ~[?:?]

 at
 org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:666)
 ~[?:?]

 at
 org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:81)
 ~[?:?]

 at java.util.concurrent.FutureTask.run(FutureTask.java:264)
 ~[?:?]

 at
 org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:90)
 ~[?:?]
 at org.apache.



 Regards
 Chandan

>>>