Re: Karaf 5

2021-09-27 Thread JB Onofré
Hi

No it’s not this because k5 don’t use OSGi for the spring boot launcher. I 
still think it’s a missing add modules as Jvm arg. I will check today. 

Regards 
JB

> Le 27 sept. 2021 à 23:39, jgfrm  a écrit :
> 
> While Googling, I came across on of your blogs 
> (http://nanthrax.blogspot.com/2021/04/whats-new-in-apache-karaf-431.html) 
> that one of the changes in Karaf was to export the java.* packages. Could 
> that be the cause?
> 
> |-Oorspronkelijk bericht-
> |Van: Jean-Baptiste Onofre 
> |Verzonden: zondag 26 september 2021 18:02
> |Aan: user@karaf.apache.org
> |Onderwerp: Re: Karaf 5
> |
> |Hi
> |
> |No sure, it’s only class loader issue. I remember this issue in pure spring 
> boot
> |with JDK11.
> |
> |Let me check.
> |
> |Regards
> |JB
> |
> |> Le 26 sept. 2021 à 17:59, jgfrm  a écrit :
> |>
> |> Hi JB,
> |>
> |> Fully understand that it is still work in progress.
> |>
> |> Regarding the .NoClassDefFoundError: org/ietf/jgss/GSSException
> |> --add-modules java.security.jgss does not solve it?
> |> Is it a class loader problem?
> |>
> |> Best,
> |>
> |> -- Jaap
> |>
> |>
> |> |-Oorspronkelijk bericht-
> |> |Van: Jean-Baptiste Onofre 
> |> |Verzonden: zondag 26 september 2021 14:20
> |> |Aan: user@karaf.apache.org
> |> |Onderwerp: Re: Karaf 5
> |> |
> |> |Hi Jaap,
> |> |
> |> |First, maybe I was not clean in my presentation: Karaf 5 is still
> |> |under development and so, everything is not yet ready.
> |> |As said, I will “move” the code to Apache Karaf repo as soon as I
> |> |consider I have something clean and running.
> |> |
> |> |Anyway, about your email, I will check. Today my focus is on the
> |> |OsgiApplicationManager to be Karaf 4 compliant.
> |> |I also have to improve the Karaf Config service.
> |> |
> |> |By the way, you don’t need your own Main, just use the repackage with
> |> |regular provided Main (you can take a look on the K4 assembly
> |> |repackage as an example). I will create a gradle/maven plugin with
> |repackage.
> |> |
> |> |Regarding your issue, as you are running with JDK11, I guess you have
> |> |to add -- add-modules java.security.jgss to avoid the
> |NoClassDefFoundException.
> |> |
> |> |Thanks anyway for your feedback, much appreciated.
> |> |
> |> |Regards
> |> |JB
> |> |
> |> |> Le 26 sept. 2021 à 12:00, jgfrm  a écrit :
> |> |>
> |> |> Hi Jean-Baptiste,
> |> |>
> |> |> I managed to start (well not completely) my spring application.
> |> |> However, while starting up, I get an exception:
> |> |>
> |> |> 11:43:03.148 [main] ERROR o.s.boot.SpringApplication:837 -
> |> |> Application run failed
> |> |> org.springframework.context.ApplicationContextException: Unable to
> |> |> start web server; nested exception is java.lang.NoClassDefFoundError:
> |> |> org/ietf/jgss/GSSException
> |> |>
> |> |> Any ideas?
> |> |>
> |> |> Also, I had to make modifications in
> |> |SpringBootApplicationManagerService/start:
> |> |>
> |> |> try {
> |> |>Thread.currentThread().setContextClassLoader(classLoader);
> |> |>// disable tomcat stream handler
> |> |>/* There is no TomcatURLStreamHandlerFactory in my spring jar
> |> |>final Method tomcat =
> |> |classLoader.loadClass("org.apache.catalina.webresources.TomcatURLStre
> |> |am HandlerFactory").getMethod("disable");
> |> |>if (!tomcat.isBridge()) {
> |> |>tomcat.setAccessible(true);
> |> |>}
> |> |>tomcat.invoke(null, null);
> |> |> */
> |> |>// invoke spring boot main
> |> |>final Method main =
> |> |classLoader.loadClass("org.springframework.boot.loader.JarLauncher").
> |> |getM
> |> |ethod("main", String[].class);
> |> |>main.setAccessible(true);
> |> |>log.info("Call JarLauncher");
> |> |>if (properties.get("args") != null) {
> |> |>log.info("Call JarLauncher with args");
> |> |>main.invoke(null, new Object[]{ properties.get("args") 
> });
> |> |>} else {
> |> |>log.info("Call JarLauncher without args");
> |> |>main.invoke(null, new Object[]{new String[0]}); //
> |> |> the original invoke
> |> |did not work for me
> |> |>}
> |> |>} finally {
> |> |>Thread.currentThread().setContextClassLoader(original);
> |> |>}
> |> |>
> |> |> Further details:
> |> |> - openjdk version "11.0.12" 2021-07-20
> |> |> - invocation:
> |> |> java -cp
> |> |> ../karaf5/assemblies/k4/target/k4-5.0-SNAPSHOT.jar:target/e3web-tes
> |> |> t-1
> |> |> .0-SNAPSHOT.jar:../karaf5/services/spring-boot-application-manager/
> |> |> tar get/spring-boot-application-manager-5.0-SNAPSHOT.jar
> |> |> -Dkaraf.config=src/main/resources/karaf.json Main
> |> |>
> |> |> Main.java:
> |> |> ###
> |> |> public class Main {
> |> |>public static void main(String[] args){
> |> |>System.out.println("Starting Karaf");
> |> |>Karaf karaf = 

RE: Karaf 5

2021-09-27 Thread jgfrm
While Googling, I came across on of your blogs 
(http://nanthrax.blogspot.com/2021/04/whats-new-in-apache-karaf-431.html) that 
one of the changes in Karaf was to export the java.* packages. Could that be 
the cause?

|-Oorspronkelijk bericht-
|Van: Jean-Baptiste Onofre 
|Verzonden: zondag 26 september 2021 18:02
|Aan: user@karaf.apache.org
|Onderwerp: Re: Karaf 5
|
|Hi
|
|No sure, it’s only class loader issue. I remember this issue in pure spring 
boot
|with JDK11.
|
|Let me check.
|
|Regards
|JB
|
|> Le 26 sept. 2021 à 17:59, jgfrm  a écrit :
|>
|> Hi JB,
|>
|> Fully understand that it is still work in progress.
|>
|> Regarding the .NoClassDefFoundError: org/ietf/jgss/GSSException
|> --add-modules java.security.jgss does not solve it?
|> Is it a class loader problem?
|>
|> Best,
|>
|> -- Jaap
|>
|>
|> |-Oorspronkelijk bericht-
|> |Van: Jean-Baptiste Onofre 
|> |Verzonden: zondag 26 september 2021 14:20
|> |Aan: user@karaf.apache.org
|> |Onderwerp: Re: Karaf 5
|> |
|> |Hi Jaap,
|> |
|> |First, maybe I was not clean in my presentation: Karaf 5 is still
|> |under development and so, everything is not yet ready.
|> |As said, I will “move” the code to Apache Karaf repo as soon as I
|> |consider I have something clean and running.
|> |
|> |Anyway, about your email, I will check. Today my focus is on the
|> |OsgiApplicationManager to be Karaf 4 compliant.
|> |I also have to improve the Karaf Config service.
|> |
|> |By the way, you don’t need your own Main, just use the repackage with
|> |regular provided Main (you can take a look on the K4 assembly
|> |repackage as an example). I will create a gradle/maven plugin with
|repackage.
|> |
|> |Regarding your issue, as you are running with JDK11, I guess you have
|> |to add -- add-modules java.security.jgss to avoid the
|NoClassDefFoundException.
|> |
|> |Thanks anyway for your feedback, much appreciated.
|> |
|> |Regards
|> |JB
|> |
|> |> Le 26 sept. 2021 à 12:00, jgfrm  a écrit :
|> |>
|> |> Hi Jean-Baptiste,
|> |>
|> |> I managed to start (well not completely) my spring application.
|> |> However, while starting up, I get an exception:
|> |>
|> |> 11:43:03.148 [main] ERROR o.s.boot.SpringApplication:837 -
|> |> Application run failed
|> |> org.springframework.context.ApplicationContextException: Unable to
|> |> start web server; nested exception is java.lang.NoClassDefFoundError:
|> |> org/ietf/jgss/GSSException
|> |>
|> |> Any ideas?
|> |>
|> |> Also, I had to make modifications in
|> |SpringBootApplicationManagerService/start:
|> |>
|> |> try {
|> |>Thread.currentThread().setContextClassLoader(classLoader);
|> |>// disable tomcat stream handler
|> |>/* There is no TomcatURLStreamHandlerFactory in my spring jar
|> |>final Method tomcat =
|> |classLoader.loadClass("org.apache.catalina.webresources.TomcatURLStre
|> |am HandlerFactory").getMethod("disable");
|> |>if (!tomcat.isBridge()) {
|> |>tomcat.setAccessible(true);
|> |>}
|> |>tomcat.invoke(null, null);
|> |> */
|> |>// invoke spring boot main
|> |>final Method main =
|> |classLoader.loadClass("org.springframework.boot.loader.JarLauncher").
|> |getM
|> |ethod("main", String[].class);
|> |>main.setAccessible(true);
|> |>log.info("Call JarLauncher");
|> |>if (properties.get("args") != null) {
|> |>log.info("Call JarLauncher with args");
|> |>main.invoke(null, new Object[]{ properties.get("args") });
|> |>} else {
|> |>log.info("Call JarLauncher without args");
|> |>main.invoke(null, new Object[]{new String[0]}); //
|> |> the original invoke
|> |did not work for me
|> |>}
|> |>} finally {
|> |>Thread.currentThread().setContextClassLoader(original);
|> |>}
|> |>
|> |> Further details:
|> |> - openjdk version "11.0.12" 2021-07-20
|> |> - invocation:
|> |> java -cp
|> |> ../karaf5/assemblies/k4/target/k4-5.0-SNAPSHOT.jar:target/e3web-tes
|> |> t-1
|> |> .0-SNAPSHOT.jar:../karaf5/services/spring-boot-application-manager/
|> |> tar get/spring-boot-application-manager-5.0-SNAPSHOT.jar
|> |> -Dkaraf.config=src/main/resources/karaf.json Main
|> |>
|> |> Main.java:
|> |> ###
|> |> public class Main {
|> |>public static void main(String[] args){
|> |>System.out.println("Starting Karaf");
|> |>Karaf karaf = Karaf.builder().build();
|> |>karaf.start();
|> |>}
|> |> }
|> |> ###
|> |>
|> |> Best,
|> |>
|> |> -- Jaap
|> |>
|> |> |-Oorspronkelijk bericht-
|> |> |Van: Jean-Baptiste Onofré 
|> |> |Verzonden: vrijdag 24 september 2021 10:34
|> |> |Aan: user@karaf.apache.org
|> |> |Onderwerp: Re: Karaf 5
|> |> |
|> |> |Hi Jaap,
|> |> |
|> |> |The presentation is available here:
|> |> |
|> |>
|>
|||https://docs.google.com/presentation/d/1nDqd4oVbrggTDlwrzWc8zEdahKh
|c
|> |S
|> |> 

Re: FileInstaller with 4.3.3

2021-09-27 Thread Matthias Leinweber
Sure ..shared desktop or github project (depends on 2 other github projects
not in maven central yet)

Best regards,
Matthias

Am Mo., 27. Sept. 2021 um 17:09 Uhr schrieb Jean-Baptiste Onofré <
j...@nanthrax.net>:

> OK, maybe it's due to your custom distro.
>
> Any chance I can check your distro ?
>
> Regards
> JB
>
> On 27/09/2021 16:49, Matthias Leinweber wrote:
> > I tested it with the downloaded karaf binary distribution and it works.
> > With a custom distribution there seems to be a problem. I tested with my
> > own as well as with the custom dynamic dist from examples. Pls test it
> > with a xml file not only with cfg+jar.
> >
> > br,
> > Matthias
> >
> > Am Mo., 27. Sept. 2021 um 15:04 Uhr schrieb Jean-Baptiste Onofré
> > mailto:j...@nanthrax.net>>:
> >
> > Thanks Matthias,
> >
> > I have basically similar, let me try on a fresh install.
> >
> > Regards
> > JB
> >
> > On 27/09/2021 15:00, Matthias Leinweber wrote:
> >  > Hello JB,
> >  >
> >  > Linux 5.13.19-2-MANJARO on ext4
> >  >
> >  > Br,
> >  > Matthias
> >  >
> >  > Am Mo., 27. Sept. 2021 um 14:50 Uhr schrieb Jean-Baptiste Onofré
> >  > mailto:j...@nanthrax.net> 
> >  > >>:
> >  >
> >  > Hi Matthias,
> >  >
> >  > what's your OS and environment ?
> >  >
> >  > It seems to work fine to me: I added a new fileinstall
> > factory pid and
> >  > it's deploying from there.
> >  >
> >  > Regards
> >  > JB
> >  >
> >  > On 27/09/2021 14:38, Matthias Leinweber wrote:
> >  >  > I also tried to add a config file
> >  > (org.apache.felix.fileinstall-foo.cfg)
> >  >  > into the etc folder before first startup, But also no
> success.
> >  >  >
> >  >  > Br,
> >  >  > Matthias
> >  >  >
> >  >  > Am Fr., 24. Sept. 2021 um 10:28 Uhr schrieb Jean-Baptiste
> > Onofré
> >  >  > mailto:j...@nanthrax.net>
> > >
> > 
> >  >  >  >  >
> >  >  > I think you have a race condition: fileinstall is
> > installed by
> >  >  > startup.properties, and you provide the config via
> > features
> >  > core which
> >  >  > come later in the bootstrap.
> >  >  >
> >  >  > Let me try a startup like this and get back to you.
> >  >  > I keep you posted.
> >  >  >
> >  >  > Regards
> >  >  > JB
> >  >  >
> >  >  > On 24/09/2021 09:27, Matthias Leinweber wrote:
> >  >  >  > Hello,
> >  >  >  >
> >  >  >  > Does not work for us. In our assembly we add a boot
> > feature
> >  >  > containing:
> >  >  >  >
> >  >  >  >   name="org.apache.felix.fileinstall-camel">
> >  >  >  >felix.fileinstall.dir =
> > ${env:CAMEL_PATH:-/deploy/}
> >  >  >  >felix.fileinstall.filter =
> .*\\.(xml|cfg|groovy)
> >  >  >  >felix.fileinstall.poll = 1000
> >  >  >  >felix.fileinstall.start.level = 80
> >  >  >  >felix.fileinstall.active.level = 80
> >  >  >  >felix.fileinstall.log.level = 3
> >  >  >  >  
> >  >  >  >
> >  >  >  > The content of this fileinstaller does not get
> > processed
> >  > on the
> >  >  > first
> >  >  >  > system start. After restart it's fine, but not a
> viable
> >  > option. I
> >  >  > tired
> >  >  >  > start+active @ 60,80,100 + start@100 active@80. As
> > well as
> >  >  > disable nio2.
> >  >  >  > In all cases I need to touch a file to make it
> working.
> >  >  >  >
> >  >  >  > br,
> >  >  >  > Matthias
> >  >  >  >
> >  >  >  > Am Do., 23. Sept. 2021 um 21:05 Uhr schrieb Paul
> Fraser
> >  >  >  > mailto:pa...@qnenet.com>
> > >
> >  > 
> > >>
> >  >  > 
> > >
> >  > 
> > :
> >  >  >  >
> >  >  >  > Yes, running without clean works OK in my case.
> >  >  >  >
> >  >  >  > Paul Fraser
> >  >  >  >
> >  >  >  > On 

Re: FileInstaller with 4.3.3

2021-09-27 Thread Jean-Baptiste Onofré

OK, maybe it's due to your custom distro.

Any chance I can check your distro ?

Regards
JB

On 27/09/2021 16:49, Matthias Leinweber wrote:

I tested it with the downloaded karaf binary distribution and it works.
With a custom distribution there seems to be a problem. I tested with my 
own as well as with the custom dynamic dist from examples. Pls test it 
with a xml file not only with cfg+jar.


br,
Matthias

Am Mo., 27. Sept. 2021 um 15:04 Uhr schrieb Jean-Baptiste Onofré 
mailto:j...@nanthrax.net>>:


Thanks Matthias,

I have basically similar, let me try on a fresh install.

Regards
JB

On 27/09/2021 15:00, Matthias Leinweber wrote:
 > Hello JB,
 >
 > Linux 5.13.19-2-MANJARO on ext4
 >
 > Br,
 > Matthias
 >
 > Am Mo., 27. Sept. 2021 um 14:50 Uhr schrieb Jean-Baptiste Onofré
 > mailto:j...@nanthrax.net> >>:
 >
 >     Hi Matthias,
 >
 >     what's your OS and environment ?
 >
 >     It seems to work fine to me: I added a new fileinstall
factory pid and
 >     it's deploying from there.
 >
 >     Regards
 >     JB
 >
 >     On 27/09/2021 14:38, Matthias Leinweber wrote:
 >      > I also tried to add a config file
 >     (org.apache.felix.fileinstall-foo.cfg)
 >      > into the etc folder before first startup, But also no success.
 >      >
 >      > Br,
 >      > Matthias
 >      >
 >      > Am Fr., 24. Sept. 2021 um 10:28 Uhr schrieb Jean-Baptiste
Onofré
 >      > mailto:j...@nanthrax.net>
>

 >           >
 >      >     I think you have a race condition: fileinstall is
installed by
 >      >     startup.properties, and you provide the config via
features
 >     core which
 >      >     come later in the bootstrap.
 >      >
 >      >     Let me try a startup like this and get back to you.
 >      >     I keep you posted.
 >      >
 >      >     Regards
 >      >     JB
 >      >
 >      >     On 24/09/2021 09:27, Matthias Leinweber wrote:
 >      >      > Hello,
 >      >      >
 >      >      > Does not work for us. In our assembly we add a boot
feature
 >      >     containing:
 >      >      >
 >      >      >      
 >      >      >        felix.fileinstall.dir =
${env:CAMEL_PATH:-/deploy/}
 >      >      >        felix.fileinstall.filter = .*\\.(xml|cfg|groovy)
 >      >      >        felix.fileinstall.poll = 1000
 >      >      >        felix.fileinstall.start.level = 80
 >      >      >        felix.fileinstall.active.level = 80
 >      >      >        felix.fileinstall.log.level = 3
 >      >      >      
 >      >      >
 >      >      > The content of this fileinstaller does not get
processed
 >     on the
 >      >     first
 >      >      > system start. After restart it's fine, but not a viable
 >     option. I
 >      >     tired
 >      >      > start+active @ 60,80,100 + start@100 active@80. As
well as
 >      >     disable nio2.
 >      >      > In all cases I need to touch a file to make it working.
 >      >      >
 >      >      > br,
 >      >      > Matthias
 >      >      >
 >      >      > Am Do., 23. Sept. 2021 um 21:05 Uhr schrieb Paul Fraser
 >      >      > mailto:pa...@qnenet.com>
>
 >     
>>
 >      >     
>
 >     
:
 >      >      >
 >      >      >     Yes, running without clean works OK in my case.
 >      >      >
 >      >      >     Paul Fraser
 >      >      >
 >      >      >     On 23/9/21 6:45 pm, Jean-Baptiste Onofré wrote:
 >      >      >      > I guess it works fine without the clean arg
right ?
 >      >      >      >
 >      >      >      > Regards
 >      >      >      > JB
 >      >      >      >
 >      >      >      > On 22/09/2021 13:15, Jesse White wrote:
 >      >      >      >> We're hitting a similar problem with the
deploy/
 >     folder
 >      >     and can
 >      >      >      >> reproduce with a vanilla distribution of
Karaf 4.3.3.
 >      >      >      >>
 >      >      >      >> On Mac OS w/ JDK 11:
 >      >      >      >>
 >      >      >      >>    tar zxvf apache-karaf-4.3.3.tar.gz &&
 >      >     cd 

Re: FileInstaller with 4.3.3

2021-09-27 Thread Matthias Leinweber
I tested it with the downloaded karaf binary distribution and it works.
With a custom distribution there seems to be a problem. I tested with my
own as well as with the custom dynamic dist from examples. Pls test it with
a xml file not only with cfg+jar.

br,
Matthias

Am Mo., 27. Sept. 2021 um 15:04 Uhr schrieb Jean-Baptiste Onofré <
j...@nanthrax.net>:

> Thanks Matthias,
>
> I have basically similar, let me try on a fresh install.
>
> Regards
> JB
>
> On 27/09/2021 15:00, Matthias Leinweber wrote:
> > Hello JB,
> >
> > Linux 5.13.19-2-MANJARO on ext4
> >
> > Br,
> > Matthias
> >
> > Am Mo., 27. Sept. 2021 um 14:50 Uhr schrieb Jean-Baptiste Onofré
> > mailto:j...@nanthrax.net>>:
> >
> > Hi Matthias,
> >
> > what's your OS and environment ?
> >
> > It seems to work fine to me: I added a new fileinstall factory pid
> and
> > it's deploying from there.
> >
> > Regards
> > JB
> >
> > On 27/09/2021 14:38, Matthias Leinweber wrote:
> >  > I also tried to add a config file
> > (org.apache.felix.fileinstall-foo.cfg)
> >  > into the etc folder before first startup, But also no success.
> >  >
> >  > Br,
> >  > Matthias
> >  >
> >  > Am Fr., 24. Sept. 2021 um 10:28 Uhr schrieb Jean-Baptiste Onofré
> >  > mailto:j...@nanthrax.net> 
> >  > >>:
> >  >
> >  > I think you have a race condition: fileinstall is installed by
> >  > startup.properties, and you provide the config via features
> > core which
> >  > come later in the bootstrap.
> >  >
> >  > Let me try a startup like this and get back to you.
> >  > I keep you posted.
> >  >
> >  > Regards
> >  > JB
> >  >
> >  > On 24/09/2021 09:27, Matthias Leinweber wrote:
> >  >  > Hello,
> >  >  >
> >  >  > Does not work for us. In our assembly we add a boot feature
> >  > containing:
> >  >  >
> >  >  >  
> >  >  >felix.fileinstall.dir = ${env:CAMEL_PATH:-/deploy/}
> >  >  >felix.fileinstall.filter = .*\\.(xml|cfg|groovy)
> >  >  >felix.fileinstall.poll = 1000
> >  >  >felix.fileinstall.start.level = 80
> >  >  >felix.fileinstall.active.level = 80
> >  >  >felix.fileinstall.log.level = 3
> >  >  >  
> >  >  >
> >  >  > The content of this fileinstaller does not get processed
> > on the
> >  > first
> >  >  > system start. After restart it's fine, but not a viable
> > option. I
> >  > tired
> >  >  > start+active @ 60,80,100 + start@100 active@80. As well as
> >  > disable nio2.
> >  >  > In all cases I need to touch a file to make it working.
> >  >  >
> >  >  > br,
> >  >  > Matthias
> >  >  >
> >  >  > Am Do., 23. Sept. 2021 um 21:05 Uhr schrieb Paul Fraser
> >  >  > mailto:pa...@qnenet.com>
> > >
> >  > 
> >  >  >  >
> >  >  > Yes, running without clean works OK in my case.
> >  >  >
> >  >  > Paul Fraser
> >  >  >
> >  >  > On 23/9/21 6:45 pm, Jean-Baptiste Onofré wrote:
> >  >  >  > I guess it works fine without the clean arg right ?
> >  >  >  >
> >  >  >  > Regards
> >  >  >  > JB
> >  >  >  >
> >  >  >  > On 22/09/2021 13:15, Jesse White wrote:
> >  >  >  >> We're hitting a similar problem with the deploy/
> > folder
> >  > and can
> >  >  >  >> reproduce with a vanilla distribution of Karaf
> 4.3.3.
> >  >  >  >>
> >  >  >  >> On Mac OS w/ JDK 11:
> >  >  >  >>
> >  >  >  >>tar zxvf apache-karaf-4.3.3.tar.gz &&
> >  > cd apache-karaf-4.3.3
> >  >  >  >>cp /tmp/confd-telemetry-feature.xml deploy/
> >  >  >  >>./bin/karaf clean
> >  >  >  >>
> >  >  >  >>karaf@root()> feature:info confd-telemetry-auto
> >  >  >  >>Feature not found
> >  >  >  >>
> >  >  >  >> Similar test with Karaf 4.3.2 shows:
> >  >  >  >>
> >  >  >  >>karaf@root()> feature:info
>  confd-telemetry-auto
> >  >  >  >>Feature confd-telemetry-auto 1.0.0
> >  >  >  >>Feature configuration:
> >  >  >  >>
> >  > org.opennms.features.telemetry.listeners-single-port-flows
> >  >  >  >>
> > org.opennms.features.telemetry.listeners-JTI-Listener
> >  >  >  >>
> > org.opennms.features.telemetry.listeners-NXOS-Listener
> >  >  

Re: Karaf 4.3.3 feature:refresh results in StackOverflowError

2021-09-27 Thread Thomas Driessen
Hi J.B. :)

just wanted to ask if you did find some spare time to have a look at that
issue?

Kind regards,
Thomas

Am Mo., 20. Sept. 2021 um 07:50 Uhr schrieb Thomas Driessen <
thomas.driessen...@gmail.com>:

> Hi J.B.,
>
> I've sent you the contents directly to your email :)
>
> Am Mo., 20. Sept. 2021 um 07:43 Uhr schrieb Jean-Baptiste Onofre <
> j...@nanthrax.net>:
>
>> Hi Thomas,
>>
>> Would it be possible to have your features definition ? I will be able to
>> take a look.
>>
>> Thanks
>> Regards
>> JB
>>
>> > Le 20 sept. 2021 à 07:27, Thomas Driessen 
>> a écrit :
>> >
>> > Hi J.B. , hi Francois,
>> >
>> > thanks for your quick answer and sorry for the delay.
>> >
>> > Is there any way to detect such a cycle, i.e. is there a command such
>> as feature:tree like for the dependency tree in maven that could help me
>> identifying such cycles?
>> >
>> > Strange thing is: the exact same setup worked fine with Karaf 4.3.2. So
>> probably one of our referenced features in other feature repositories
>> causes this behavior.
>> >
>> >
>> > Kind regards,
>> > Thomas
>> >
>> > Am Sa., 18. Sept. 2021 um 06:22 Uhr schrieb Jean-Baptiste Onofre <
>> j...@nanthrax.net>:
>> > Hi Thomas,
>> >
>> > I think you have a loop in your features (a feature A require feature B
>> that require feature A).
>> >
>> > I know that Pax CDI has a cycle like this (I have a fix but not yet
>> released).
>> >
>> > Regards
>> > JB
>> >
>> > > Le 17 sept. 2021 à 17:00, Thomas Driessen <
>> thomas.driessen...@gmail.com> a écrit :
>> > >
>> > > Hi,
>> > >
>> > > we just updated to the new Karaf 4.3.3 and suddenly we always get a
>> StackOverflowError as soon as we try to do a feature:refresh:
>> > >
>> > > 2021-09-17T14:56:44,239 | ERROR | Karaf local console user karaf |
>> ShellUtil| 44 - org.apache.karaf.shell.core - 4.3.3
>> | Exception caught while executing command
>> > > java.util.concurrent.ExecutionException: java.lang.StackOverflowError
>> > > at
>> java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:?]
>> > > at java.util.concurrent.FutureTask.get(FutureTask.java:191)
>> ~[?:?]
>> > > at
>> org.apache.felix.gogo.runtime.CommandSessionImpl$JobImpl.run(CommandSessionImpl.java:855)
>> ~[?:?]
>> > > at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
>> ~[?:?]
>> > > at java.util.concurrent.FutureTask.run(FutureTask.java:264)
>> ~[?:?]
>> > > at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>> ~[?:?]
>> > > at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>> ~[?:?]
>> > > at java.lang.Thread.run(Thread.java:829) [?:?]
>> > > Caused by: java.lang.StackOverflowError
>> > > at
>> org.apache.karaf.features.internal.region.Subsystem.(Subsystem.java:149)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.region.SubsystemResolver.prepare(SubsystemResolver.java:127)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:390)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.handlePrerequisites(Deployer.java:1121)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:394)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.handlePrerequisites(Deployer.java:1121)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:394)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.handlePrerequisites(Deployer.java:1121)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:394)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.handlePrerequisites(Deployer.java:1121)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:394)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.handlePrerequisites(Deployer.java:1121)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:394)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.handlePrerequisites(Deployer.java:1121)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:394)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.handlePrerequisites(Deployer.java:1121)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:394)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.handlePrerequisites(Deployer.java:1121)
>> ~[?:?]
>> > > at
>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:394)
>> ~[?:?]
>> > >
>> > > Is 

