Pax JDBC pooling configuration

2021-02-24 Thread Daniel Las
Hi,

I'm using PostgreSQL datasource and pax-jdbc-pool-dbcp2. I'm struggling to
find good documentation of datasource pooling configuration. Where can I
find one?

Best regards
-- 
Daniel Łaś
CTO at Empirica S.A.
+48 695 616181


Re: Karaf 4.2.10 - NullPointerException during xml parsing

2021-02-24 Thread brock samson
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 such case.
4) I have also provided the source .java alongside the binary just in case.

again, really appreciate you taking the time to look at it. thanks!!!

Brock Samson


From: Jean-Baptiste Onofre 
Sent: Tuesday, February 23, 2021 11:56 AM
To: user@karaf.apache.org 
Subject: Re: Karaf 4.2.10 - NullPointerException during xml parsing

Hi Brock,

Maybe you have xerces installed as bundle in your distribution ?

It sounds like a version mismatch.

Can you share the bundles installed ?

Thanks,
Regards
JB

Le 23 févr. 2021 à 16:55, brock samson 
mailto:brock.sams...@hotmail.com>> a écrit :

Hello,

I am using Karaf 4.2.10 and attempting to perform a rather simple xml parsing:

Caused by: java.lang.NullPointerException
at org.apache.xerces.util.ErrorHandlerProxy.error(Unknown 
Source) ~[!/:?]
at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:137)
 ~[?:1.8.0_102]
at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
 ~[?:1.8.0_102]
at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
 ~[?:1.8.0_102]
at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
 ~[?:1.8.0_102]
at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1900)
 ~[?:1.8.0_102]
at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:740)
 ~[?:1.8.0_102]
at 
com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:570)
 ~[?:1.8.0_102]
at 
org.apache.xerces.jaxp.JAXPValidatorComponent$XNI2SAX.startElement(Unknown 
Source) ~[!/:?]
at 
org.apache.xerces.jaxp.JAXPValidatorComponent.startElement(Unknown Source) 
~[!/:?]
at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown 
Source) ~[!/:?]
at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
 Source) ~[!/:?]
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source) ~[!/:?]
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source) ~[!/:?]
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source) ~[!/:?]
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source) ~[!/:?]
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) 
~[!/:?]
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) 
~[!/:?]
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown 
Source) ~[!/:?]
at 
javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) ~[?:1.8.0_102]

After snooping around, I noticed a 
/container/lib/endorsed/org.apache.karaf.specs.java.xml-4.2.10.jar lib 
containing parser-related libs. My code executed successfully once I ran Karaf 
without this particular file, though I don’t feel right just pulling it out of 
Karaf blindly, as its absence creates a distinct possibility of unforeseen 
issues down the road.

Here are the only imports my bundle references in its manifest:
Import-Package: 
javax.xml.transform,javax.xml.transform.stream,org.xml.sax,javax.xml.parsers,javax.xml.validation
There are no entries under Bundle-Classpath

Lastly, here is the java code that performs the xml parsing:

DocumentBuilderFactory factory = 
DocumentBuilderFactory.newInstance();
SchemaFactory sf = 
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Schema schema = sf.newSchema(new StreamSource(new 
FileInputStream("")));
factory.setNamespaceAware(true);
factory.setSchema(schema);
factory.setExpandEntityReferences(false);
factory.setXIncludeAware(false);

