You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Michael Szalay <mi...@basis06.ch> on 2011/03/15 14:25:40 UTC

Fwd: Problem while testing Apache Karaf

Hi all

does anyone know how to correctly setup pax-eam for karaf?
Which version of pax-exam do I need?

What bundles Do I have to include in my features so that the blueprint services are coming up?

Regards Michael

----- Weitergeleitete Mail -----
Von: "Toni Menzel" <to...@okidokiteam.com>
An: "General OPS4J" <ge...@lists.ops4j.org>
CC: "Michael Szalay" <mi...@basis06.ch>
Gesendet: Dienstag, 15. März 2011 14:09:40
Betreff: Re: Problem while testing Apache Karaf

Hi Michael,


You are using some extra runtime bundle from the Karaf project: org.apache.felix.karaf.tooling.testing
This looks like importing something, that - at least i - did not intend to have available at runtime at all.


So its 2 folds:
- check if the version of org.apache.felix.karaf.tooling.testing you are using is compatible (from karaf docs e.g.) with pax exam 1.2.3 (which you are using appealingly)
- or file an issue on the Karaf Issue Tracker


As a side effect, i am currently porting the karaf stuff to be usable with Exam2 as part of the compatibility (Exam 1.x to 2.0) effort. But this should not stress you. I just mention it because i may be able to tell you more about what you are doing wrong while i am progressing.


But better check with Karaf friends directly, too.


Cheers,
Toni




On Tue, Mar 15, 2011 at 1:55 PM, Michael Szalay < michael.szalay@basis06.ch > wrote:


Hi all

I want to setup a integration test infrastructure for my OSGi blueprint projects.
We use Apache Karaf as a framework.

I wrote my JUnit test and installed my features.
Now I have the unresolved dependency:

Unresolved constraint in bundle org.apache.felix.karaf.tooling.testing [12]: Unable to resolve 12.0: missing requirement [12.0] package; (package=org.ops4j.pax.exam.container.def) - [12.0] package; (package=org.ops4j.pax.exam.container.def)

My question: where do I find this dependency as a bundle?
I tried the following

<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-container-default</artifactId>
<version>1.2.3</version>
<scope>test</scope>
</dependency>

But this is not a bundle, just a jar, right?

Regards Michael

--
Michael Szalay Senior Software Engineer

basis06 AG, Birkenweg 61, CH-3013 Bern - Fon +41 31 311 32 22
http://www.basis06.ch - source of smart business


_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general



--
Toni Menzel - http://www.okidokiteam.com

Re: Problem while testing Apache Karaf

Posted by Andreas Pieber <an...@gmail.com>.
Mhm... To setup a full Karaf-IT environment is not that trivial... The
karaf ITests themselves tests only some parts and does not show
complexer feature setup. BTW, you should not use karaf in a version <
2.x by now (best to use karaf-2.2.x).

A more complex itests setup for pax-exam with Karaf can be found here
e.g.: https://github.com/openengsb/openengsb/tree/master/itests

Kind regards,
Andreas