Re: FileInstaller with 4.3.3

2021-09-27 Thread Jean-Baptiste Onofré

Thanks Matthias,

I have basically similar, let me try on a fresh install.

Regards
JB

On 27/09/2021 15:00, Matthias Leinweber wrote:

Hello JB,

Linux 5.13.19-2-MANJARO on ext4

Br,
Matthias

Am Mo., 27. Sept. 2021 um 14:50 Uhr schrieb Jean-Baptiste Onofré 
mailto:j...@nanthrax.net>>:


Hi Matthias,

what's your OS and environment ?

It seems to work fine to me: I added a new fileinstall factory pid and
it's deploying from there.

Regards
JB

On 27/09/2021 14:38, Matthias Leinweber wrote:
 > I also tried to add a config file
(org.apache.felix.fileinstall-foo.cfg)
 > into the etc folder before first startup, But also no success.
 >
 > Br,
 > Matthias
 >
 > Am Fr., 24. Sept. 2021 um 10:28 Uhr schrieb Jean-Baptiste Onofré
 > mailto:j...@nanthrax.net> >>:
 >
 >     I think you have a race condition: fileinstall is installed by
 >     startup.properties, and you provide the config via features
core which
 >     come later in the bootstrap.
 >
 >     Let me try a startup like this and get back to you.
 >     I keep you posted.
 >
 >     Regards
 >     JB
 >
 >     On 24/09/2021 09:27, Matthias Leinweber wrote:
 >      > Hello,
 >      >
 >      > Does not work for us. In our assembly we add a boot feature
 >     containing:
 >      >
 >      >      
 >      >        felix.fileinstall.dir = ${env:CAMEL_PATH:-/deploy/}
 >      >        felix.fileinstall.filter = .*\\.(xml|cfg|groovy)
 >      >        felix.fileinstall.poll = 1000
 >      >        felix.fileinstall.start.level = 80
 >      >        felix.fileinstall.active.level = 80
 >      >        felix.fileinstall.log.level = 3
 >      >      
 >      >
 >      > The content of this fileinstaller does not get processed
