You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by "Leschke, Scott" <SL...@medline.com> on 2020/12/29 18:31:50 UTC

Multi-release jar bundles

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.<clinit>(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: Multi-release jar bundles

Posted by "Leschke, Scott" <SL...@medline.com>.
Ok, thx.  I’ll do that before COB.

From: Jean-Baptiste Onofre <jb...@nanthrax.net>
Sent: Friday, March 19, 2021 8:45 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,

Yes, good idea to submit a Jira at Felix. I will check there ;)

Thanks,
Regards
JB


Le 19 mars 2021 à 14:22, Leschke, Scott <SL...@medline.com>> a écrit :

JB,

I’m curious how to proceed on this.  Should I submit a Jira against Felix?

Regards,
Scott

From: Leschke, Scott <SL...@medline.com>>
Sent: Wednesday, February 24, 2021 7:31 PM
To: user@karaf.apache.org<ma...@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 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 <SL...@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<https://urldefense.com/v3/__https:/mvnrepository.com/artifact/com.sap.cloud.db.jdbc/ngdbc__;!!PoMpmxQzTok3!u96K7v6YQfqnV0XMYyZg1U_V3cdYSocWCHRKbjj-c1MP5P3pKA26R6_i-zwqciM$>
To be clear, the bundle resolves but the AssertionError mentioned occurs when you try to run a query.
Scott
From: Jean-Baptiste Onofre <jb...@nanthrax.net>>
Sent: Tuesday, January 19, 2021 12:23 AM
To: user <us...@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 <SL...@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 <SL...@medline.com>>
Sent: Wednesday, December 30, 2020 9:12 AM
To: user@karaf.apache.org<ma...@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<ma...@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 <SL...@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: Multi-release jar bundles

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi Scott,

Yes, good idea to submit a Jira at Felix. I will check there ;)

Thanks,
Regards
JB

> Le 19 mars 2021 à 14:22, Leschke, Scott <SL...@medline.com> a écrit :
> 
> JB,
>  
> I’m curious how to proceed on this.  Should I submit a Jira against Felix?
>  
> Regards,
> Scott
>  
> From: Leschke, Scott <SLeschke@medline.com <ma...@medline.com>> 
> Sent: Wednesday, February 24, 2021 7:31 PM
> To: user@karaf.apache.org <ma...@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 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 <SLeschke@medline.com <ma...@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 <https://urldefense.com/v3/__https:/mvnrepository.com/artifact/com.sap.cloud.db.jdbc/ngdbc__;!!PoMpmxQzTok3!u96K7v6YQfqnV0XMYyZg1U_V3cdYSocWCHRKbjj-c1MP5P3pKA26R6_i-zwqciM$>
> To be clear, the bundle resolves but the AssertionError mentioned occurs when you try to run a query.
> Scott
> From: Jean-Baptiste Onofre <jb@nanthrax.net <ma...@nanthrax.net>> 
> Sent: Tuesday, January 19, 2021 12:23 AM
> To: user <user@karaf.apache.org <ma...@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 <SLeschke@medline.com <ma...@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 <SLeschke@medline.com <ma...@medline.com>> 
> Sent: Wednesday, December 30, 2020 9:12 AM
> To: user@karaf.apache.org <ma...@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 <ma...@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 <SLeschke@medline.com <ma...@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: Multi-release jar bundles

Posted by "Leschke, Scott" <SL...@medline.com>.
JB,

I’m curious how to proceed on this.  Should I submit a Jira against Felix?

Regards,
Scott

From: Leschke, Scott <SL...@medline.com>
Sent: Wednesday, February 24, 2021 7:31 PM
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 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 <SL...@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<https://urldefense.com/v3/__https:/mvnrepository.com/artifact/com.sap.cloud.db.jdbc/ngdbc__;!!PoMpmxQzTok3!u96K7v6YQfqnV0XMYyZg1U_V3cdYSocWCHRKbjj-c1MP5P3pKA26R6_i-zwqciM$>
To be clear, the bundle resolves but the AssertionError mentioned occurs when you try to run a query.
Scott
From: Jean-Baptiste Onofre <jb...@nanthrax.net>>
Sent: Tuesday, January 19, 2021 12:23 AM
To: user <us...@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 <SL...@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 <SL...@medline.com>>
Sent: Wednesday, December 30, 2020 9:12 AM
To: user@karaf.apache.org<ma...@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<ma...@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 <SL...@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: Multi-release jar bundles

Posted by "Leschke, Scott" <SL...@medline.com>.
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 <jb...@nanthrax.net>
Sent: Tuesday, January 19, 2021 11:08 AM
To: user <us...@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,

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

Regards
JB


Le 19 janv. 2021 à 15:46, Leschke, Scott <SL...@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<https://urldefense.com/v3/__https:/mvnrepository.com/artifact/com.sap.cloud.db.jdbc/ngdbc__;!!PoMpmxQzTok3!u96K7v6YQfqnV0XMYyZg1U_V3cdYSocWCHRKbjj-c1MP5P3pKA26R6_i-zwqciM$>
To be clear, the bundle resolves but the AssertionError mentioned occurs when you try to run a query.
Scott
From: Jean-Baptiste Onofre <jb...@nanthrax.net>>
Sent: Tuesday, January 19, 2021 12:23 AM
To: user <us...@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 <SL...@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 <SL...@medline.com>>
Sent: Wednesday, December 30, 2020 9:12 AM
To: user@karaf.apache.org<ma...@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<ma...@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 <SL...@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: Multi-release jar bundles

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi,

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

Regards
JB

> Le 19 janv. 2021 à 15:46, Leschke, Scott <SL...@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 <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 <jb@nanthrax.net <ma...@nanthrax.net>> 
> Sent: Tuesday, January 19, 2021 12:23 AM
> To: user <user@karaf.apache.org <ma...@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 <SLeschke@medline.com <ma...@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 <SLeschke@medline.com <ma...@medline.com>> 
> Sent: Wednesday, December 30, 2020 9:12 AM
> To: user@karaf.apache.org <ma...@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 <ma...@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 <SLeschke@medline.com <ma...@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: Multi-release jar bundles

Posted by "Leschke, Scott" <SL...@medline.com>.
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 <jb...@nanthrax.net>
Sent: Tuesday, January 19, 2021 12:23 AM
To: user <us...@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 <SL...@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 <SL...@medline.com>>
Sent: Wednesday, December 30, 2020 9:12 AM
To: user@karaf.apache.org<ma...@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<ma...@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 <SL...@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: Multi-release jar bundles

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
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 <SL...@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 <SLeschke@medline.com <ma...@medline.com>> 
> Sent: Wednesday, December 30, 2020 9:12 AM
> To: user@karaf.apache.org <ma...@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 <ma...@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 <SLeschke@medline.com <ma...@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: Multi-release jar bundles

Posted by "Leschke, Scott" <SL...@medline.com>.
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 <SL...@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 <SL...@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: Multi-release jar bundles

Posted by "Leschke, Scott" <SL...@medline.com>.
I think you should be able to reproduce it if you can get hold of the driver.

From: Jean-Baptiste Onofre <jb...@nanthrax.net>
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 <SL...@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.<clinit>(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: Multi-release jar bundles

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
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 <SL...@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.<clinit>(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