Hello everyone,

I develop a software which provides webservices on a tomcat. These webservices 
parse and display data from a 3rd website with JSOUP in XML or JSON format. 
Now I want to use the server-side caching to reduce the requests be made to 
these websites.
The Project is managed with Maven and I'm using the 3.0.6.Final version of 
resteasy and it will all be deployed on an integrated Tomcat 7 for testing 
purposes. 

While researching on how to get the caching into my project I stumbled upon 
this link 
http://docs.jboss.org/resteasy/docs/1.1.GA/userguide/html/Cache_NoCache_CacheControl.html
 which I thought contained everything I needed. So I added the dependency to my 
pom

        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-cache-core</artifactId>
            <version>3.0.9.Final</version>
        </dependency>

and added the context parameter to my web.xml

    <context-param>
        <param-name>resteasy.server.cache.maxsize</param-name>
        <param-value>1000</param-value>
    </context-param>

    <context-param>
        <param-name>resteasy.server.cache.eviction.wakeup.interval</param-name>
        <param-value>5000</param-value>
    </context-param>

    <listener>
        
<listener-class>org.jboss.resteasy.plugins.cache.server.ServletServerCache</listener-class>
    </listener>

But while trying to run the project on my server I get the following exception

SEVERE: Error configuring application listener of class 
org.jboss.resteasy.plugins.cache.server.ServletServerCache
java.lang.ClassNotFoundException: 
org.jboss.resteasy.plugins.cache.server.ServletServerCache
    at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
    at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
    at 
org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:415)
    at 
org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:397)
    at 
org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
    at 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4638)
    at 
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204)
    at 
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

So I build the war with Maven -> build and checked for the jar file in 
WEB-INF/lib/ and found the resteasy-cache-core-3.0.9.Final.jar.

What is going wrong? Or is the way on approaching the server-side cache 
implementation wrong?

Thank you.
                                          
------------------------------------------------------------------------------
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to