on the
 >     first
 >      > system start. After restart it's fine, but not a viable
option. I
 >     tired
 >      > start+active @ 60,80,100 + start@100 active@80. As well as
 >     disable nio2.
 >      > In all cases I need to touch a file to make it working.
 >      >
 >      > br,
 >      > Matthias
 >      >
 >      > Am Do., 23. Sept. 2021 um 21:05 Uhr schrieb Paul Fraser
 >      > mailto:pa...@qnenet.com>
>
 >     
      >
 >      >     Yes, running without clean works OK in my case.
 >      >
 >      >     Paul Fraser
 >      >
 >      >     On 23/9/21 6:45 pm, Jean-Baptiste Onofré wrote:
 >      >      > I guess it works fine without the clean arg right ?
 >      >      >
 >      >      > Regards
 >      >      > JB
 >      >      >
 >      >      > On 22/09/2021 13:15, Jesse White wrote:
 >      >      >> We're hitting a similar problem with the deploy/
folder
 >     and can
 >      >      >> reproduce with a vanilla distribution of Karaf 4.3.3.
 >      >      >>
 >      >      >> On Mac OS w/ JDK 11:
 >      >      >>
 >      >      >>    tar zxvf apache-karaf-4.3.3.tar.gz &&
 >     cd apache-karaf-4.3.3
 >      >      >>    cp /tmp/confd-telemetry-feature.xml deploy/
 >      >      >>    ./bin/karaf clean
 >      >      >>
 >      >      >>    karaf@root()> feature:info confd-telemetry-auto
 >      >      >>    Feature not found
 >      >      >>
 >      >      >> Similar test with Karaf 4.3.2 shows:
 >      >      >>
 >      >      >>    karaf@root()> feature:info  confd-telemetry-auto
 >      >      >>    Feature confd-telemetry-auto 1.0.0
 >      >      >>    Feature configuration:
 >      >      >>
 >     org.opennms.features.telemetry.listeners-single-port-flows
 >      >      >> 