On Tue, Mar 15, 2011 at 2:43 PM, Michael Szalay
<mi...@basis06.ch> wrote:
> Hi Jean-Baptise
>
> thanks for you answer.
> If I run pax-exam with karaf, the framework complains that it wants the package org.apache.felix.karaf.testing.AbstractIntegrationTest
> as a bundle, so I added
>
> <bundle>mvn:org.apache.felix.karaf.tooling/org.apache.felix.karaf.tooling.testing/1.6.0</bundle>
>
> to my feature.
> But this complains that package "org.ops4j.pax.exam.container.def" is missing.
> This package is not available as a bundle, I checked with the ops4j people (see below).
> Its not intended to be available at runtime.
>
> It works if I'm not using AbstractIntegrationTest.
>
> What am I doing wrong?
>
> Regards Michael
>
> ----- Ursprüngliche Mail -----
> Von: "Jean-Baptiste Onofré" <jb...@nanthrax.net>
> An: user@karaf.apache.org
> Gesendet: Dienstag, 15. März 2011 14:30:20
> Betreff: Re: Fwd: Problem while testing Apache Karaf
>
> Hi Michael,
>
> you can use PAX Exam 1.2.4. Regarding the bundle, it depends of what do
> you want to test.
> For blueprint, you need the Aries Blueprint bundle at least.
>
> Regards
> JB
>
> On 03/15/2011 02:25 PM, Michael Szalay wrote:
>> Hi all
>>
>> does anyone know how to correctly setup pax-eam for karaf?
>> Which version of pax-exam do I need?
>>
>> What bundles Do I have to include in my features so that the blueprint services are coming up?
>>
>> Regards Michael
>>
>> ----- Weitergeleitete Mail -----
>> Von: "Toni Menzel"<to...@okidokiteam.com>
>> An: "General OPS4J"<ge...@lists.ops4j.org>
>> CC: "Michael Szalay"<mi...@basis06.ch>
>> Gesendet: Dienstag, 15. März 2011 14:09:40
>> Betreff: Re: Problem while testing Apache Karaf
>>
>> Hi Michael,
>>
>>
>> You are using some extra runtime bundle from the Karaf project: org.apache.felix.karaf.tooling.testing
>> This looks like importing something, that - at least i - did not intend to have available at runtime at all.
>>
>>
>> So its 2 folds:
>> - check if the version of org.apache.felix.karaf.tooling.testing you are using is compatible (from karaf docs e.g.) with pax exam 1.2.3 (which you are using appealingly)
>> - or file an issue on the Karaf Issue Tracker
>>
>>
>> As a side effect, i am currently porting the karaf stuff to be usable with Exam2 as part of the compatibility (Exam 1.x to 2.0) effort. But this should not stress you. I just mention it because i may be able to tell you more about what you are doing wrong while i am progressing.
>>
>>
>> But better check with Karaf friends directly, too.
>>
>>
>> Cheers,
>> Toni
>>
>>
>>
>>
>> On Tue, Mar 15, 2011 at 1:55 PM, Michael Szalay<  michael.szalay@basis06.ch>  wrote:
>>
>>
>> Hi all
>>
>> I want to setup a integration test infrastructure for my OSGi blueprint projects.
>> We use Apache Karaf as a framework.
>>
>> I wrote my JUnit test and installed my features.
>> Now I have the unresolved dependency:
>>
>> Unresolved constraint in bundle org.apache.felix.karaf.tooling.testing [12]: Unable to resolve 12.0: missing requirement [12.0] package; (package=org.ops4j.pax.exam.container.def) - [12.0] package; (package=org.ops4j.pax.exam.container.def)
>>
>> My question: where do I find this dependency as a bundle?
>> I tried the following
>>
>> <dependency>
>> <groupId>org.ops4j.pax.exam</groupId>
>> <artifactId>pax-exam-container-default</artifactId>
>> <version>1.2.3</version>
>> <scope>test</scope>
>> </dependency>
>>
>> But this is not a bundle, just a jar, right?
>>
>> Regards Michael
>>
>> --
>> Michael Szalay Senior Software Engineer
>>
>> basis06 AG, Birkenweg 61, CH-3013 Bern - Fon +41 31 311 32 22
>> http://www.basis06.ch - source of smart business
>>
>>
>> _______________________________________________
>> general mailing list
>> general@lists.ops4j.org
>> http://lists.ops4j.org/mailman/listinfo/general
>>
>>
>>
>> --
>> Toni Menzel - http://www.okidokiteam.com
>

Re: Fwd: Problem while testing Apache Karaf

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Michael,

you might also take a look on how the integration tests work for Karaf
itself, this might give you some hints.

regards, Achim

