Hi Azad,
Did you take a look on karaf-pax-exam ?
Regards
JB
On 03/22/2013 05:12 PM, azadbolour wrote:
Hi Achim,
No worries. I am only looking into using Felix for testing: to embed an OSGI
container in a test so the test does not have to rely on starting an
external Karaf. We have tried pax exam for testing but had issues with
dependencies. So I thought of trying a more direct approach of embedding
Felix in a test. Unfortunately, I am also running into difficulties starting
bundles in the embedded Felix. I get the error below which I have yet to
figure out. Just FYI. Maybe someone has an idea how to fix this.
Thanks again.
Azad
ERROR: Unable to start system bundle. (java.lang.Error: factory already
defined)
java.lang.Error: factory already defined
at java.net.URL.setURLStreamHandlerFactory(URL.java:1077)
at org.apache.felix.framework.URLHandlers.<init>(URLHandlers.java:178)
at
org.apache.felix.framework.URLHandlers.registerFrameworkInstance(URLHandlers.java:559)
at
org.apache.felix.framework.URLHandlersActivator.start(URLHandlersActivator.java:71)
at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)
at
org.apache.felix.framework.Felix$SystemBundleActivator.start(Felix.java:4475)
at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)
at org.apache.felix.framework.Felix.init(Felix.java:767)
at org.apache.felix.framework.Felix.start(Felix.java:816)
--
View this message in context:
http://karaf.922171.n3.nabble.com/embedding-karaf-tp4028257p4028289.html
Sent from the Karaf - User mailing list archive at Nabble.com.
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com