I try to add a cache system on a JBoss server, as described in the Resteasy documentation : Resteasy Caching Features, on part 29.3. (Local Server-Side Response Cache) :
The next thing you have to do is to add a ServletContextListener, org.jboss.resteasy.plugins.cache.server.ServletServerCache. This must be specified after the ResteasyBootstrap listener in your web.xml file.
So I did, I've added a ServletServerCache listener as it is said in the web.xml after the ResteasyBootstrap listener :
<listener>
<listener-class>
org.jboss.resteasy.plugins.cache.server.ServletServerCache
</listener-class>
</listener>
Unfortunately, this produce a ClassNotFoundException in the deployment phase :
14:01:44,817 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/DoQuBookWeb]] Erreur lors de la configuration de la classe d'écoute de l'application (application listener) org.jboss.resteasy.plugins.cache.server.ServletServerCache: java.lang.ClassNotFoundException: org.jboss.resteasy.plugins.cache.server.ServletServerCache
(sorry for the french btw)
So my questions are : am I the only one in this case (it seems not to be a common error on google) ? What is/are my mistake/s ? What's the right way ?
For information I use maven, and I include the resteasy-cache-core 2.3.1.GA dependency an dI'm quite a bit lost on this point ...
Thank you in advance for the help.
Edit :
I've looked into the archives deployed on the webserver. And I did found the Jar resteasy-cache-core (containing the ServletServerCache)
Here is described briefly the project architecture :
- Main project
- Ear project (generate the deployed EAR)
- pom.xml
- Ejb project (generate an embeded JAR)
- all ejbs
- pom.xml
- Web project (generate an embeded WAR)
- some js stuff
- web.xml
- pom.xml
After a "mvn deploy", in output Maven2 gives an self containing EAR filled with :
- lib / *.jar
- META-INF/
- application.xml
- etc
- Ejb-1.0.0.jar (all ejbs)
- Web.war
- js stuff/
- META-INF/
- etc
- WEB-INF/
- web.xml CALLING ServletServerCache
- jboss-web.xml
- jboss-app.xml
- lib / *.jar WITH resteasy-cache-core.X.X.X.jar
- classes/
So, imho, Maven2 bundle it correctly. But what ? This still stand mysterious.
Any idea ? It's not clear for my why the class is still not found.
(Sorry for a so long post)