With the Native Test Container, classes may be loaded both by the
application classloader and a bundle classloader, which can cause problems.
With Felix, setting the framework property
felix.bootdelegation.implicit=false may help in such cases.
Or even simpler, check if the runtime dependency on SpringBusFactory is
really required. If not, exclude the JAR from the classpath and only
provision it as OSGi bundle in your Pax Exam configuration.
Otherwise, you can try using the Pax Runner Test Container or the Forked
Test Container (new in Pax Exam 2.4.0.RC1), both of which run your tests
in a separate VM with minimum classpath "pollution". The price for
better classloader isolation is remote debugging.
Hope that helps,
Harald
Am 10.02.2012 22:36, schrieb Jeff Melby:
I am developing a web service client using CXF in an OSGI bundle. The
service works fine when I run it in Felix. However, when I am running
using Pax Exam in unit testing, with Felix as the specified framework, I
am getting the following error when initializing the web service client.
It is attempting to cast SpringBusFactory as BusFactory (which
SpringBusFactory extends). I have confirmed that these classes both only
exist in the cxf-bundle-minimal 2.5.2. Still, it seems that these two
must have somehow ended up on separate classloaders.
Does anyone have any thoughts on how to resolve this?
Thanks,
Jeff
_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general