Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5819

Groovlet are not working anymore with Groovy 2.0.5 and Tomcat

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Not A Problem
    • Affects Version/s: 2.0.5
    • Fix Version/s: None
    • Component/s: Groovlet / GSP
    • Labels:
      None
    • Environment:
      Tomcat 6.0.36, Tomcat7.0.33

      Description

      Groovlet are no longer working with Groovy 2.0.5

      On Tomcat 7.0.33 :

      HTTP Status 500 - Error instantiating servlet class groovy.servlet.GroovyServlet
      
      type Exception report
      
      message Error instantiating servlet class groovy.servlet.GroovyServlet
      
      description The server encountered an internal error that prevented it from fulfilling this request.
      
      exception
      
      javax.servlet.ServletException: Error instantiating servlet class groovy.servlet.GroovyServlet
      	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      	org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:931)
      	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      	org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
      	org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      	org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
      	java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	java.lang.Thread.run(Thread.java:662)
      root cause
      
      java.lang.ClassNotFoundException: groovy.servlet.GroovyServlet
      	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
      	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
      	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      	org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:931)
      	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      	org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
      	org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      	org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
      	java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	java.lang.Thread.run(Thread.java:662)
      

      On Tomcat 6.0.36 :

      HTTP Status 500 - Wrapper cannot find servlet class groovy.servlet.GroovyServlet or a class it depends on
      
      type Exception report
      
      message Wrapper cannot find servlet class groovy.servlet.GroovyServlet or a class it depends on
      
      description The server encountered an internal error that prevented it from fulfilling this request.
      
      exception
      
      javax.servlet.ServletException: Wrapper cannot find servlet class groovy.servlet.GroovyServlet or a class it depends on
      	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
      	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
      	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
      	org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      	java.lang.Thread.run(Thread.java:662)
      root cause
      
      java.lang.ClassNotFoundException: groovy.servlet.GroovyServlet
      	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
      	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
      	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
      	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
      	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
      	org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      	java.lang.Thread.run(Thread.java:662)
      

      I attached a test case which is a basic war file build with gradle 1.2.
      I did make this war file working with Tomcat 6 and Groovy 1.8.6 (like example).
      url : http://localhost:8080/groovlet/test.groovy

        Attachments

        1. groovlet.tgz
          9 kB
          Victor Benarbia

          Activity

            People

            • Assignee:
              guillaume Guillaume Sauthier
              Reporter:
              jvmvik Victor Benarbia
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: