Java 11, ExampleITest and karaf.version

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Java 11, ExampleITest and karaf.version

rkmoquin
I was looking at my integration tests for karaf and noticed when running on Java 11, I get the following error:

java.lang.NoClassDefFoundError: org/apache/karaf/specs/locator/OsgiLocator

So my question is, where does karaf.version get set when running a Karaf Integration test (https://github.com/apache/karaf/blob/master/examples/karaf-itest-example/src/test/java/org/apache/karaf/examples/itests/ExampleITest.java)?

I looked all through the karaf parent poms, etc, but couldn't find it.  I'm assuming it gets set somewhere in the Karaf code so it's resolvable in the example itests?

Thanks for any help!

Ryan
Reply | Threaded
Open this post in threaded view
|

Re: Java 11, ExampleITest and karaf.version

jbonofre
Hi,

karaf.version is defined in the itest pom.xml:

https://github.com/apache/karaf/blob/master/itests/test/pom.xml#L369

and pass to pax-exam via surefire (as it's a system property).

Regards
JB

On 11/09/2019 17:14, Ryan Moquin wrote:

> I was looking at my integration tests for karaf and noticed when running
> on Java 11, I get the following error:
>
> java.lang.NoClassDefFoundError: org/apache/karaf/specs/locator/OsgiLocator
>
> So my question is, where does karaf.version get set when running a Karaf
> Integration test
> (https://github.com/apache/karaf/blob/master/examples/karaf-itest-example/src/test/java/org/apache/karaf/examples/itests/ExampleITest.java)?
>
> I looked all through the karaf parent poms, etc, but couldn't find it. 
> I'm assuming it gets set somewhere in the Karaf code so it's resolvable
> in the example itests?
>
> Thanks for any help!
>
> Ryan

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Java 11, ExampleITest and karaf.version

rkmoquin
I saw that pom, but I can't make a connection from the karaf-example-itest pom to that one.  The parent of  karaf-example-itest is the apache-karaf-examples which has a parent of karaf... I don't see how that itests pom makes it's way in there... there must be something obvious I'm overlooking (thought I really don't see how it could possibly be getting used).

I'll pass that property through surefire then.

Thanks!
Ryan

On Wed, Sep 11, 2019 at 12:37 PM Jean-Baptiste Onofré <[hidden email]> wrote:
Hi,

karaf.version is defined in the itest pom.xml:

https://github.com/apache/karaf/blob/master/itests/test/pom.xml#L369

and pass to pax-exam via surefire (as it's a system property).

Regards
JB

On 11/09/2019 17:14, Ryan Moquin wrote:
> I was looking at my integration tests for karaf and noticed when running
> on Java 11, I get the following error:
>
> java.lang.NoClassDefFoundError: org/apache/karaf/specs/locator/OsgiLocator
>
> So my question is, where does karaf.version get set when running a Karaf
> Integration test
> (https://github.com/apache/karaf/blob/master/examples/karaf-itest-example/src/test/java/org/apache/karaf/examples/itests/ExampleITest.java)?
>
> I looked all through the karaf parent poms, etc, but couldn't find it. 
> I'm assuming it gets set somewhere in the Karaf code so it's resolvable
> in the example itests?
>
> Thanks for any help!
>
> Ryan

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Java 11, ExampleITest and karaf.version

jbonofre
Oh you mean for the example ITest.

karaf.version is set by default in Karaf Main/config.properties.

Regards
JB

On 11/09/2019 19:39, Ryan Moquin wrote:

> I saw that pom, but I can't make a connection from the
> karaf-example-itest pom to that one.  The parent of  karaf-example-itest
> is the apache-karaf-examples which has a parent of karaf... I don't see
> how that itests pom makes it's way in there... there must be something
> obvious I'm overlooking (thought I really don't see how it could
> possibly be getting used).
>
> I'll pass that property through surefire then.
>
> Thanks!
> Ryan
>
> On Wed, Sep 11, 2019 at 12:37 PM Jean-Baptiste Onofré <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi,
>
>     karaf.version is defined in the itest pom.xml:
>
>     https://github.com/apache/karaf/blob/master/itests/test/pom.xml#L369
>
>     and pass to pax-exam via surefire (as it's a system property).
>
>     Regards
>     JB
>
>     On 11/09/2019 17:14, Ryan Moquin wrote:
>     > I was looking at my integration tests for karaf and noticed when
>     running
>     > on Java 11, I get the following error:
>     >
>     > java.lang.NoClassDefFoundError:
>     org/apache/karaf/specs/locator/OsgiLocator
>     >
>     > So my question is, where does karaf.version get set when running a
>     Karaf
>     > Integration test
>     >
>     (https://github.com/apache/karaf/blob/master/examples/karaf-itest-example/src/test/java/org/apache/karaf/examples/itests/ExampleITest.java)?
>     >
>     > I looked all through the karaf parent poms, etc, but couldn't find
>     it. 
>     > I'm assuming it gets set somewhere in the Karaf code so it's
>     resolvable
>     > in the example itests?
>     >
>     > Thanks for any help!
>     >
>     > Ryan
>
>     --
>     Jean-Baptiste Onofré
>     [hidden email] <mailto:[hidden email]>
>     http://blog.nanthrax.net
>     Talend - http://www.talend.com
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Java 11, ExampleITest and karaf.version

rkmoquin
Interesting, ok.  I guess it's weird because the problem went away when I started passing it in via surefire, but otherwise it couldn't pick it up.  I don't remember that being a problem previously.. now that I know where it's supposed to come from I'll look into it a little more.

Thanks!

On Wed, Sep 11, 2019 at 1:51 PM Jean-Baptiste Onofré <[hidden email]> wrote:
Oh you mean for the example ITest.

karaf.version is set by default in Karaf Main/config.properties.

Regards
JB

On 11/09/2019 19:39, Ryan Moquin wrote:
> I saw that pom, but I can't make a connection from the
> karaf-example-itest pom to that one.  The parent of  karaf-example-itest
> is the apache-karaf-examples which has a parent of karaf... I don't see
> how that itests pom makes it's way in there... there must be something
> obvious I'm overlooking (thought I really don't see how it could
> possibly be getting used).
>
> I'll pass that property through surefire then.
>
> Thanks!
> Ryan
>
> On Wed, Sep 11, 2019 at 12:37 PM Jean-Baptiste Onofré <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi,
>
>     karaf.version is defined in the itest pom.xml:
>
>     https://github.com/apache/karaf/blob/master/itests/test/pom.xml#L369
>
>     and pass to pax-exam via surefire (as it's a system property).
>
>     Regards
>     JB
>
>     On 11/09/2019 17:14, Ryan Moquin wrote:
>     > I was looking at my integration tests for karaf and noticed when
>     running
>     > on Java 11, I get the following error:
>     >
>     > java.lang.NoClassDefFoundError:
>     org/apache/karaf/specs/locator/OsgiLocator
>     >
>     > So my question is, where does karaf.version get set when running a
>     Karaf
>     > Integration test
>     >
>     (https://github.com/apache/karaf/blob/master/examples/karaf-itest-example/src/test/java/org/apache/karaf/examples/itests/ExampleITest.java)?
>     >
>     > I looked all through the karaf parent poms, etc, but couldn't find
>     it. 
>     > I'm assuming it gets set somewhere in the Karaf code so it's
>     resolvable
>     > in the example itests?
>     >
>     > Thanks for any help!
>     >
>     > Ryan
>
>     --
>     Jean-Baptiste Onofré
>     [hidden email] <mailto:[hidden email]>
>     http://blog.nanthrax.net
>     Talend - http://www.talend.com
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com