Skip to content

Getting a No matching constant for [0] #4080

@bijukunjummen

Description

@bijukunjummen

Hi, I am getting the following stacktrace when accessing a static html(in src/main/resources/static folder) using Spring Cloud Brixton.M1 which uses spring-boot-1.3.0.M5. The application is deployed as a war in Jetty. This error is not seen when accessing the application using ./gradlew bootRun though.

    java.lang.IllegalArgumentException: No matching constant for [0]
            at org.springframework.http.HttpStatus.valueOf(HttpStatus.java:488) ~[spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at org.springframework.web.context.request.ServletWebRequest.isCompatibleWithConditionalRequests(ServletWebRequest.java:244) ~[spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at org.springframework.web.context.request.ServletWebRequest.checkNotModified(ServletWebRequest.java:181) ~[spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at org.springframework.web.servlet.resource.ResourceHttpRequestHandler.handleRequest(ResourceHttpRequestHandler.java:240) ~[spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51) ~[spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) ~[spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) ~[spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) ~[spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) ~[spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[servlet-api-3.1.jar:3.1.0]
            at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) ~[spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[servlet-api-3.1.jar:3.1.0]
            at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:711) ~[na:na]
            at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1644) [jetty-servlet-9.1.3.v20140225.jar:9.1.3.v20140225]
            at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ApplicationContextHeaderFilter.doFilterInternal(EndpointWebMvcAutoConfiguration.java:249) ~[spring-boot-actuator-1.3.0.M5.jar:1.3.0.M5]
            at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1615) [jetty-servlet-9.1.3.v20140225.jar:9.1.3.v20140225]
            at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:102) ~[spring-boot-actuator-1.3.0.M5.jar:1.3.0.M5]
            at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1615) [jetty-servlet-9.1.3.v20140225.jar:9.1.3.v20140225]
            at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) ~[spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1615) [jetty-servlet-9.1.3.v20140225.jar:9.1.3.v20140225]
            at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:87) ~[spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1615) [jetty-servlet-9.1.3.v20140225.jar:9.1.3.v20140225]
            at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) ~[spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
            at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1615) [jetty-servlet-9.1.3.v20140225.jar:9.1.3.v20140225]
            at org.springframework.boot.context.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:116) [spring-boot-1.3.0.M5.jar:1.3.0.M5]
            at org.springframework.boot.context.web.ErrorPageFilter.access$000(ErrorPageFilter.java:60) [spring-boot-1.3.0.M5.jar:1.3.0.M5]
            at org.springframework.boot.context.web.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:91) [spring-boot-1.3.0.M5.jar:1.3.0.M5]

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions