Tomcat 7 does not startup RewriteServletContextListener not found

Splash Forums Rewrite Users Tomcat 7 does not startup RewriteServletContextListener not found

This topic contains 1 reply, has 2 voices, and was last updated by  Christian Kaltepoth 5 hours, 9 minutes ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #27481

    sushilb
    Participant

    I am using Tomcat 7 and below is my configuration.

    in pom.xml

    <dependency>
    <groupId>org.ocpsoft.rewrite</groupId>
    <artifactId>rewrite-servlet</artifactId>
    <version>3.4.0.Final</version>
    </dependency>

    in web.xml i only have below since i am using servlet 3.0 to scan for the annotation only in specific package.

    <context-param>
    <param-name>org.ocpsoft.rewrite.annotation.BASE_PACKAGES</param-name>
    <param-value>com.example.controller</param-value>
    </context-param>

    INFO: Starting Servlet Engine: Apache Tomcat/7.0.72
    Oct 29, 2016 6:41:48 AM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
    INFO: validateJarFile(C:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\testwebapp-online\WEB-INF\lib\jsp-api-2.1.jar) – jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
    Oct 29, 2016 6:41:48 AM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
    INFO: validateJarFile(C:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\testwebapp-online\WEB-INF\lib\rewrite-servlet-3.4.0.Final.jar) – jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
    Oct 29, 2016 6:41:51 AM org.apache.catalina.startup.TaglibUriRule body

    Oct 29, 2016 6:41:52 AM org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Error configuring application listener of class org.ocpsoft.rewrite.servlet.impl.RewriteServletRequestListener
    java.lang.ClassNotFoundException: org.ocpsoft.rewrite.servlet.impl.RewriteServletRequestListener
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)
    at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:504)
    at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:486)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:113)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5034)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561)
    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)

    Oct 29, 2016 6:41:52 AM org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Error configuring application listener of class org.ocpsoft.rewrite.servlet.impl.RewriteServletContextListener
    java.lang.ClassNotFoundException: org.ocpsoft.rewrite.servlet.impl.RewriteServletContextListener
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)

    When I change the version to 3.4.1 as below I am not getting above error.

    <dependency>
    <groupId>org.ocpsoft.rewrite</groupId>
    <artifactId>rewrite-servlet</artifactId>
    <version>3.4.1.Final</version>
    </dependency>

    Could anyone explain why? Am i missing anything.

    #27482

    The 3.4.0.Final release was faulty, because for some reason the release process included a ton of classes (like the servlet api) in the shaded rewrite-server artifact. That’s why you are getting this error.

    Rewrite 3.4.1.Final was released to fix this. So you should go with 3.4.1 instead.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Comments are closed.