java.lang.IllegalArgumentException: No matching constant for [255]

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Spring Boot controller with custom status codes?
    via Stack Overflow by eze
    ,
  • HTTP Status code 306 is not supported by org.springframework.http.HttpStatus Should be (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) 2012-04-18 14:03:29,184 [http-8080-1] DEBUG org.springframework.web.servlet.handler.SimpleMappingExceptionResolver - Resolving exception from handler [com.hurra.shop.mashup.web.httpStatusTest@4976d6]: java.lang.IllegalArgumentException: No matching constant for [306] 2012-04-18 14:03:29,184 [http-8080-1] DEBUG org.springframework.web.servlet.handler.SimpleMappingExceptionResolver - Resolving to default view 'uncaughtException' for exception of type [java.lang.IllegalArgumentException] 2012-04-18 14:03:29,184 [http-8080-1] DEBUG org.springframework.web.servlet.handler.SimpleMappingExceptionResolver - Exposing Exception as model attribute 'exception' 2012-04-18 14:03:29,184 [http-8080-1] DEBUG org.springframework.web.servlet.DispatcherServlet - Handler execution resulted in exception - forwarding to resolved error view: ModelAndView: reference to view with name 'uncaughtException'; model is {exception=java.lang.IllegalArgumentException: No matching constant for [306]} java.lang.IllegalArgumentException: No matching constant for [306] at org.springframework.http.HttpStatus.valueOf(HttpStatus.java:369) at com.hurra.proxy.integration.IntegrationPreparationChain.resolveHttpStatus(IntegrationPreparationChain.java:169) at com.hurra.proxy.integration.IntegrationPreparationChain.doProcess(IntegrationPreparationChain.java:132) at com.hurra.proxy.integration.AbstractRequestPreparationChain.processInternal(AbstractRequestPreparationChain.java:77) at com.hurra.proxy.integration.AbstractRequestPreparationChain.prepare(AbstractRequestPreparationChain.java:50) at com.hurra.proxy.integration.HttpInboundForwardingGateway.handleRequest(HttpInboundForwardingGateway.java:50) at com.hurra.shop.mashup.web.AbstractForwardingController.handleRequest(AbstractForwardingController.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662)
    via by Mariusz Mscichowski,
  • HTTP Status code 306 is not supported by org.springframework.http.HttpStatus Should be (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) 2012-04-18 14:03:29,184 [http-8080-1] DEBUG org.springframework.web.servlet.handler.SimpleMappingExceptionResolver - Resolving exception from handler [com.hurra.shop.mashup.web.httpStatusTest@4976d6]: java.lang.IllegalArgumentException: No matching constant for [306] 2012-04-18 14:03:29,184 [http-8080-1] DEBUG org.springframework.web.servlet.handler.SimpleMappingExceptionResolver - Resolving to default view 'uncaughtException' for exception of type [java.lang.IllegalArgumentException] 2012-04-18 14:03:29,184 [http-8080-1] DEBUG org.springframework.web.servlet.handler.SimpleMappingExceptionResolver - Exposing Exception as model attribute 'exception' 2012-04-18 14:03:29,184 [http-8080-1] DEBUG org.springframework.web.servlet.DispatcherServlet - Handler execution resulted in exception - forwarding to resolved error view: ModelAndView: reference to view with name 'uncaughtException'; model is {exception=java.lang.IllegalArgumentException: No matching constant for [306]} java.lang.IllegalArgumentException: No matching constant for [306] at org.springframework.http.HttpStatus.valueOf(HttpStatus.java:369) at com.hurra.proxy.integration.IntegrationPreparationChain.resolveHttpStatus(IntegrationPreparationChain.java:169) at com.hurra.proxy.integration.IntegrationPreparationChain.doProcess(IntegrationPreparationChain.java:132) at com.hurra.proxy.integration.AbstractRequestPreparationChain.processInternal(AbstractRequestPreparationChain.java:77) at com.hurra.proxy.integration.AbstractRequestPreparationChain.prepare(AbstractRequestPreparationChain.java:50) at com.hurra.proxy.integration.HttpInboundForwardingGateway.handleRequest(HttpInboundForwardingGateway.java:50) at com.hurra.shop.mashup.web.AbstractForwardingController.handleRequest(AbstractForwardingController.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662)
    via by Mariusz Mscichowski,
    • java.lang.IllegalArgumentException: No matching constant for [255] at org.springframework.http.HttpStatus.valueOf(HttpStatus.java:488) at org.springframework.test.web.servlet.result.StatusResultMatchers.getHttpStatusSeries(StatusResultMatchers.java:139)

    Users with the same issue

    Unknown visitor1 times, last one,