Questions tagged [pax-exam]

Pax Exam is a testing toolkit that addresses the need for bundle-level testing.

When a Pax Exam test is run, it starts an OSGi framework, installs and starts a selection of bundles, and then makes an OSGi BundleContext available through which you can make assertions about your bundles, the services that they publish, and the effects that they have on each other.

134 questions
1
vote
1 answer

OSGi testing with Pax-Exam Fails with no container found error

OSGi testing with Pax-Exam Fails with "no container found error". This happened because I upgraded form java 7 to java 8 and with that I had to change pax-exam-2.3.0.jar (which is not compatible with java 8) to pax-exam-4.4.0.jar. And their other…
Amrit Raj
  • 71
  • 1
  • 8
1
vote
1 answer

Resolving OSGi tests when upgrading from Groovy 2.4 to 2.5 due to "Fragment bundles can not be started"?

This is a follow-up question to How to upgrade groovy-all from 2.4 to 2.5 when running in OSGi?. The groovy-all artifact is no longer available as a jar file in version 2.5 in Groovy so the suggestion in the answer above was to instead use the…
Johan
  • 37,479
  • 32
  • 149
  • 237
1
vote
1 answer

Test Internal Class Using Pax Exam

Currently I have test class for testing internal class using Pax-Exam 5. @ProbeBuilder public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) { probe.setHeader("Fragment-Host", "com.mycompany.abc"); return probe; } The reason I…
Abraham
  • 85
  • 5
1
vote
0 answers

pax-logging-log4j2 is not stopping in PaxExam+Karaf

I am running test cases with paxexam+karaf, but after test execution when paxexam try to stop log42 bundle during containaer shutting it got stuck and stay on below line I am using Paxexam 4.11 DEBUG | features-2-thread-1 | util …
Zaheer
  • 45
  • 7
1
vote
1 answer

Apache Karaf stuck while shutting with Pax-Exam

I was running integrations tests with Pax-Exam and Karaf, tests got executed successfully but while shutting Karaf, it stuck on below and never resume Pax-Exam = 4.11 Karaf = 4.2 [main] DEBUG o.ops4j.store.intern.TemporaryStore - Exit store():…
ImranRazaKhan
  • 1,955
  • 5
  • 33
  • 74
1
vote
0 answers

How to use System Property Values with org.ops4j.pax.logging.log4j2.config.file in PAX Logging

I'm using pax-logging in one of a OSGi project. I want to set a system property to the value of org.ops4j.pax.logging.log4j2.config.file which is mentioned in the pax-logging.properties file. Is this possible? I've seen that in Karaf they use…
1
vote
2 answers

Any way for executing code to know it's running in the eclipse debugger?

I have some Pax Exam tests. To execute the test normally, I just run the JUnit class in Eclipse. If I want to step through the code in the Eclipse debugger, I have to make it set the debug options, including the flag to make it wait for the…
David M. Karr
  • 14,317
  • 20
  • 94
  • 199
1
vote
1 answer

Can I find any sample of latest PAX Exam for testing OSGi declarative service bundle with Java 8?

I am trying to create test environment with latest pax-exam-container-forked and Java 8, but there are many conflicts but it is not being resolved due to many dependency with different versions on maven. I have taken ref from earcam's answer, that…
Umesh Rajani
  • 139
  • 2
  • 13
1
vote
1 answer

Is it possible to run JBoss Fuse 6.3.x PAX-EXAM with JDK 1.8 or JDK1.9?

Is it possible to run JBoss Fuse 6.3.x PAX-EXAM with JDK 1.8 or JDK1.9? I noticed that JBoss Fuse sources set to be compiled with JDK 1.7
observer
  • 35
  • 4
1
vote
0 answers

Unable to evaluation expressions from Eclipse Display View while debugging decompiled code in PaxExam integration test

I'm debugging a PaxExam integration test in Eclipse. I'm currently stepping through the code for a class and method that I don't yet have the source for. When it hits the breakpoint, it says "Source not found" (with the "Edit Source Lookup Path"…
David M. Karr
  • 14,317
  • 20
  • 94
  • 199
1
vote
1 answer

How to start and shut down a second OSGi container in pax exam

I am testing remote services using pax exam. To do this I need to start two containers. One local one that runs my test which calls the consumer and a second one that runs the service, Aries RSA and zookeeper. I managed to start the external…
Christian Schneider
  • 19,420
  • 2
  • 39
  • 64
1
vote
1 answer

Pax Exam Copy a jar in karaf lib/ext folder

Is there a way to copy a jar in the karaf lib/ext folder while starting the pax-exam @Configuration public static Option[] configuration() throws Exception { return new Option[] { …
Charity
  • 213
  • 1
  • 5
  • 23
1
vote
1 answer

Karaf Pax Exam fails with Unknown protocol: wrap

Hi my pax exam fails with the error Unknown protocol: wrap org.apache.karaf.features.internal.util.MultiException: Error at…
Charity
  • 213
  • 1
  • 5
  • 23
1
vote
0 answers

Pax exam logging with log4J for OSGI integration tests

I'm trying to set up my integration tests with pax exam 4.8.0 inside a native container using Felix 5.4.0. My first jUnit tests run OK, the issue is logging - I cannot change the logging configuration, which is very annoying. (please note I'm…
Marcanpilami
  • 584
  • 3
  • 14
1
vote
4 answers

Karaf Feature install throwing Unsupported 'Bundle-ManifestVersion' value: 1

Hi guys i am getting the below error while using feture install in karaf org.apache.karaf.features.internal.util.MultiException: Error at…
Charity
  • 213
  • 1
  • 5
  • 23
1 2
3
8 9