Question

I have written a PAX-Exam test and I have ensured that all dependencies of the bundle under test and all it's transitive dependencies have been added as a mavenBundle. Right now I am not getting an "Bundle unresolved" type of errors.

I also verified by printing out the classpath that the jar for the bundle under test has been added in the classpath. I took the classpath and simply ran java -cp com.my.namespace.Interface and that seems to find the class in the classpath.

However when I try to access an interface from that bundle in the test it fails at runtime with a ClassNotFoundException.

I need ideas on how I could debug this further.

Was it helpful?

Solution

It might be possible that you didn't export/import the required Package? Another possibility, is the required class in the same project, cause in that case you'll most likely need to create a "streamBundle" on the fly for it in your configuration of pax-exam.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top