org.opennms.features.telemetry.listeners-JTI-Listener
 >      >      >> 
org.opennms.features.telemetry.listeners-NXOS-Listener

 >      >      >>    ...
 >      >      >>
 >      >      >> Here's a reference to the feature file in question:
 >      >      >>
 > https://gist.github.com/j-white/1574f34cb94dc2d9166ae9805bd4ba3b

 >   
  >
 >      >
 > 
  
 >   
  >>
 >      >      >>
 >      >
 > 
  

Re: FileInstaller with 4.3.3

2021-09-27 Thread Matthias Leinweber
Hello JB,

Linux 5.13.19-2-MANJARO on ext4

Br,
Matthias

Am Mo., 27. Sept. 2021 um 14:50 Uhr schrieb Jean-Baptiste Onofré <
j...@nanthrax.net>:

> Hi Matthias,
>
> what's your OS and environment ?
>
> It seems to work fine to me: I added a new fileinstall factory pid and
> it's deploying from there.
>
> Regards
> JB
>
> On 27/09/2021 14:38, Matthias Leinweber wrote:
> > I also tried to add a config file (org.apache.felix.fileinstall-foo.cfg)
> > into the etc folder before first startup, But also no success.
> >
> > Br,
> > Matthias
> >
> > Am Fr., 24. Sept. 2021 um 10:28 Uhr schrieb Jean-Baptiste Onofré
> > mailto:j...@nanthrax.net>>:
> >
> > I think you have a race condition: fileinstall is installed by
> > startup.properties, and you provide the config via features core
> which
> > come later in the bootstrap.
> >
> > Let me try a startup like this and get back to you.
> > I keep you posted.
> >
> > Regards
> > JB
> >
> > On 24/09/2021 09:27, Matthias Leinweber wrote:
> >  > Hello,
> >  >
> >  > Does not work for us. In our assembly we add a boot feature
> > containing:
> >  >
> >  >  
> >  >felix.fileinstall.dir = ${env:CAMEL_PATH:-/deploy/}
> >  >felix.fileinstall.filter = .*\\.(xml|cfg|groovy)
> >  >felix.fileinstall.poll = 1000
> >  >felix.fileinstall.start.level = 80
> >  >felix.fileinstall.active.level = 80
> >  >felix.fileinstall.log.level = 3
> >  >  
> >  >
> >  > The content of this fileinstaller does not get processed on the
> > first
> >  > system start. After restart it's fine, but not a viable option. I
> > tired
> >  > start+active @ 60,80,100 + start@100 active@80. As well as
> > disable nio2.
> >  > In all cases I need to touch a file to make it working.
> >  >
> >  > br,
> >  > Matthias
> >  >
> >  > Am Do., 23. Sept. 2021 um 21:05 Uhr schrieb Paul Fraser
> >  > mailto:pa...@qnenet.com>
> > >>:
> >  >
> >  > Yes, running without clean works OK in my case.
> >  >
> >  > Paul Fraser
> >  >
> >  > On 23/9/21 6:45 pm, Jean-Baptiste Onofré wrote:
> >  >  > I guess it works fine without the clean arg right ?
> >  >  >
> >  >  > Regards
> >  >  > JB
> >  >  >
> >  >  > On 22/09/2021 13:15, Jesse White wrote:
> >  >  >> We're hitting a similar problem with the deploy/ folder
> > and can
> >  >  >> reproduce with a vanilla distribution of Karaf 4.3.3.
> >  >  >>
> >  >  >> On Mac OS w/ JDK 11:
> >  >  >>
> >  >  >>tar zxvf apache-karaf-4.3.3.tar.gz &&
> > cd apache-karaf-4.3.3
> >  >  >>cp /tmp/confd-telemetry-feature.xml deploy/
> >  >  >>./bin/karaf clean
> >  >  >>
> >  >  >>karaf@root()> feature:info confd-telemetry-auto
> >  >  >>Feature not found
> >  >  >>
> >  >  >> Similar test with Karaf 4.3.2 shows:
> >  >  >>
> >  >  >>karaf@root()> feature:info  confd-telemetry-auto
> >  >  >>Feature confd-telemetry-auto 1.0.0
> >  >  >>Feature configuration:
> >  >  >>
> > org.opennms.features.telemetry.listeners-single-port-flows
> >  >  >>  org.opennms.features.telemetry.listeners-JTI-Listener
> >  >  >>
> org.opennms.features.telemetry.listeners-NXOS-Listener
> >  >  >>...
> >  >  >>
> >  >  >> Here's a reference to the feature file in question:
> >  >  >>
> > https://gist.github.com/j-white/1574f34cb94dc2d9166ae9805bd4ba3b
> > 
> >  >
> >    > >
> >  >  >>
> >  >
> >    > 
> >  >
> >    > >>
> >  >  >>
> >  >  >> Thanks for all the effort in maintaining the distribution
> > - looking
> >  >  >> forward to getting R7 up and running with JDK 17!
> >  >  >>
> >  >  >> Best,
> >  >  >> Jesse
> >  >  >>
> >  >
> >
>  
> >  >  >> *From:* Jean-Baptiste Onofre  > 
> >  > >>
> >  >  >> *Sent:* Tuesday, September 21, 2021 9:39 AM
> >  >  >> *To:* user@karaf.apache.org
> > 

Re: FileInstaller with 4.3.3

2021-09-27 Thread Jean-Baptiste Onofré

Hi Matthias,

what's your OS and environment ?

It seems to work fine to me: I added a new fileinstall factory pid and 
it's deploying from there.


Regards
JB

On 27/09/2021 14:38, Matthias Leinweber wrote:
I also tried to add a config file (org.apache.felix.fileinstall-foo.cfg) 
into the etc folder before first startup, But also no success.


Br,
Matthias

Am Fr., 24. Sept. 2021 um 10:28 Uhr schrieb Jean-Baptiste Onofré 
mailto:j...@nanthrax.net>>:


I think you have a race condition: fileinstall is installed by
startup.properties, and you provide the config via features core which
come later in the bootstrap.

Let me try a startup like this and get back to you.
I keep you posted.

Regards
JB

On 24/09/2021 09:27, Matthias Leinweber wrote:
 > Hello,
 >
 > Does not work for us. In our assembly we add a boot feature
containing:
 >
 >      
 >        felix.fileinstall.dir = ${env:CAMEL_PATH:-/deploy/}
 >        felix.fileinstall.filter = .*\\.(xml|cfg|groovy)
 >        felix.fileinstall.poll = 1000
 >        felix.fileinstall.start.level = 80
 >        felix.fileinstall.active.level = 80
 >        felix.fileinstall.log.level = 3
 >      
 >
 > The content of this fileinstaller does not get processed on the
