Vaadin 7.4 + CDI + vaadin-push in wildfly 8.2 doesn't work. Please Help

I crossposted the question here:

I have a Java EE 7 application using vaadin with vaadin-cdi component.

Without vaadin push this is my configuration:

// the Servlet @WebServlet(value = "/*", asyncSupported = true) public class MyServlet extends VaadinCDIServlet { @Override protected void servletInitialized() throws ServletException { super.servletInitialized(); } } // ... Then I have a @CDIUI anotated class. All works fine here until I add @Push to my @CDIUI anotated class and add the vaadin-push component in the classpath

<dependency org="com.vaadin" name="vaadin-push" rev="&vaadin.version;" /> And then I get this errors in wildfly trying to access my app

11:38:46,738 INFO [] (Controller Boot Thread) JBAS015874: WildFly 8.2.0.Final "Tweek" started in 7771ms - Started 464 of 511 services (92 services are lazy, passive or on-demand) 11:38:53,423 WARNING [com.vaadin.server.DefaultDeploymentConfiguration] (default task-2) ================================================================= Vaadin is running in DEBUG MODE. Add productionMode=true to web.xml to disable debug features. To show debug window, add ?debug to your application URL. ================================================================= 11:38:53,461 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Installed AtmosphereHandler com.vaadin.server.communication.PushHandler$1 mapped to context-path: /* 11:38:53,461 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Installed the following AtmosphereInterceptor mapped to AtmosphereHandler com.vaadin.server.communication.PushHandler$1 11:38:53,463 INFO [org.atmosphere.util.IOUtils] (default task-2) META-INF/services/org.atmosphere.cpr.AtmosphereFramework not found in class loader 11:38:53,465 WARNING [org.atmosphere.cpr.AtmosphereFramework] (default task-2) SessionSupport error. Make sure you define org.atmosphere.cpr.SessionSupport as a listener in web.xml instead 11:38:53,477 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Atmosphere is using org.atmosphere.util.VoidAnnotationProcessor for processing annotation 11:38:53,487 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Auto detecting WebSocketHandler in /WEB-INF/classes/ 11:38:53,494 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 11:38:53,500 INFO [org.atmosphere.container.JSR356AsyncSupport] (default task-2) JSR 356 Mapping path /{path} 11:38:53,503 INFO [io.undertow.websockets.jsr] (default task-2) UT026005: Adding programmatic server endpoint class org.atmosphere.container.JSR356Endpoint for path /{path} 11:38:53,506 INFO [io.undertow.websockets.jsr] (default task-2) UT026005: Adding programmatic server endpoint class org.atmosphere.container.JSR356Endpoint for path /{path}/{path0} 11:38:53,506 INFO [io.undertow.websockets.jsr] (default task-2) UT026005: Adding programmatic server endpoint class org.atmosphere.container.JSR356Endpoint for path /{path}/{path0}/{path1} 11:38:53,507 INFO [io.undertow.websockets.jsr] (default task-2) UT026005: Adding programmatic server endpoint class org.atmosphere.container.JSR356Endpoint for path /{path}/{path0}/{path1}/{path2} 11:38:53,507 INFO [io.undertow.websockets.jsr] (default task-2) UT026005: Adding programmatic server endpoint class org.atmosphere.container.JSR356Endpoint for path /{path}/{path0}/{path1}/{path2}/{path3} 11:38:53,507 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Installing Default AtmosphereInterceptor 11:38:53,507 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support 11:38:53,508 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor 11:38:53,508 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support 11:38:53,509 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support 11:38:53,509 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Dropping Interceptor org.atmosphere.interceptor.HeartbeatInterceptor 11:38:53,510 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support 11:38:53,510 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support 11:38:53,511 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol 11:38:53,511 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor 11:38:53,512 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection 11:38:53,512 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor 11:38:53,512 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them. 11:38:53,515 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper 11:38:53,515 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache 11:38:53,515 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster 11:38:53,515 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Broadcaster Polling Wait Time 100 11:38:53,515 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Shared ExecutorService supported: true 11:38:53,515 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Messaging Thread Pool Size: Unlimited 11:38:53,516 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Async I/O Thread Pool Size: 200 11:38:53,516 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory 11:38:53,516 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor 11:38:53,519 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Invoke AtmosphereInterceptor on WebSocket message true 11:38:53,519 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) HttpSession supported: true 11:38:53,520 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Atmosphere is using DefaultAtmosphereObjectFactory for dependency injection and object creation 11:38:53,520 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Atmosphere is using async support: org.atmosphere.container.JSR356AsyncSupport running under container: WildFly 8.2.0.Final - 1.1.0.Final using javax.servlet/3.0 and jsr356/WebSocket API 11:38:53,520 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Atmosphere Framework 2.2.4.vaadin4 started. 11:38:53,522 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-2) Installed AtmosphereInterceptor Track Message Size Interceptor using | with priority BEFORE_DEFAULT I even added a web.xml file like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns=""

But the error is still the same. I really don’t get it. What am I doing wrong ?

I am using latest vaadin 7.4.1, vaadin-cdi 1.0.1 and wildfly 8.2

Please help

+1 for linking this question to your post on stackoverflow :slight_smile:

Even I would also like to know, if anyone finds a solution for this

Latest vaadin-cdi version is 1.0.2.

Hi! I´m developing a server push notification, I have to use cors because I´m embedding my vaadin sites on another, but I´m still getting this error:

XMLHttpRequest cannot load…plication%2Fjson%3B%20charset%3DUTF-8&X-atmo-protocol=true&_=1434577340447. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘’ is therefore not allowed access.

Do you know something about it?

I have my two vaadin sites on a sugarcrm application.



i also have problems with Vaadin Push, CDI and Wildfly 8.2.
Until Vaadin 7.5 i was able to use STREAMING Mode, all other Push Modes didn’t work.
Now with 7.5 STREAMING Mode is deprecated. What should i use in future?
Has someone got this working for WildFly 8.2?


Same here. Java SE 8, Vaadin 7.6.8, Payara Server, Java EE 7. Same long errors as OP, runs infinitely causing NetBeans to hang.

To be clear, I am also running Vaadin using the CDI Addon and using the @CDIUI annotation works well until I add the @Push annotation.

The problem is fixed when you disable push via websockets.
Websockets spec oversaw the CDI scopes it should handle when receiving messages. THe problem is actually not related to the framework but to Java EE + CDI + Websockets in general.

Vaadin 7.6 introduced a new mode, WEBSOCKET_XHR (WebSockets from server to client, XHR from client to server) which allows setting of cookies, using request scopes with CDI/Spring etc. - see

Thanks a lot. Using this transport mode works.

Sadly I didn’t know this before :frowning:
Have not tried in my projects but makes sense that it wll work