did you try with the latest felix trunk? That should at least fix your urlhandlers issue...
regards, Karl On Wed, Jan 2, 2013 at 4:41 PM, itay hindy <[email protected]> wrote: > Hi, > > I have tomcat war with embedded felix and it works great. I took it from > the > instructions at > > http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html > > I am trying to run now multiple wars each with felix embedded. I am having > some problems: > > 1 - I configure *felix.cache.rootdir* for each war to be different. Is it > correct? > 2 - what should be the *felix.service.urlhandlers* property? When I put it > *true *the first war works great and the second one fails with *Unknown > protocol: obr*. This is because inside *URLHandlers *class the > *m_streamHandlerFactory > *field is different between the first and second war. So should * > felix.service.urlhandlers* be *false*? in that case what should be the j* > ava.protocol.handler.pkgs*? > 3 - The next lines: > * url = > > > this.servletContext.getResource("/WEB-INF/lib/org.apache.felix.http.bridge-2.2.0.jar"); > * > * bundle = context.installBundle(url.toExternalForm());* > * bundle.start(); * > works for the first war but for the second I get: > ERROR: Bundle org.apache.felix.http.bridge [2] Error starting > jndi:/localhost/itay/qa/WEB-INF/lib/org.apache.felix.http.bridge-2.2.0.jar > (org.osgi.framework.BundleException: Activator start error in bundle > org.apache.felix.http.bridge [2].) > java.lang.LinkageError: loader constraint violation: when resolving > overridden method > > "org.apache.felix.http.base.internal.listener.AbstractListenerManager.addingService(Lorg/osgi/framework/ServiceReference;)Ljava/lang/Object;" > the class lo > ader (instance of > org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) of the > current class, > org/apache/felix/http/base/internal/listener/AbstractListenerManager, and > its superclass loader (instance of org/apache/catalina/loa > der/WebappClassLoader), have different Class objects for the type > org/osgi/framework/ServiceReference used in the signature > at > > org.apache.felix.http.base.internal.HttpServiceController.<init>(HttpServiceController.java:76) > > > Does anyone have an example for multiple wars each with felix embedded? > > Thanks in advance. > > -- > Regards, > > Itay Hindy > Software Solutions > +972-54-5935042 > linkedin: http://www.linkedin.com/in/itayhindy > -- Karl Pauls [email protected] http://twitter.com/karlpauls http://www.linkedin.com/in/karlpauls https://profiles.google.com/karlpauls

