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


Feb 10, 2012 3:26:00 PM org.apache.cxf.BusFactory getBusFactoryClass
SEVERE: Failed to determine BusFactory implementation class name.
java.lang.ClassCastException: class
org.apache.cxf.bus.spring.SpringBusFactory
at java.lang.Class.asSubclass(Class.java:3018)
at org.apache.cxf.BusFactory.getBusFactoryClass(BusFactory.java:304)
at org.apache.cxf.BusFactory.newInstance(BusFactory.java:231)
at org.apache.cxf.BusFactory.newInstance(BusFactory.java:218)
at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:99)
at org.apache.cxf.BusFactory.createThreadBus(BusFactory.java:165)
at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:155)
at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:140)
at
org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:90)
at javax.xml.ws.Service.<init>(Service.java:36)
at
com.uhg.app.wservice.v4.receiver.MyUhcReceiverV4.<init>(MyUhcReceiverV4.java:39)
at
com.uhg.upm.dataservice.cams.internal.CamsMyUhcReceiverDataServiceBase.getMyUhcReceiverV4Service(CamsMyUhcReceiverDataServiceBase.java:32)
at
com.uhg.upm.dataservice.cams.readfsabenefits.internal.ReadFsaBenefitsDataServiceImpl.invokeService(ReadFsaBenefitsDataServiceImpl.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy23.invokeService(Unknown Source)
at
com.uhg.upm.dataservice.cams.readfsabenefits.ReadFsaBenefitsDataServiceTest.testLisaSuccess(ReadFsaBenefitsDataServiceTest.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:69)
at
org.ops4j.pax.exam.invoker.junit.internal.ContainerTestRunner.runChild(ContainerTestRunner.java:58)
at
org.ops4j.pax.exam.invoker.junit.internal.ContainerTestRunner.runChild(ContainerTestRunner.java:32)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:292)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
at
org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.invokeViaJUnit(JUnitProbeInvoker.java:108)
at
org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.findAndInvoke(JUnitProbeInvoker.java:89)
at
org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.call(JUnitProbeInvoker.java:72)
at
org.ops4j.pax.exam.nat.internal.NativeTestContainer.call(NativeTestContainer.java:86)
at
org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactor.invoke(EagerSingleStagedReactor.java:85)
at
org.ops4j.pax.exam.junit.JUnit4TestRunner$3.evaluate(JUnit4TestRunner.java:289)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:69)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:48)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:292)
at org.ops4j.pax.exam.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:87)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:71)
at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:202)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to