factory.setFeature("http://xml.org/sax/features/external-par

RE: Multi-release jar bundles

2021-02-24 Thread Leschke, Scott
Hi JB,

Just following up on the issue below. I realize this is really a Felix issue, 
so would it be best for me to submit a Jira to that project?  I realize you’re 
attached to that project as well so I don’t want to submit a Jira if it’s 
already been done at some level.

Regards,

Scott

From: Jean-Baptiste Onofre 
Sent: Tuesday, January 19, 2021 11:08 AM
To: user 
Subject: Re: Multi-release jar bundles

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.

Hi,

Understood, I will try to submit a PR for them.

Regards
JB


Le 19 janv. 2021 à 15:46, Leschke, Scott 
mailto:slesc...@medline.com>> a écrit :

SAP is claiming it’s a Karaf/platform issue, (Lack of support for MRJars). For 
what it’s worth, you can find the JDBC driver here: 
https://mvnrepository.com/artifact/com.sap.cloud.db.jdbc/ngdbc
To be clear, the bundle resolves but the AssertionError mentioned occurs when 
you try to run a query.
Scott
From: Jean-Baptiste Onofre mailto:j...@nanthrax.net>>
Sent: Tuesday, January 19, 2021 12:23 AM
To: user mailto:user@karaf.apache.org>>
Subject: Re: Multi-release jar bundles
CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.

Hi Scott,
Not yet, but it looks like SAP driver issue. I guess you can create a Jira at 
SAP.
Regards
JB



Le 19 janv. 2021 à 04:07, Leschke, Scott 
mailto:slesc...@medline.com>> a écrit :
Hi JB,
I was wondering if you had a chance to takle a look at the issue I mentioned 
previously below? The JDBC driver in question is SAP HANAm file ngdbc-2.7.7.jar 
(or ngdbc-2.5.52.jar as well). Karaf 4.30, openjdk-14.0.2, Windows Server 2016.
Should I create a Felix Jira issue for this?
Regards,
Scott Leschke
From: Leschke, Scott mailto:slesc...@medline.com>>
Sent: Wednesday, December 30, 2020 9:12 AM
To: user@karaf.apache.org
Subject: RE: Multi-release jar bundles
CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.

I think you should be able to reproduce it if you can get hold of the driver.
From: Jean-Baptiste Onofre
Sent: Wednesday, December 30, 2020 12:09 AM
To: user@karaf.apache.org
Subject: Re: Multi-release jar bundles
CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.

Hi Scott,
You can try to wrap settings the TCCL, but it seems more a driver issue.
Can I reproduce it easily (just installingg SAP driver for instance) ?
Regards
JB
Le 29 déc. 2020 à 19:31, Leschke, Scott 
mailto:slesc...@medline.com>> a écrit :
I have a JDBC driver jar (SAP HANA), that is build both as a bundle and an 
MRJar file supporting JDKs 1.8, 9, 11. It works fine when I run Karaf using JDK 
1.8, but if I try to use a more recent JDK, the driver throws the following
Caused by: java.lang.AssertionError: Unexpected Java class loaded under Java 
version 11 (maximum supported version is 8)
at com.sap.db.jdbc.DriverSapDB._checkJavaVersion(DriverSapDB.java:2055) ~[?:?]
at com.sap.db.jdbc.DriverSapDB.checkJavaVersionMaximum8(DriverSapDB.java:2030) 
~[?:?]
at com.sap.db.jdbc.Driver.(Driver.java:17) ~[?:?]
An SAP person says they think the classloader isn’t MRJar aware and is loading 
the incorrect class. I most recently tried this with OpenJDK 14.x. Since OSGi 
involves lots of classloader magic, might that be the case or might something 
else be going on here?
Thanks and regards,
Scott Leschke



Re: Need guide to deploy Spring boot services in Karaf

2021-02-24 Thread Francois Papon
Hi,

Can you explain your use case a bit more and why you are interesting
about running springboot in Karaf?

Do you have some features you would have in Karaf around springboot?

As JB said, we are currently working on Karaf 5 so every feedback are
very valuable for us :)

regards,

François
fpa...@apache.org

Le 24/02/2021 à 18:09, Som Shankar Bhattacharyya a écrit :
> Hello,
>  I am learning Karaf and I think it has excellent potential for use at
> various places. I was looking to put together a quick example of using
> spring boot apps as modules on Karaf/
> I cannot find one. Can someone point me to a guide or example ?
>
> Thanks.


Re: Need guide to deploy Spring boot services in Karaf

2021-02-24 Thread Jean-Baptiste Onofre
I will share all details on the mailing list soon.

Regards
JB

> Le 24 févr. 2021 à 18:39, Som Shankar Bhattacharyya 
>  a écrit :
> 
> Where can I look for that next week ? That will be super useful to see while 
> I keep learning the other use cases.
> 
> On Wed, Feb 24, 2021 at 10:45 PM Jean-Baptiste Onofre  > wrote:
> Hi,
> 
> Spring boot support in Karaf is not yet available out of the box. It will be 
> available in Karaf 5 (in preparation).
> 
> If you wanna try, you will be able to take a look end of next week.
> 
> Regards
> JB
> 
> > Le 24 févr. 2021 à 18:09, Som Shankar Bhattacharyya 
> > mailto:bhattacharyya...@gmail.com>> a écrit :
> > 
> > Hello,
> >  I am learning Karaf and I think it has excellent potential for use at 
> > various places. I was looking to put together a quick example of using 
> > spring boot apps as modules on Karaf/
> > I cannot find one. Can someone point me to a guide or example ?
> > 
> > Thanks.
> 



Re: Need guide to deploy Spring boot services in Karaf

2021-02-24 Thread Som Shankar Bhattacharyya
Where can I look for that next week ? That will be super useful to see
while I keep learning the other use cases.

On Wed, Feb 24, 2021 at 10:45 PM Jean-Baptiste Onofre 
wrote:

> Hi,
>
> Spring boot support in Karaf is not yet available out of the box. It will
> be available in Karaf 5 (in preparation).
>
> If you wanna try, you will be able to take a look end of next week.
>
> Regards
> JB
>
> > Le 24 févr. 2021 à 18:09, Som Shankar Bhattacharyya <
> bhattacharyya...@gmail.com> a écrit :
> >
> > Hello,
> >  I am learning Karaf and I think it has excellent potential for use at
> various places. I was looking to put together a quick example of using
> spring boot apps as modules on Karaf/
> > I cannot find one. Can someone point me to a guide or example ?
> >
> > Thanks.
>
>


Re: Need guide to deploy Spring boot services in Karaf

2021-02-24 Thread Jean-Baptiste Onofre
Hi,

Spring boot support in Karaf is not yet available out of the box. It will be 
available in Karaf 5 (in preparation).

If you wanna try, you will be able to take a look end of next week.

