I have a strange error in a Vaadin application running in Karaf 4.3.1. I have two features, that use Vaadin. Feature ONE works fine. When feature TWO is deployed I get the following error when accessing the Vaadin UI:
java.lang.NoClassDefFoundError: org/atmosphere/cpr/AtmosphereHandler at com.vaadin.server.VaadinServletService.createRequestHandlers(VaadinServletService.java:68) at com.vaadin.server.VaadinService.init(VaadinService.java:219) at com.vaadin.server.VaadinServlet.createServletService(VaadinServlet.java:380) at com.vaadin.server.VaadinServlet.init(VaadinServlet.java:210) at de.hierlmeier.karaf.vaadinsample.UIServlet.init(UIServlet.java:44) at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:624) at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:478) at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:751) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545) at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ... at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.ClassNotFoundException: org.atmosphere.cpr.AtmosphereHandler not found by com.vaadin.server [159] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1565) at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:78) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1950) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 39 more I debugged the code down to the class BundleWiringImpl and found out that when feature TWO is deployed, then the package org.atmosphere.cpr is no longer in the m_importedPkgs Variable of BundleWiringImpl instance of bundle 159. However the Karaf console tells me that the import is available: de@root()> imports -b 159 | grep org.atmosphere.cpr org.atmosphere.cpr | [2.4.30.vaadin3,) | resolved | 159 | com.vaadin.server The bundle that exports org.atmosphere.cpr is also available: de@root()> exports | grep org.atmosphere.cpr org.atmosphere.cpr | 2.4.30.vaadin3 | 155 | com.vaadin.external.atmosphere.runtime Regards Richard