first
 > system start. After restart it's fine, but not a viable option. I
tired
 > start+active @ 60,80,100 + start@100 active@80. As well as
disable nio2.
 > In all cases I need to touch a file to make it working.
 >
 > br,
 > Matthias
 >
 > Am Do., 23. Sept. 2021 um 21:05 Uhr schrieb Paul Fraser
 > mailto:pa...@qnenet.com>
>>:
 >
 >     Yes, running without clean works OK in my case.
 >
 >     Paul Fraser
 >
 >     On 23/9/21 6:45 pm, Jean-Baptiste Onofré wrote:
 >      > I guess it works fine without the clean arg right ?
 >      >
 >      > Regards
 >      > JB
 >      >
 >      > On 22/09/2021 13:15, Jesse White wrote:
 >      >> We're hitting a similar problem with the deploy/ folder
and can
 >      >> reproduce with a vanilla distribution of Karaf 4.3.3.
 >      >>
 >      >> On Mac OS w/ JDK 11:
 >      >>
 >      >>    tar zxvf apache-karaf-4.3.3.tar.gz &&
cd apache-karaf-4.3.3
 >      >>    cp /tmp/confd-telemetry-feature.xml deploy/
 >      >>    ./bin/karaf clean
 >      >>
 >      >>    karaf@root()> feature:info confd-telemetry-auto
 >      >>    Feature not found
 >      >>
 >      >> Similar test with Karaf 4.3.2 shows:
 >      >>
 >      >>    karaf@root()> feature:info  confd-telemetry-auto
 >      >>    Feature confd-telemetry-auto 1.0.0
 >      >>    Feature configuration:
 >      >> 