Regards
JB

> Le 24 févr. 2021 à 18:09, Som Shankar Bhattacharyya 
>  a écrit :
> 
> Hello,
>  I am learning Karaf and I think it has excellent potential for use at 
> various places. I was looking to put together a quick example of using spring 
> boot apps as modules on Karaf/
> I cannot find one. Can someone point me to a guide or example ?
> 
> Thanks.



Need guide to deploy Spring boot services in Karaf

2021-02-24 Thread Som Shankar Bhattacharyya
Hello,
 I am learning Karaf and I think it has excellent potential for use at
various places. I was looking to put together a quick example of using
spring boot apps as modules on Karaf/
I cannot find one. Can someone point me to a guide or example ?

Thanks.


AW: Calls via client.sh and client.bat on karaf 4.2.10 run into timout

2021-02-24 Thread Lorr, Sebastian
Hi,

meanwhile i decreased sshIdleTimeout to 3. it helps with our calls like
echo "bundle:list" | /home/user/apache-karaf-${KARAF_VERSION}-MASTER/bin/client 
-b -r 60 -d 10

Cheers,

Sebastian



Sebastian Lorr
ITS Digital Solutions GmbH
Dillenburger Str. 77
D-51105 Köln
Tel.: +49 (0)221 820 07 0
Fax : +49 (0)221 820 07 22
Mail: i...@its-digital.de
Web : http://www.its-digital.de

Sitz der Gesellschaft: Dortmund
Amtsgericht Dortmund, HRB 28563
Geschäftsführer: Gunnar Haack, Ludger Schulte, Heinrich Toben, Raimund Schipp, 
Ralf Petersilka


Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der richtige 
Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie 
bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte 
Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

This e-mail may contain confidential information. If you are not the intended 
recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorised copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



Von: JB Onofré 
Gesendet: Freitag, 19. Februar 2021 14:39
An: user@karaf.apache.org 
Betreff: Re: Calls via client.sh and client.bat on karaf 4.2.10 run into timout

I mean the code fix I did already.

Le 19 févr. 2021 à 14:33, JB Onofré  a écrit :


Hi

Let me check but I’m afraid we need a code fix.

I will keep you posted.

Regards
JB

Le 19 févr. 2021 à 14:25, Lorr, Sebastian  a 
écrit :


Hi JB,

thanks for the quick response. Is there some workaround for  this issue for 
4.2.10?

thanks,

Sebastian



Sebastian Lorr
ITS Digital Solutions GmbH
Dillenburger Str. 77
D-51105 Köln
Tel.: +49 (0)221 820 07 0
Fax : +49 (0)221 820 07 22
Mail: i...@its-digital.de
Web : http://www.its-digital.de

Sitz der Gesellschaft: Dortmund
Amtsgericht Dortmund, HRB 28563
Geschäftsführer: Gunnar Haack, Ludger Schulte, Heinrich Toben, Raimund Schipp, 
Ralf Petersilka


Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der richtige 
Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie 
bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte 
Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

This e-mail may contain confidential information. If you are not the intended 
recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorised copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



Von: Jean-Baptiste Onofre 
Gesendet: Freitag, 19. Februar 2021 13:08
An: user 
Betreff: Re: Calls via client.sh and client.bat on karaf 4.2.10 run into timout

Hi,

The fix is in 4.3.1-SNAPSHOT and 4.2.11-SNAPSHOT.

I think you hit this one: https://issues.apache.org/jira/browse/KARAF-6948

Let me reopen it to check 4.2.11.

Regards
JB

Le 19 févr. 2021 à 12:48, Stefan Günst 
mailto:stefan.gue...@me.com>> a écrit :

Hi JB,

same problem in 4.3.0.

A lot of my external scripts will no longer work as expected.

Regards

Stefan


Am 18.02.2021 um 18:39 schrieb jbonofre [via Karaf] 
mailto:ml+s922171n4059563...@n3.nabble.com>>:

Hi

I think it’s something I already fixed (but not yet released). Let me check.

Regards
JB

Le 18 févr. 2021 à 17:41, Lorr, Sebastian <[hidden email]> a écrit :


Hi,

i observed following behaviour:

  *   I deflate karaf4.2.10 zip (or tar.gz)
  *   I change to bin-folder
  *   call start.bat (or start.sh)
  *   call client.bat list

The list gets executed, but the command does not snapout. So it waits for 
thirty minutes and reaches a timeout.

I tried on linux and windows using java 8

Any hint what i am doing wrong ?

Thanks in Advance,

Sebastian




Sebastian Lorr
ITS Digital Solutions GmbH
Dillenburger Str. 77
D-51105 Köln
Tel.: +49 (0)221 820 07 0
Fax : +49 (0)221 820 07 22
Mail: [hidden email]
Web : http://www.its-digital.de

Sitz der Gesellschaft: Dortmund
Amtsgericht Dortmund, HRB 28563
Geschäftsführer: Gunnar Haack, Ludger Schulte, Heinrich Toben, Raimund Schipp, 
Ralf Petersilka


Diese E-Mail enthält vertrauliche Informationen. Wenn S