I have been trying to get PrimePush working on my web application that runs on Tomcat 7. I have spent the whole day searching threads and StackOverFlow but have not yet came across a solution! Some of these include, this and this aswell as several others! Any help would be appreciated!
I followed the PrimeFaces User Guide on setting up PrimePush. My setup is Tomcat7, PrimeFaces 3.5, Atmosphere 1.0.0.RC1 , GlassFish 2.1.17 / WEB 2.2.
As such, I have the following dependencies;
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>3.5</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.1.17</version>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<version>1.0.0.RC1</version>
<scope>compile</scope>
</dependency>
My web.xml is:
<servlet>
<servlet-name>Push Servlet</servlet-name>
<servlet-class>org.primefaces.push.PushServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Push Servlet</servlet-name>
<url-pattern>/primepush/*</url-pattern>
</servlet-mapping>
I have been attemping the Push examples from the PrimeFaces showcase. Whenever I attempt to push from my managedbean;
PushContext p = PushContextFactory.getDefault().getPushContext();
p.push("/counter", String.valueOf(count));
I get the following error:
org.eclipse.virgo.kernel.osgi.framework.ExtendedNoClassDefFoundError: org/atmosphere/cpr/AsyncSupportListenerAdapter in KernelBundleClassLoader: [bundle=org.primefaces_3.5.0] in KernelBundleClassLoader: [bundle=org.primefaces_3.5.0]
...
...
...
Caused by: java.lang.ClassNotFoundException: org.atmosphere.cpr.AsyncSupportListenerAdapter
Please ask if any more info/details are required. Thanks in advance.