Java.lang.NoClassDefFoundError: org / atmosphere / cpr / AsyncSupportListenerAdapter
I am trying to route a message from server to client in this way:
PushContext pushContext = PushContextFactory.getDefault().getPushContext();
pushContext.push("/registrationEvent", "There was another registration");
My problem is that I have the following error
ava.lang.NoClassDefFoundError: Could not initialize class org.primefaces.push.PushContextFactory
But I think this is due to a problem when initializing the project:
java.lang.NoClassDefFoundError: org/atmosphere/cpr/AsyncSupportListenerAdapter
I am trying to add an atmosphere jar file ... With no success. Did I do something wrong? I am using glassfish 3.1.
Thank!
+3
source to share
1 answer
Major MigrationGuide reports: "PrimeFaces Push is overridden, PushContext is deprecated, use EventBus instead of the new Push API."
In this case, on pom.xml, enter version 2.2.1. You are probably using the old atmosphere. If you are trying to use Primefaces 5.0 enter the code below:
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>5.0</version>
</dependency>
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>primefaces-extensions</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<version>2.2.1</version>
</dependency>
+1
source to share