Re: Karaf 4.2.10 - NullPointerException during xml parsing

2021-03-21 Thread Jean-Baptiste Onofre
Hi Brock,

Yes I confirm, this is for 4.2.12 (sorry, I didn’t have time to include in 
4.2.11).

By the way, did we create a Jira related to this ?

Regards
JB

> Le 22 mars 2021 à 03:37, brock samson  a écrit :
> 
> JB,
> 
> could you please confirm that this fix is in fact heading for the 4.2.12 
> release? thanks!
> 
> From: brock samson 
> Sent: Thursday, March 4, 2021, 2:28 PM
> To: user@karaf.apache.org
> Subject: Re: Karaf 4.2.10 - NullPointerException during xml parsing
> 
> sounds good
> From: Jean-Baptiste Onofre 
> Sent: Wednesday, March 3, 2021 10:47:26 PM
> To: user 
> Subject: Re: Karaf 4.2.10 - NullPointerException during xml parsing
>  
> Hi Brock,
> 
> It will be short for 4.2.11 (eventually 4.2.12): I don’t want to hold 4.2.11 
> any longer.
> 
> As you have a workaround (removing xml jar from lib/endorsed), I would prefer 
> to target 4.2.12 if you don’t mind.
> 
> Regards
> JB
> 
>> Le 3 mars 2021 à 21:14, brock samson > > a écrit :
>> 
>> would it be possible to have this fixed in the upcoming 4.2.11 release?
>> 
>> From: Jean-Baptiste Onofre mailto:j...@nanthrax.net>>
>> Sent: Wednesday, March 3, 2021 2:50 AM
>> To: user mailto:user@karaf.apache.org>>
>> Subject: Re: Karaf 4.2.10 - NullPointerException during xml parsing
>>  
>> Hi,
>> 
>> Yes, 90% of the use cases don’t need java.xml in lib/endorsed.
>> 
>> Regards
>> JB
>> 
>>> Le 3 mars 2021 à 08:42, brock samson >> > a écrit :
>>> 
>>> Hi JB
>>> 
>>> I know you are quite busy so no need to apologize.
>>> 
>>> Just to make sure I understood you correctly, the 
>>> org.apache.karaf.specs.java.xml-4.2.10.jar can be permanently removed from 
>>> the /endorsed dir without any negative side effects, right?
>>> 
>>>   
>>> From: Jean-Baptiste Onofre mailto:j...@nanthrax.net>>
>>> Sent: Wednesday, March 3, 2021 12:14 AM
>>> To: user mailto:user@karaf.apache.org>>
>>> Subject: Re: Karaf 4.2.10 - NullPointerException during xml parsing
>>>  
>>> Hi Brock,
>>> 
>>> Sorry for the very late answer.
>>> 
>>> The reason why javax.xml is in lib/endorsed folder is because core Karaf 
>>> loads just the spec and let you install the impl.
>>> Anyway, you can remove it from endorsed and install bundles, it works as 
>>> well.
>>> It’s basically what we plan to do by default as part of KARAF-6703.
>>> 
>>> Regards
>>> JB
>>> 
 Le 3 mars 2021 à 05:50, brock samson >>> > a écrit :
 
 Hi João
 
 Thank you for looking into this issue. Its nice to know it no longer 
 appears in karaf 4.3, but is there another way to resolve this in 4.2.10 
 without changing the code? More specifically, is there a reason why 
 org.apache.karaf.specs.java.xml-4.2.10.jar resides in the /endorsed 
 directory as opposed to being exposed by a bundle? The reason for me 
 asking is because the bundle approach would allow me to choose which 
 implementation my bundle would reference, while the current endorsed 
 approach leaves me no choice.
 
 Regards,
 
 Brock
 
   
 From: João Assunção >>> >
 Sent: Tuesday, March 2, 2021 5:28 PM
 To: user@karaf.apache.org  
 mailto:user@karaf.apache.org>>
 Subject: Re: Karaf 4.2.10 - NullPointerException during xml parsing
  
 Hi Brock,
 
 I tried your jar but it failed due to the layout of the jar (the MANIFEST 
 was not the first entry in the jar or something like that). I created a 
 bundle with our code and when I tried with karaf 4.3 it passed.
 I then tried with 4.2.7 and I experienced the same NPE. Apparently the 
 behavior when the errorHandler is set to null is different between 
 implementations of the XML libs supplied in these two versions of karaf.
 In your code setting the error handler to builder.setErrorHandler(new 
 org.xml.sax.helpers.DefaultHandler()); seems to do the trick.
 
 I noticed your manifest is importing a bunch of packages not required for 
 the code in question. 
 
 Regards
 João Assunção
 
 Email: joao.assun...@exploitsys.com 
 Mobile: +351 916968984
 Phone: +351 211933149
 Web: www.exploitsys.com 
 
 
 
 
 On Tue, Mar 2, 2021 at 3:33 AM brock samson >>> > wrote:
 hi, JB. did you get a chance to run my bundle?
 
   
 From: brock samson >>> >
 Sent: Wednesday, February 24, 2021, 11:18 PM
 To: user@karaf.apache.org 
 Subject: Re: Karaf 4.2.10 - NullPointerException during xml parsing
 
 hi, JB.
 
 thank you for looking at this. The attached zip (rename its extension from 
 .txt to .zip) contains both the bundle (rename its extension from .txt to 

Re: Karaf 4.2.10 - NullPointerException during xml parsing

2021-03-21 Thread brock samson
JB,

could you please confirm that this fix is in fact heading for the 4.2.12 
release? thanks!


From: brock samson 
Sent: Thursday, March 4, 2021, 2:28 PM
To: user@karaf.apache.org
Subject: Re: Karaf 4.2.10 - NullPointerException during xml parsing

sounds good

From: Jean-Baptiste Onofre 
Sent: Wednesday, March 3, 2021 10:47:26 PM
To: user 
Subject: Re: Karaf 4.2.10 - NullPointerException during xml parsing

Hi Brock,

It will be short for 4.2.11 (eventually 4.2.12): I don’t want to hold 4.2.11 
any longer.

As you have a workaround (removing xml jar from lib/endorsed), I would prefer 
to target 4.2.12 if you don’t mind.

Regards
JB

Le 3 mars 2021 à 21:14, brock samson 
mailto:brock.sams...@hotmail.com>> a écrit :

would it be possible to have this fixed in the upcoming 4.2.11 release?


From: Jean-Baptiste Onofre mailto:j...@nanthrax.net>>
Sent: Wednesday, March 3, 2021 2:50 AM
To: user mailto:user@karaf.apache.org>>
Subject: Re: Karaf 4.2.10 - NullPointerException during xml parsing

Hi,

Yes, 90% of the use cases don’t need java.xml in lib/endorsed.

Regards
JB

Le 3 mars 2021 à 08:42, brock samson 
mailto:brock.sams...@hotmail.com>> a écrit :

Hi JB

I know you are quite busy so no need to apologize.

Just to make sure I understood you correctly, the 
org.apache.karaf.specs.java.xml-4.2.10.jar can be permanently removed from the 
/endorsed dir without any negative side effects, right?



From: Jean-Baptiste Onofre mailto:j...@nanthrax.net>>
Sent: Wednesday, March 3, 2021 12:14 AM
To: user mailto:user@karaf.apache.org>>
Subject: Re: Karaf 4.2.10 - NullPointerException during xml parsing

Hi Brock,

Sorry for the very late answer.

The reason why javax.xml is in lib/endorsed folder is because core Karaf loads 
just the spec and let you install the impl.
Anyway, you can remove it from endorsed and install bundles, it works as well.
It’s basically what we plan to do by default as part of KARAF-6703.

Regards
JB

Le 3 mars 2021 à 05:50, brock samson 
mailto:brock.sams...@hotmail.com>> a écrit :

Hi João

Thank you for looking into this issue. Its nice to know it no longer appears in 
karaf 4.3, but is there another way to resolve this in 4.2.10 without changing 
the code? More specifically, is there a reason why 
org.apache.karaf.specs.java.xml-4.2.10.jar resides in the /endorsed directory 
as opposed to being exposed by a bundle? The reason for me asking is because 
the bundle approach would allow me to choose which implementation my bundle 
would reference, while the current endorsed approach leaves me no choice.

Regards,

Brock



From: João Assunção 
mailto:joao.assun...@exploitsys.com>>
Sent: Tuesday, March 2, 2021 5:28 PM
To: user@karaf.apache.org 
mailto:user@karaf.apache.org>>
Subject: Re: Karaf 4.2.10 - NullPointerException during xml parsing

Hi Brock,

I tried your jar but it failed due to the layout of the jar (the MANIFEST was 
not the first entry in the jar or something like that). I created a bundle with 
our code and when I tried with karaf 4.3 it passed.
I then tried with 4.2.7 and I experienced the same NPE. Apparently the behavior 
when the errorHandler is set to null is different between implementations of 
the XML libs supplied in these two versions of karaf.
In your code setting the error handler to builder.setErrorHandler(new 
org.xml.sax.helpers.DefaultHandler()); seems to do the trick.

I noticed your manifest is importing a bunch of packages not required for the 
code in question.

Regards
João Assunção

Email: joao.assun...@exploitsys.com
Mobile: +351 916968984
Phone: +351 211933149
Web: www.exploitsys.com




On Tue, Mar 2, 2021 at 3:33 AM brock samson 
mailto:brock.sams...@hotmail.com>> wrote:
hi, JB. did you get a chance to run my bundle?



From: brock samson mailto:brock.sams...@hotmail.com>>
Sent: Wednesday, February 24, 2021, 11:18 PM
To: user@karaf.apache.org
Subject: Re: Karaf 4.2.10 - NullPointerException during xml parsing

hi, JB.

thank you for looking at this. The attached zip (rename its extension from .txt 
to .zip) contains both the bundle (rename its extension from .txt to .jar) and 
its feature file. the bundle should be placed in the /bundles dir, and you know 
what to do with the feature file =)
here are some points regarding the bundle:
1) the bundle executes automatically during Karaf startup to make it easier for 
you.
2) The bundle contains both the schema and the xml, so you dont have to really 
do anything to the bundle itself in order for it to just run
3) The bundle contains props.properties where you can specify external 
locations to both schema and xml file if you choose to do so for any reason. 
The provided files will be ignored in

Re: [ANN] Apache Karaf 4.2.11 has been released

2021-03-21 Thread Steinar Bang
> jbono...@apache.org:

> The Apache Karaf team is pleased so announce Apache Karaf runtime 4.2.11 
> release.
> This release is an important release on the Karaf 4.2.x series, bringing 
> updates, fixes and new features, especially:

> * Karaf BoM

The 4.2.11 BoM has now been used to slim down the pom-files of my
karaf-based java projects:
 
https://github.com/steinarb/authservice/commit/8a3ca2c42435b2b667f1b6de7428c2c946da1115
 
https://github.com/steinarb/ukelonn/commit/8c740a74dfdf9643e11839ecb304e9be6ed32386
 
https://github.com/steinarb/handlereg/commit/c6130307dd5ba808fd608e7e1eafa77a3bc31f03
 
https://github.com/steinarb/sonar-collector/commit/14d7ca9d3171d3c15fdd09bde7e53e813b2ce75c
 
https://github.com/steinarb/oldalbum/commit/a50883789f4ff578205e36d045df2dbf16102852
 
https://github.com/steinarb/authservice-sampleclient/commit/89d671487d35722140de5a27644b25a59930c977

Thanks, JB! :-)