java - ClassNotFoundException: org.apache.felix.dm.DependencyActivatorBase with Pax Exam -
java - ClassNotFoundException: org.apache.felix.dm.DependencyActivatorBase with Pax Exam -
i using pax exam (3.5.0) osgi unit tests. have created test when run stacktrace:
java.lang.noclassdeffounderror: org/apache/felix/dm/dependencyactivatorbase @ java.lang.classloader.defineclass1(native method) @ java.lang.classloader.defineclass(classloader.java:800) @ org.apache.felix.framework.bundlewiringimpl$bundleclassloader.findclass(bundlewiringimpl.java:2279) @ org.apache.felix.framework.bundlewiringimpl.findclassorresourcebydelegation(bundlewiringimpl.java:1501) @ org.apache.felix.framework.bundlewiringimpl.access$400(bundlewiringimpl.java:75) @ org.apache.felix.framework.bundlewiringimpl$bundleclassloader.loadclass(bundlewiringimpl.java:1955) @ java.lang.classloader.loadclass(classloader.java:358) @ org.apache.felix.framework.bundlewiringimpl.getclassbydelegation(bundlewiringimpl.java:1374) @ org.apache.felix.framework.felix.createbundleactivator(felix.java:4329) @ org.apache.felix.framework.felix.activatebundle(felix.java:2141) @ org.apache.felix.framework.felix.startbundle(felix.java:2064) @ org.apache.felix.framework.felix.setactivestartlevel(felix.java:1291) @ org.apache.felix.framework.frameworkstartlevelimpl.run(frameworkstartlevelimpl.java:304) @ java.lang.thread.run(thread.java:745) caused by: java.lang.classnotfoundexception: org.apache.felix.dm.dependencyactivatorbase not found com.company.wine.infrastructure [19] @ org.apache.felix.framework.bundlewiringimpl.findclassorresourcebydelegation(bundlewiringimpl.java:1532) @ org.apache.felix.framework.bundlewiringimpl.access$400(bundlewiringimpl.java:75) @ org.apache.felix.framework.bundlewiringimpl$bundleclassloader.loadclass(bundlewiringimpl.java:1955) @ java.lang.classloader.loadclass(classloader.java:358) ... 14 more
i have configured coreoptions.mavenbundle("org.apache.felix", "org.apache.felix.dependencymanager", "3.1.0")
in options , see org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.swissbox.extender.bundlewatcher] : scanning bundle [org.apache.felix.dependencymanager]
loaded.
still exception. clue on doing wrong?
cheers.
you have differentiate in way pax exam designed , how used it. pax exams main utilize case utilize in integration test test build artifact. if want test in same module have 2 ways of doing so. 1) in integrationtest-phase of maven referencing freshly build artifact via file: dependency. 2) building tiny-bundle containing testable classes , other artifacts. need alter package-imports/exports in test. sample of doing can found here
java unit-testing osgi apache-felix pax-exam
Comments
Post a Comment