Hi Charles, sorry, I was on something else. I will take a look this afternoon.
I keep you posted. Regards JB On 12/11/2014 11:03 AM, Charles Moulliard wrote:
Any idea ? On Wed, Dec 10, 2014 at 5:10 PM, Jean-Baptiste Onofré <[email protected] <mailto:[email protected]>> wrote: As replied on the ops4j mailing list, I think something is wrong in the import in the test classes. Check there. Again, we use Pax Exam 4.3.0 in Karaf 2.4.x itests, so it works for sure ;) Regards JB On 12/10/2014 05:03 PM, Charles Moulliard wrote: Problem still there using the dependencies you mentioned <dependency> <groupId>org.ops4j.pax.exam</__groupId> <artifactId>pax-exam-__container-karaf</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.ops4j.pax.exam</__groupId> <artifactId>pax-exam-junit4</__artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.geronimo.__specs</groupId> <artifactId>geronimo-atinject___1.0_spec</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.ops4j.pax.url</__groupId> <artifactId>pax-url-aether</__artifactId> <scope>test</scope> </dependency> On Wed, Dec 10, 2014 at 4:45 PM, Jean-Baptiste Onofré <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> wrote: You should have: <dependency> <groupId>org.ops4j.pax.exam</____groupId> <artifactId>pax-exam-____container-karaf</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.ops4j.pax.exam</____groupId> <artifactId>pax-exam-junit4</____artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.geronimo.____specs</groupId> <artifactId>geronimo-atinject_____1.0_spec</artifactId> <version>1.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.ops4j.pax.url</____groupId> <artifactId>pax-url-aether</____artifactId> <scope>test</scope> </dependency> And the karaf dependency: pax-exam-spi and pax-exam-inject should not be there as they are transitive dependencies. FYI, it's what we have in karaf-2.x itests themselves (with pax-exam 4.3.0). Regards JB On 12/10/2014 04:00 PM, Charles Moulliard wrote: Here are the deps that I'm using for pax-exam without success --> <dependency> <groupId>org.ops4j.pax.exam</____groupId> <artifactId>pax-exam-junit4</____artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.ops4j.pax.exam</____groupId> <artifactId>pax-exam-spi</____artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.ops4j.pax.exam</____groupId> <artifactId>pax-exam-____container-karaf</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.geronimo.____specs</groupId> <artifactId>geronimo-atinject_____1.0_spec</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.ops4j.pax.exam</____groupId> <artifactId>pax-exam-inject</____artifactId> <scope>test</scope> </dependency> On Wed, Dec 10, 2014 at 3:49 PM, Charles Moulliard <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>> wrote: Error is the same even if I add geronimo-atinject_1.0_spec-1.____0.jar On Wed, Dec 10, 2014 at 3:44 PM, Charles Moulliard <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>> wrote: No. Just javax.inject (~/.m2/repository/javax/____inject/javax.inject/1/javax.____inject-1.jar) Do I have to add it ? On Wed, Dec 10, 2014 at 2:16 PM, Jean-Baptiste Onofré <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>> wrote: Did you add geronimo ati inject dependency ? Regards JB Sent from my Samsung Galaxy smartphone. -------- Original message -------- From: Charles Moulliard <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>> Date:10/12/2014 13:57 (GMT+01:00) To: [email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>__> Cc: Subject: Re: Issue with pax exam - missing jar maybe I have upgraded to paxexam 4.3 & Karaf 2.4.0 but now I get another error even if the dependency pax-exam-spi is in the classpath : https://gist.github.com/____cmoulliard/____2c673628f35156d71714 <https://gist.github.com/__cmoulliard/__2c673628f35156d71714> <https://gist.github.com/__cmoulliard/__2c673628f35156d71714 <https://gist.github.com/cmoulliard/2c673628f35156d71714>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.14 sec <<< FAILURE! - in org.drools.karaf.itest.____DroolsOnBodyCamelKarafIntegrat____ionTest initializationError(org.____drools.karaf.itest.____DroolsOnBodyCamelKarafIntegrat____ionTest) Time elapsed: 0.007 sec <<< ERROR! java.lang.NoSuchMethodError: org.ops4j.pax.exam.spi.____reactors.ReactorManager.____setAnnotationHandler(Lorg/____ops4j/pax/exam/spi/reactors/____AnnotationHandler;)V at org.ops4j.pax.exam.junit.impl.____ProbeRunner.<init>(____ProbeRunner.java:79) at org.ops4j.pax.exam.junit.____PaxExam.createDelegate(____PaxExam.java:82) at org.ops4j.pax.exam.junit.____PaxExam.<init>(PaxExam.java:____73) at sun.reflect.____NativeConstructorAccessorImpl.____newInstance0(Native Method) at sun.reflect.____NativeConstructorAccessorImpl.____newInstance(____NativeConstructorAccessorImpl.____java:57) at sun.reflect.____DelegatingConstructorAccessorI____mpl.newInstance(____DelegatingConstructorAccessorI____mpl.java:45) at java.lang.reflect.Constructor.____newInstance(Constructor.__java:__526) at org.junit.internal.builders.____AnnotatedBuilder.buildRunner(____AnnotatedBuilder.java:29) at org.junit.internal.builders.____AnnotatedBuilder.____runnerForClass(____AnnotatedBuilder.java:21) at org.junit.runners.model.____RunnerBuilder.____safeRunnerForClass(____RunnerBuilder.java:59) at org.junit.internal.builders.____AllDefaultPossibilitiesBuilder____.runnerForClass(____AllDefaultPossibilitiesBuilder____.java:26) at org.junit.runners.model.____RunnerBuilder.____safeRunnerForClass(____RunnerBuilder.java:59) at org.junit.internal.requests.____ClassRequest.getRunner(____ClassRequest.java:26) at org.apache.maven.surefire.____junit4.JUnit4Provider.execute(____JUnit4Provider.java:262) at org.apache.maven.surefire.____junit4.JUnit4Provider.____executeTestSet(JUnit4Provider.____java:153) at org.apache.maven.surefire.____junit4.JUnit4Provider.invoke(____JUnit4Provider.java:124) at org.apache.maven.surefire.____booter.ForkedBooter.____invokeProviderInSameClassLoade____r(ForkedBooter.java:200) On Wed, Dec 10, 2014 at 1:13 PM, Jean-Baptiste Onofré <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>> wrote: Hi, Which Pax Exam version do you use and Karaf version ? With 4.3.0, it should work out of the box with Karaf 3.x. With previous version, you may need to add the pax-url-aether dependency. Regards JB On 12/10/2014 12:56 PM, Charles Moulliard wrote: Hi, Whenever I run an integration test using pax exam karaf container, I get this classloading error message Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.004 sec <<< FAILURE! - in org.drools.karaf.itest.______DroolsOnCommandCamelKarafInteg______rationTest testRuleOnCommand(org.drools.______karaf.itest.______DroolsOnCommandCamelKarafInteg______rationTest) Time elapsed: 0.003 sec <<< ERROR! java.lang.NoSuchMethodError: org.ops4j.pax.url.mvn.______internal.Connection.<init>(______Ljava/net/URL;Lorg/ops4j/pax/______url/maven/commons/______MavenConfiguration;)V at org.ops4j.pax.url.mvn.Handler.______openConnection(Handler.__java:____48) at java.net.URL.openConnection(______URL.java:971) at java.net.URL.openStream(URL.______java:1037) at org.ops4j.pax.exam.karaf.______container.internal.______ArchiveExtractor.______extractTarGzDistribution(______ArchiveExtractor.java:81) at org.ops4j.pax.exam.karaf.______container.internal.______ArchiveExtractor.extract(______ArchiveExtractor.java:70) at org.ops4j.pax.exam.karaf.______container.internal.______KarafTestContainer.start(______KarafTestContainer.java:150) at org.ops4j.pax.exam.spi.______reactors.______AllConfinedStagedReactor.______invoke(______AllConfinedStagedReactor.java:______79) at org.ops4j.pax.exam.junit.impl.______ProbeRunner$2.evaluate(______ProbeRunner.java:278) at org.junit.runners.______ParentRunner.runLeaf(______ParentRunner.java:271) at org.junit.runners.______BlockJUnit4ClassRunner.______runChild(______BlockJUnit4ClassRunner.java:______70) at org.junit.runners.______BlockJUnit4ClassRunner.______runChild(______BlockJUnit4ClassRunner.java:______50) at org.junit.runners.______ParentRunner$3.run(______ParentRunner.java:238) at org.junit.runners.______ParentRunner$1.schedule(______ParentRunner.java:63) at org.junit.runners.______ParentRunner.runChildren(______ParentRunner.java:236) at org.junit.runners.______ParentRunner.access$000(______ParentRunner.java:53) at org.junit.runners.______ParentRunner$2.evaluate(______ParentRunner.java:229) at org.junit.runners.______ParentRunner.run(ParentRunner.______java:309) at org.ops4j.pax.exam.junit.impl.______ProbeRunner.run(__ProbeRunner.____java:112) at org.ops4j.pax.exam.junit.______PaxExam.run(PaxExam.java:93) at org.apache.maven.surefire.______junit4.JUnit4Provider.execute(______JUnit4Provider.java:264) at org.apache.maven.surefire.______junit4.JUnit4Provider.______executeTestSet(JUnit4Provider.______java:153) at org.apache.maven.surefire.______junit4.JUnit4Provider.invoke(______JUnit4Provider.java:124) at org.apache.maven.surefire.______booter.ForkedBooter.______invokeProviderInSameClassLoade______r(ForkedBooter.java:200) at org.apache.maven.surefire.______booter.ForkedBooter.______runSuitesInProcess(______ForkedBooter.java:153) at org.apache.maven.surefire.______booter.ForkedBooter.main(______ForkedBooter.java:103) Do I miss a dependency ? <dependency> <groupId>org.ops4j.pax.exam</______groupId> <artifactId>pax-exam-junit4</______artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.ops4j.pax.exam</______groupId> <artifactId>pax-exam-______container-karaf</artifactId> <scope>test</scope> </dependency> Regards, -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io <http://cmoulliard.github.io> -- Jean-Baptiste Onofré [email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> http://blog.nanthrax.net Talend - http://www.talend.com -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io <http://cmoulliard.github.io> -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io <http://cmoulliard.github.io> -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io <http://cmoulliard.github.io> -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io <http://cmoulliard.github.io> -- Jean-Baptiste Onofré [email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> http://blog.nanthrax.net Talend - http://www.talend.com -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io <http://cmoulliard.github.io> -- Jean-Baptiste Onofré [email protected] <mailto:[email protected]> http://blog.nanthrax.net Talend - http://www.talend.com -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io <http://cmoulliard.github.io>
-- Jean-Baptiste Onofré [email protected] http://blog.nanthrax.net Talend - http://www.talend.com
