Primefaces 5 No AtmosphereHandler found

UI Components for JSF
Post Reply
noxid
Posts: 39
Joined: 19 Dec 2013, 10:24

23 Jul 2014, 13:53

Hello,

im using Primefaces 5.0.4 with JSF 2.2 and Jboss wildfly im my application. I did set up Atmosphere as follows:

pom.xml

Code: Select all

<dependency>
        <groupId>org.atmosphere</groupId>
        <artifactId>atmosphere-runtime-native</artifactId>
        <version>2.1.3</version>
    </dependency>
    <dependency>
        <groupId>org.atmosphere.jboss.as</groupId>
        <artifactId>jboss-as-websockets</artifactId>
        <version>0.5</version>
    </dependency>
web.xml

Code: Select all

<servlet>
    <servlet-name>Push Servlet</servlet-name>
    <servlet-class>org.primefaces.push.PushServlet</servlet-class>
    <async-supported>true</async-supported>
</servlet>
<servlet-mapping>
    <servlet-name>Push Servlet</servlet-name>
    <url-pattern>/primepush/*</url-pattern>
</servlet-mapping>
when I start my application the following error is thrown:
Exception handling request to /test/primepush/notify: org.atmosphere.cpr.AtmosphereMappingException: No AtmosphereHandler found. Make sure you define it inside WEB-INF/atmosphere.xml or annotate using @___Service
According to primefaces showcase and the primefaces user guide you don't have to make any further configuration. Does anyone know why it doesn't work?

regards
PrimeFaces 5.0.9 | JSF Mojorra 2.2 | JBoss Wildfly

felipe.gdr
Posts: 87
Joined: 23 Jan 2013, 22:43
Location: São Paulo - Brasil

25 Jul 2014, 18:50

Have you created an endpoint class as said on the showcase and docs?

Code: Select all

package org.primefaces.showcase.push.notify;
 
import javax.faces.application.FacesMessage;
import org.primefaces.push.annotation.OnMessage;
import org.primefaces.push.annotation.PushEndpoint;
import org.primefaces.push.impl.JSONEncoder;
 
@PushEndpoint("/notify")
public class NotifyResource {
         
    @OnMessage(encoders = {JSONEncoder.class})
    public FacesMessage onMessage(FacesMessage message) {
        return message;
    }
 
}
Primefaces 3.5.24
Primefaces-ext 0.7.1
JBoss 7.1.1
mojarra 2.1.26

noxid
Posts: 39
Joined: 19 Dec 2013, 10:24

28 Jul 2014, 08:04

hi,

yes I did. I took it directly from the showcase and adopted it to my project. (changed channel and name)
PrimeFaces 5.0.9 | JSF Mojorra 2.2 | JBoss Wildfly

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests