So due to my error,
Caused by: java.lang.ClassNotFoundException:
org.atmosphere.cpr.AsyncSupportListenerAdapter
and since I had the correct dependencies (according to the PF manual), I thought it might be related to my pom.xml file. Due to my set up, I include several Import-Packages. So I added the following package,
<Import-Package>org.atmosphere.cpr</Import-Package>
This resulted in my ClassNotFoundException being resolved, however, I came across another issue when trying to deploy my webapp.
The bundle "atmosphere-runtime-1.0.0.RC1.jar" could not be resolved.
Reason: Missing Constraint: Import-Package: com.sun.enterprise.web.connector.grizzly.comet
This confused me, according to the PF manual, I don't require any more dependencies than I have already included. So anyway, to try and resolve the issue I went about finding the correct dependency and included that. However, the list of Missing Constraint
's grew larger and larger.
Now, I didn't want to include any dependencies that I don't require and will not use. So I removed all of the dependencies I added, except from Atmosphere. When looking at the maven repo for atmosphere-runtime, I noticed that the version given in the PF user guide, is now quite outdated. So I changed to use the most recent:
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<version>2.0.1</version>
</dependency>
And bingo - it now builds and deploys successfully(Though I am having trouble receiving a 'push' from my client JSF page - but that's a different question!). Why I had this issue and not others, still confuses me. But I hope this helps anyone with a similar issue.