2011/3/15 Jean-Baptiste Onofré <jb...@nanthrax.net>:
> Hi Michael,
>
> you can use PAX Exam 1.2.4. Regarding the bundle, it depends of what do you
> want to test.
> For blueprint, you need the Aries Blueprint bundle at least.
>
> Regards
> JB
>
> On 03/15/2011 02:25 PM, Michael Szalay wrote:
>>
>> Hi all
>>
>> does anyone know how to correctly setup pax-eam for karaf?
>> Which version of pax-exam do I need?
>>
>> What bundles Do I have to include in my features so that the blueprint
>> services are coming up?
>>
>> Regards Michael
>>
>> ----- Weitergeleitete Mail -----
>> Von: "Toni Menzel"<to...@okidokiteam.com>
>> An: "General OPS4J"<ge...@lists.ops4j.org>
>> CC: "Michael Szalay"<mi...@basis06.ch>
>> Gesendet: Dienstag, 15. März 2011 14:09:40
>> Betreff: Re: Problem while testing Apache Karaf
>>
>> Hi Michael,
>>
>>
>> You are using some extra runtime bundle from the Karaf project:
>> org.apache.felix.karaf.tooling.testing
>> This looks like importing something, that - at least i - did not intend to
>> have available at runtime at all.
>>
>>
>> So its 2 folds:
>> - check if the version of org.apache.felix.karaf.tooling.testing you are
>> using is compatible (from karaf docs e.g.) with pax exam 1.2.3 (which you
>> are using appealingly)
>> - or file an issue on the Karaf Issue Tracker
>>
>>
>> As a side effect, i am currently porting the karaf stuff to be usable with
>> Exam2 as part of the compatibility (Exam 1.x to 2.0) effort. But this should
>> not stress you. I just mention it because i may be able to tell you more
>> about what you are doing wrong while i am progressing.
>>
>>
>> But better check with Karaf friends directly, too.
>>
>>
>> Cheers,
>> Toni
>>
>>
>>
>>
>> On Tue, Mar 15, 2011 at 1:55 PM, Michael Szalay<
>>  michael.szalay@basis06.ch>  wrote:
>>
>>
>> Hi all
>>
>> I want to setup a integration test infrastructure for my OSGi blueprint
>> projects.
>> We use Apache Karaf as a framework.
>>
>> I wrote my JUnit test and installed my features.
>> Now I have the unresolved dependency:
>>
>> Unresolved constraint in bundle org.apache.felix.karaf.tooling.testing
>> [12]: Unable to resolve 12.0: missing requirement [12.0] package;
>> (package=org.ops4j.pax.exam.container.def) - [12.0] package;
>> (package=org.ops4j.pax.exam.container.def)
>>
>> My question: where do I find this dependency as a bundle?
>> I tried the following
>>
>> <dependency>
>> <groupId>org.ops4j.pax.exam</groupId>
>> <artifactId>pax-exam-container-default</artifactId>
>> <version>1.2.3</version>
>> <scope>test</scope>
>> </dependency>
>>
>> But this is not a bundle, just a jar, right?
>>
>> Regards Michael
>>
>> --
>> Michael Szalay Senior Software Engineer
>>
>> basis06 AG, Birkenweg 61, CH-3013 Bern - Fon +41 31 311 32 22
>> http://www.basis06.ch - source of smart business
>>
>>
>> _______________________________________________
>> general mailing list
>> general@lists.ops4j.org
>> http://lists.ops4j.org/mailman/listinfo/general
>>
>>
>>
>> --
>> Toni Menzel - http://www.okidokiteam.com
>

Re: Problem while testing Apache Karaf

Posted by Michael Szalay <mi...@basis06.ch>.
Hi Jean-Baptise

thanks for you answer.
If I run pax-exam with karaf, the framework complains that it wants the package org.apache.felix.karaf.testing.AbstractIntegrationTest
as a bundle, so I added

<bundle>mvn:org.apache.felix.karaf.tooling/org.apache.felix.karaf.tooling.testing/1.6.0</bundle>

to my feature.
But this complains that package "org.ops4j.pax.exam.container.def" is missing.
This package is not available as a bundle, I checked with the ops4j people (see below).
Its not intended to be available at runtime.

It works if I'm not using AbstractIntegrationTest.

What am I doing wrong?

Regards Michael

----- Ursprüngliche Mail -----
Von: "Jean-Baptiste Onofré" <jb...@nanthrax.net>
An: user@karaf.apache.org
Gesendet: Dienstag, 15. März 2011 14:30:20
Betreff: Re: Fwd: Problem while testing Apache Karaf

Hi Michael,

you can use PAX Exam 1.2.4. Regarding the bundle, it depends of what do 
you want to test.
For blueprint, you need the Aries Blueprint bundle at least.

Regards
JB

On 03/15/2011 02:25 PM, Michael Szalay wrote:
> Hi all
>
> does anyone know how to correctly setup pax-eam for karaf?
> Which version of pax-exam do I need?
>
> What bundles Do I have to include in my features so that the blueprint services are coming up?
>
> Regards Michael
>
> ----- Weitergeleitete Mail -----
> Von: "Toni Menzel"<to...@okidokiteam.com>
> An: "General OPS4J"<ge...@lists.ops4j.org>
> CC: "Michael Szalay"<mi...@basis06.ch>
> Gesendet: Dienstag, 15. März 2011 14:09:40
> Betreff: Re: Problem while testing Apache Karaf
>
> Hi Michael,
>
>
> You are using some extra runtime bundle from the Karaf project: org.apache.felix.karaf.tooling.testing
> This looks like importing something, that - at least i - did not intend to have available at runtime at all.
>
>
> So its 2 folds:
> - check if the version of org.apache.felix.karaf.tooling.testing you are using is compatible (from karaf docs e.g.) with pax exam 1.2.3 (which you are using appealingly)
> - or file an issue on the Karaf Issue Tracker
>
>
> As a side effect, i am currently porting the karaf stuff to be usable with Exam2 as part of the compatibility (Exam 1.x to 2.0) effort. But this should not stress you. I just mention it because i may be able to tell you more about what you are doing wrong while i am progressing.
>
>
> But better check with Karaf friends directly, too.
>
>
> Cheers,
> Toni
>
>
>
>
> On Tue, Mar 15, 2011 at 1:55 PM, Michael Szalay<  michael.szalay@basis06.ch>  wrote:
>
>
> Hi all
>
> I want to setup a integration test infrastructure for my OSGi blueprint projects.
> We use Apache Karaf as a framework.
>
> I wrote my JUnit test and installed my features.
> Now I have the unresolved dependency:
>
> Unresolved constraint in bundle org.apache.felix.karaf.tooling.testing [12]: Unable to resolve 12.0: missing requirement [12.0] package; (package=org.ops4j.pax.exam.container.def) - [12.0] package; (package=org.ops4j.pax.exam.container.def)
>
> My question: where do I find this dependency as a bundle?
> I tried the following
>
> <dependency>
> <groupId>org.ops4j.pax.exam</groupId>
> <artifactId>pax-exam-container-default</artifactId>
> <version>1.2.3</version>
> <scope>test</scope>
> </dependency>
>
> But this is not a bundle, just a jar, right?
>
> Regards Michael
>
> --
> Michael Szalay Senior Software Engineer
>
> basis06 AG, Birkenweg 61, CH-3013 Bern - Fon +41 31 311 32 22
> http://www.basis06.ch - source of smart business
>
>
> _______________________________________________
> general mailing list
> general@lists.ops4j.org
> http://lists.ops4j.org/mailman/listinfo/general
>
>
>
> --
> Toni Menzel - http://www.okidokiteam.com