org.opennms.features.telemetry.listeners-single-port-flows

 >      >>      org.opennms.features.telemetry.listeners-JTI-Listener
 >      >>      org.opennms.features.telemetry.listeners-NXOS-Listener
 >      >>    ...
 >      >>
 >      >> Here's a reference to the feature file in question:
 >      >>
https://gist.github.com/j-white/1574f34cb94dc2d9166ae9805bd4ba3b

 >   
  >
 >      >>
 >   
  
 >   
  >>
 >      >>
 >      >> Thanks for all the effort in maintaining the distribution
- looking
 >      >> forward to getting R7 up and running with JDK 17!
 >      >>
 >      >> Best,
 >      >> Jesse
 >      >>
 >   
  

 >      >> *From:* Jean-Baptiste Onofre mailto:j...@nanthrax.net>
 >     >>
 >      >> *Sent:* Tuesday, September 21, 2021 9:39 AM
 >      >> *To:* user@karaf.apache.org
 >
 >     mailto:user@karaf.apache.org>
>>
 >      >> *Subject:* Re: FileInstaller with 4.3.3
 >      >> WARNING: This email originated outside of NantHealth.
 >      >> DO NOT CLICK links or attachments unless you recognize the
 >     sender and
 >      >> are expecting this email.
 >      >> 
 >      >>
 >      >> Yes, I tried both, no clean, clean as argument, 

