Thrift
  1. Thrift
  2. THRIFT-1257

thrift's dependency scope on javax.servlet:servlet-api should be 'provided'

    Details

      Description

      libthrift 0.6.1 pom (org.apache.thrift:libthrift-0.6.1) specifies javax.servlet:servlet-api-2.5 as compulsory dependency. This causes the jar depending on this libthrift to be skipped by Tomcat with the following error:

       
      INFO: validateJarFile(/usr/local/apache-tomcat-7.0.2/webapps/mywebapp/WEB-INF/lib/my-service-1.0.0.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
      

      Workaround
      While including libthrift-0.6.1 as dependency in maven pom, exclude javax.servlet:servlet-api using exclusions as:

       
          <dependency>
              <groupId>org.apache.thrift</groupId>
              <artifactId>libthrift</artifactId>
              <version>0.6.1</version>
              <exclusions>
                  <exclusion>
                      <groupId>javax.servlet</groupId>
                      <artifactId>servlet-api</artifactId>
                  </exclusion>
              </exclusions>
          </dependency>
      
      1. thrift-1257.patch
        0.7 kB
        Jake Farrell

        Activity

        Hide
        Jake Farrell added a comment -

        Changes scope of javax.servlet to provided so containers using the TServlet.java class can provided the desired servlet api

        Show
        Jake Farrell added a comment - Changes scope of javax.servlet to provided so containers using the TServlet.java class can provided the desired servlet api
        Hide
        Jake Farrell added a comment -

        Updated scope to provided

        Show
        Jake Farrell added a comment - Updated scope to provided
        Hide
        Hudson added a comment -

        Integrated in Thrift #239 (See https://builds.apache.org/job/Thrift/239/)
        Thrift-1257: thrift's dependency scope on javax.servlet:servlet-api should be 'provided'
        Client: java
        Patch: jfarrell

        Updated artifact servlet-api scope to provided.

        Show
        Hudson added a comment - Integrated in Thrift #239 (See https://builds.apache.org/job/Thrift/239/ ) Thrift-1257: thrift's dependency scope on javax.servlet:servlet-api should be 'provided' Client: java Patch: jfarrell Updated artifact servlet-api scope to provided.

          People

          • Assignee:
            Jake Farrell
            Reporter:
            Shashwat Agarwal
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development