Skip to content

ErrorPageSecurityFilter prevents deployment to a Servlet 3.1 compatible container #28790

Closed

Description

@wilkinsona

As identified by this answer on Stack Overflow, ErrorPageSecurityFilter extends HttpFilter which is new in Servlet 4.0. As we support deployment to Servlet 3.1-compatible containers, we should implement Filter instead and then cast the request and response to HttpServletRequest and HttpServletResponse as needed.

Activity

  1. added this to the 2.6.1 milestone on Nov 23, 2021
  2. self-assigned this
    on Nov 23, 2021
  3. benjamin-sailer commented on Dec 23, 2021

    @benjamin-sailer

    Unfortunately I've still a problem along the lines of this issue: I've been trying to make a spring boot application (version 2.6.1) run on tomcat 8.5 (supporting only servlet-api version 3.1).

    So I'm pulling the (provided) servlet-api 3.1 dependency of the interface javax.servlet.Filter(javax.servlet:javax.servlet-api:3.1.0) which is supplied without default implementation of the init-method; the implementation of org.springframework.boot.web.servlet.filter.ErrorPageSecurityFilter however seems to rely on a different interface definition (that contains the default implementation of the init method, coming from org.apache.tomcat.embed:tomcat-embed-core:9.0.52), not implementing itself.

    So I end up with an
    org.apache.catalina.core.StandardContext.filterStart Ausnahme beim Starten des Filters [errorPageSecurityFilter] java.lang.AbstractMethodError at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
    during startup. Maybe I'm doing something wrong in my project configuration, so help is appreciated, else I suspect that the default init implementation does not help.

    I know my configuration is not really straight forward so probably I'm missing something here, but maybe it would be better not to rely on the default implementation for an interface definition the version of which is not fully under spring control (e.g. meant to be provided by the external container).

  4. philwebb commented on Jan 7, 2022

    @philwebb
    Member

    @benjamin-sailer I think you're seeing a duplicate of #28902. Can you please try to upgrade to Spring Boot 2.6.2.

  5. benjamin-sailer commented on Jan 7, 2022

    @benjamin-sailer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: regressionA regression from a previous release

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions