I am using Karaf 4.1.2, vaadin 8.1.4, and pax-web 6.0.6, with following two dependencies:
<dependency>
<groupId>com.vaadin.external.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<version>2.4.11.vaadin2</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-push</artifactId>
<version>28.1.4</version>
</dependency>
and the configuration:
@Component(service = myUI.class, scope = ServiceScope.PROTOTYPE)
@Theme("custom")
@Push(value = PushMode.AUTOMATIC,
//transport = Transport.LONG_POLLING,
transport = Transport.WEBSOCKET)
public class myUI extends UI {
@Component(scope = ServiceScope.PROTOTYPE, service = VaadinServlet.class)
@WebServlet(urlPatterns = "/pushsample/*", name = "PushSampleServlet", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = VaadinPushUI.class)
public class VaadinPushServlet extends VaadinServlet {
However, it always failed to initialize the AtmosphereFramework:
2017-11-30T18:39:37,536 | ERROR | pipe-update 92 | AtmosphereFramework | 84 - com.vaadin.external.org.slf4j - 1.6.1 | Failed to initialize Atmosphere Framework
java.util.ServiceConfigurationError: org.atmosphere.inject.Injectable: Provider org.atmosphere.inject.AtmosphereConfigInjectable not found
at java.util.ServiceLoader.fail(ServiceLoader.java:239) ~[?:?]
at java.util.ServiceLoader.access$300(ServiceLoader.java:185) ~[?:?]
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372) ~[?:?]
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) ~[?:?]
at java.util.ServiceLoader$1.next(ServiceLoader.java:480) ~[?:?]
at org.atmosphere.inject.InjectableObjectFactory.configure(InjectableObjectFactory.java:86) ~[82:com.vaadin.external.atmosphere.runtime:2.4.11.vaadin2]
at org.atmosphere.cpr.AtmosphereFramework.lookupDefaultObjectFactoryType(AtmosphereFramework.java:1697) ~[82:com.vaadin.external.atmosphere.runtime:2.4.11.vaadin2]
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:880) [82:com.vaadin.external.atmosphere.runtime:2.4.11.vaadin2]
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:838) [82:com.vaadin.external.atmosphere.runtime:2.4.11.vaadin2]
at com.vaadin.server.communication.PushRequestHandler.initAtmosphere(PushRequestHandler.java:216) [88:com.vaadin.server:8.1.4]
at com.vaadin.server.communication.PushRequestHandler.<init>(PushRequestHandler.java:84) [88:com.vaadin.server:8.1.4]
at com.vaadin.server.VaadinServletService.createRequestHandlers(VaadinServletService.java:53) [88:com.vaadin.server:8.1.4]
Anyone has the idea about this error???