Re: Fwd: Problem while testing Apache Karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Michael,

you can use PAX Exam 1.2.4. Regarding the bundle, it depends of what do 
you want to test.
For blueprint, you need the Aries Blueprint bundle at least.

Regards
JB

On 03/15/2011 02:25 PM, Michael Szalay wrote:
> Hi all
>
> does anyone know how to correctly setup pax-eam for karaf?
> Which version of pax-exam do I need?
>
> What bundles Do I have to include in my features so that the blueprint services are coming up?
>
> Regards Michael
>
> ----- Weitergeleitete Mail -----
> Von: "Toni Menzel"<to...@okidokiteam.com>
> An: "General OPS4J"<ge...@lists.ops4j.org>
> CC: "Michael Szalay"<mi...@basis06.ch>
> Gesendet: Dienstag, 15. März 2011 14:09:40
> Betreff: Re: Problem while testing Apache Karaf
>
> Hi Michael,
>
>
> You are using some extra runtime bundle from the Karaf project: org.apache.felix.karaf.tooling.testing
> This looks like importing something, that - at least i - did not intend to have available at runtime at all.
>
>
> So its 2 folds:
> - check if the version of org.apache.felix.karaf.tooling.testing you are using is compatible (from karaf docs e.g.) with pax exam 1.2.3 (which you are using appealingly)
> - or file an issue on the Karaf Issue Tracker
>
>
> As a side effect, i am currently porting the karaf stuff to be usable with Exam2 as part of the compatibility (Exam 1.x to 2.0) effort. But this should not stress you. I just mention it because i may be able to tell you more about what you are doing wrong while i am progressing.
>
>
> But better check with Karaf friends directly, too.
>
>
> Cheers,
> Toni
>
>
>
>
> On Tue, Mar 15, 2011 at 1:55 PM, Michael Szalay<  michael.szalay@basis06.ch>  wrote:
>
>
> Hi all
>
> I want to setup a integration test infrastructure for my OSGi blueprint projects.
> We use Apache Karaf as a framework.
>
> I wrote my JUnit test and installed my features.
> Now I have the unresolved dependency:
>
> Unresolved constraint in bundle org.apache.felix.karaf.tooling.testing [12]: Unable to resolve 12.0: missing requirement [12.0] package; (package=org.ops4j.pax.exam.container.def) - [12.0] package; (package=org.ops4j.pax.exam.container.def)
>
> My question: where do I find this dependency as a bundle?
> I tried the following
>
> <dependency>
> <groupId>org.ops4j.pax.exam</groupId>
> <artifactId>pax-exam-container-default</artifactId>
> <version>1.2.3</version>
> <scope>test</scope>
> </dependency>
>
> But this is not a bundle, just a jar, right?
>
> Regards Michael
>
> --
> Michael Szalay Senior Software Engineer
>
> basis06 AG, Birkenweg 61, CH-3013 Bern - Fon +41 31 311 32 22
> http://www.basis06.ch - source of smart business
>
>
> _______________________________________________
> general mailing list
> general@lists.ops4j.org
> http://lists.ops4j.org/mailman/listinfo/general
>
>
>
> --
> Toni Menzel - http://www.okidokiteam.com