java.lang.AbstractMethodError/ClassCastException when creating integration test for osgi using felix, osgi and PaxRunner Framework -
java.lang.AbstractMethodError/ClassCastException when creating integration test for osgi using felix, osgi and PaxRunner Framework -
i trying create integration test bundle. want mimic setup have in normal web app project(wherein test in src/test folder)
i there except have exception when bundle tries activate
native container exception
running com.grundfos.wcm.impl.helloworldserviceimplintegrationtest tests run: 1, failures: 0, errors: 1, skipped: 0, time elapsed: 1.196 sec <<< failure! - in com.grundfos.wcm.impl.helloworldserviceimplintegrationtest whensuppliednullnamethenthrowexception(com.grundfos.wcm.impl.helloworldserviceimplintegrationtest) time elapsed: 0.792 sec <<< error! java.lang.abstractmethoderror: org.apache.felix.framework.bundleimpl.adapt(ljava/lang/class;)ljava/lang/object; @ org.ops4j.pax.exam.nat.internal.nativetestcontainer.installandstartbundles(nativetestcontainer.java:311) @ org.ops4j.pax.exam.nat.internal.nativetestcontainer.start(nativetestcontainer.java:177) @ org.ops4j.pax.exam.spi.reactors.allconfinedstagedreactor.invoke(allconfinedstagedreactor.java:79) @ org.ops4j.pax.exam.junit.impl.proberunner$2.evaluate(proberunner.java:264) @ org.junit.runners.blockjunit4classrunner.runnotignored(blockjunit4classrunner.java:79) @ org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:71) @ org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:49) @ org.junit.runners.parentrunner$3.run(parentrunner.java:193) @ org.junit.runners.parentrunner$1.schedule(parentrunner.java:52) @ org.junit.runners.parentrunner.runchildren(parentrunner.java:191) @ org.junit.runners.parentrunner.access$000(parentrunner.java:42) @ org.junit.runners.parentrunner$2.evaluate(parentrunner.java:184) @ org.junit.runners.parentrunner.run(parentrunner.java:236) @ org.ops4j.pax.exam.junit.impl.proberunner.run(proberunner.java:98) @ org.ops4j.pax.exam.junit.paxexam.run(paxexam.java:93) @ org.apache.maven.surefire.junit4.junit4provider.execute(junit4provider.java:264) @ org.apache.maven.surefire.junit4.junit4provider.executetestset(junit4provider.java:153) @ org.apache.maven.surefire.junit4.junit4provider.invoke(junit4provider.java:124) @ org.apache.maven.surefire.booter.forkedbooter.invokeproviderinsameclassloader(forkedbooter.java:200) @ org.apache.maven.surefire.booter.forkedbooter.runsuitesinprocess(forkedbooter.java:153) @ org.apache.maven.surefire.booter.forkedbooter.main(forkedbooter.java:103)
forked container exception
java.lang.classcastexception: org.ops4j.pax.exam.inject.internal.activator cannot cast org.osgi.framework.bundleactivator @ org.apache.felix.framework.felix.createbundleactivator(felix.java:3814) @ org.apache.felix.framework.felix.activatebundle(felix.java:1899) @ org.apache.felix.framework.felix.startbundle(felix.java:1822) @ org.apache.felix.framework.felix.setactivestartlevel(felix.java:1192) @ org.apache.felix.framework.startlevelimpl.run(startlevelimpl.java:266) @ java.lang.thread.run(thread.java:745) java.lang.classcastexception: org.ops4j.pax.exam.raw.extender.intern.activator cannot cast org.osgi.framework.bundleactivator
i tried submitting official jira board have no permission so:
https://ops4j1.jira.com/browse/paxexam/fixforversion/12880/?selectedtab=com.atlassian.jira.jira-projects-plugin:version-issues-panel
can expert help me problem? @ end of ropes :(
sample project(if project file not work tell me):
http://www.mediafire.com/download/qnh2gzgygys9982/cq-training.zip
command: mvn clean verify
thanks
looks you're having conflicting versions of osgi core api on class path. @ runtime, osgi framework (felix or equinox) should core api on classpath.
if have other version org.osgi:org.osgi.core
(transitive) dependency, create sure give provided
scope or exclude dependency.
osgi integration-testing apache-felix pax-exam pax-runner
Comments
Post a Comment