Re: FileInstaller with 4.3.3

2021-09-27 Thread Matthias Leinweber
I also tried to add a config file (org.apache.felix.fileinstall-foo.cfg)
into the etc folder before first startup, But also no success.

Br,
Matthias

Am Fr., 24. Sept. 2021 um 10:28 Uhr schrieb Jean-Baptiste Onofré <
j...@nanthrax.net>:

> I think you have a race condition: fileinstall is installed by
> startup.properties, and you provide the config via features core which
> come later in the bootstrap.
>
> Let me try a startup like this and get back to you.
> I keep you posted.
>
> Regards
> JB
>
> On 24/09/2021 09:27, Matthias Leinweber wrote:
> > Hello,
> >
> > Does not work for us. In our assembly we add a boot feature containing:
> >
> >  
> >felix.fileinstall.dir = ${env:CAMEL_PATH:-/deploy/}
> >felix.fileinstall.filter = .*\\.(xml|cfg|groovy)
> >felix.fileinstall.poll = 1000
> >felix.fileinstall.start.level = 80
> >felix.fileinstall.active.level = 80
> >felix.fileinstall.log.level = 3
> >  
> >
> > The content of this fileinstaller does not get processed on the first
> > system start. After restart it's fine, but not a viable option. I tired
> > start+active @ 60,80,100 + start@100 active@80. As well as disable nio2.
> > In all cases I need to touch a file to make it working.
> >
> > br,
> > Matthias
> >
> > Am Do., 23. Sept. 2021 um 21:05 Uhr schrieb Paul Fraser
> > mailto:pa...@qnenet.com>>:
> >
> > Yes, running without clean works OK in my case.
> >
> > Paul Fraser
> >
> > On 23/9/21 6:45 pm, Jean-Baptiste Onofré wrote:
> >  > I guess it works fine without the clean arg right ?
> >  >
> >  > Regards
> >  > JB
> >  >
> >  > On 22/09/2021 13:15, Jesse White wrote:
> >  >> We're hitting a similar problem with the deploy/ folder and can
> >  >> reproduce with a vanilla distribution of Karaf 4.3.3.
> >  >>
> >  >> On Mac OS w/ JDK 11:
> >  >>
> >  >>tar zxvf apache-karaf-4.3.3.tar.gz && cd apache-karaf-4.3.3
> >  >>cp /tmp/confd-telemetry-feature.xml deploy/
> >  >>./bin/karaf clean
> >  >>
> >  >>karaf@root()> feature:info confd-telemetry-auto
> >  >>Feature not found
> >  >>
> >  >> Similar test with Karaf 4.3.2 shows:
> >  >>
> >  >>karaf@root()> feature:info  confd-telemetry-auto
> >  >>Feature confd-telemetry-auto 1.0.0
> >  >>Feature configuration:
> >  >>  org.opennms.features.telemetry.listeners-single-port-flows
> >  >>  org.opennms.features.telemetry.listeners-JTI-Listener
> >  >>  org.opennms.features.telemetry.listeners-NXOS-Listener
> >  >>...
> >  >>
> >  >> Here's a reference to the feature file in question:
> >  >> https://gist.github.com/j-white/1574f34cb94dc2d9166ae9805bd4ba3b
> > 
> >  >>
> >  > >
> >  >>
> >  >> Thanks for all the effort in maintaining the distribution -
> looking
> >  >> forward to getting R7 up and running with JDK 17!
> >  >>
> >  >> Best,
> >  >> Jesse
> >  >>
> >
>  
> >  >> *From:* Jean-Baptiste Onofre  > >
> >  >> *Sent:* Tuesday, September 21, 2021 9:39 AM
> >  >> *To:* user@karaf.apache.org 
> > mailto:user@karaf.apache.org>>
> >  >> *Subject:* Re: FileInstaller with 4.3.3
> >  >> WARNING: This email originated outside of NantHealth.
> >  >> DO NOT CLICK links or attachments unless you recognize the
> > sender and
> >  >> are expecting this email.
> >  >> 
> >  >>
> >  >> Yes, I tried both, no clean, clean as argument, clean in
> >  >> config.properties.
> >  >>
> >  >> All works fine.
> >  >>
> >  >> Can you share some details about your test case and environment
> >  >> (especially if you are on Windows or Unix) ?
> >  >>
> >  >> Regards
> >  >> JB
> >  >>
> >  >>> Le 21 sept. 2021 à 15:00, Matthias Leinweber
> >  >>>  > > a écrit :
> >  >>>
> >  >>> For me it's a custom dist. Did you do a clean start?
> >  >>>
> >  >>> Am Di., 21. Sept. 2021 um 14:28 Uhr schrieb Jean-Baptiste Onofre
> >  >>> mailto:j...@nanthrax.net>>:
> >  >>> Hi,
> >  >>>
> >  >>> I did several test and it works fine for me.
> >  >>>
> >  >>> Here’s the very simplest test:
> >  >>>
> >  >>> - Starting from Karaf 4.3.3 vanilla
> >  >>> - I put commons-lang-2.6.jar in the deploy folder (while Karaf
> is
> >  >>> stopped)
> >  >>> - then, I’m starting Karaf with bin/karaf
> >  >>> - When I checked the bundle:list:
> >  >>>
> >  >>> 54 │ Active   │  10