Jetty
  1. Jetty
  2. JETTY-1483

Bug or Inpropper usage? org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte F6 in state 3

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: 7.6.0, 8.1.0
    • Fix Version/s: None
    • Component/s: Hightide, HTTP
    • Labels:
      None
    • Environment:
      Mac OS X, Spring 3.0.5, Java 6
    • Number of attachments :
      0

      Description

      I already posted to http://stackoverflow.com/questions/9136557/jetty-utf8appendablenotutf8exception

      We use a payment service that will call our system after user entered payment data. They respond to a Spring Controller but before the controller receives the request from "outside", I get an ugly Exception. Tried also with older Version of jetty. Almost same error. Wireshark HTTP Package can be found here: http://pastie.org/3312129

      2012-02-04 13:36:06, DEBUG, org.springframework.web.servlet.DispatcherServlet, qtp535364565-20, o.s.w.s.DispatcherServlet Handler execution resulted in exception - forwarding to resolved error view: ModelAndView: reference to view with name 'friendlyError'; model is

      {exception=org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte F6 in state 3}

      org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte F6 in state 3
      at org.eclipse.jetty.util.Utf8Appendable.appendByte(Utf8Appendable.java:168) ~[na:na]
      at org.eclipse.jetty.util.Utf8Appendable.append(Utf8Appendable.java:93) ~[na:na]
      at org.eclipse.jetty.util.UrlEncoded.decodeUtf8To(UrlEncoded.java:506) ~[na:na]
      at org.eclipse.jetty.util.UrlEncoded.decodeTo(UrlEncoded.java:554) ~[na:na]
      at org.eclipse.jetty.server.Request.extractParameters(Request.java:285) ~[na:na]
      at org.eclipse.jetty.server.Request.getParameter(Request.java:695) ~[na:na]
      at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:184) ~[servlet-api-3.0.jar:na]
      at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:184) ~[servlet-api-3.0.jar:na]
      at org.springframework.web.servlet.i18n.LocaleChangeInterceptor.preHandle(LocaleChangeInterceptor.java:69) ~[spring-webmvc-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:781) [spring-webmvc-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) [spring-webmvc-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) [spring-webmvc-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) [spring-webmvc-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) [servlet-api-3.0.jar:na]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [servlet-api-3.0.jar:na]
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:575) [jetty-servlet-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1365) [jetty-servlet-8.1.0.RC5.jar:8.1.0.RC5]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:109) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1336) [jetty-servlet-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:483) [jetty-servlet-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) [jetty-server-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:519) [jetty-security-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233) [jetty-server-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065) [jetty-server-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:412) [jetty-servlet-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192) [jetty-server-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999) [jetty-server-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) [jetty-server-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250) [jetty-server-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) [jetty-server-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) [jetty-server-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.server.Server.handle(Server.java:351) [jetty-server-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:451) [jetty-server-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:931) [jetty-server-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:857) [jetty-http-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230) [jetty-http-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76) [jetty-server-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:611) [jetty-io-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45) [jetty-io-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599) [jetty-util-8.1.0.RC5.jar:8.1.0.RC5]
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534) [jetty-util-8.1.0.RC5.jar:8.1.0.RC5]

        Activity

        Hide
        Frank Szilinski added a comment - - edited

        This issue can be closed. Jetty work's like a charm (like always). It is a issue from remote caller.

        For completeness: I added a CharacterEncodingFilter to Spring for this special request. The exception should go away.

        <filter>
        <filter-name>encoding-filter</filter-name>
        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
        <init-param>
        <param-name>encoding</param-name>
        <param-value>ISO-8859-15</param-value>
        </init-param>
        <init-param>
        <param-name>forceEncoding</param-name>
        <param-value>true</param-value>
        </init-param>
        </filter>
        <filter-mapping>
        <filter-name>encoding-filter</filter-name>
        <url-pattern>/app/specialRequest.do</url-pattern>
        </filter-mapping>

        Show
        Frank Szilinski added a comment - - edited This issue can be closed. Jetty work's like a charm (like always). It is a issue from remote caller. For completeness: I added a CharacterEncodingFilter to Spring for this special request. The exception should go away. <filter> <filter-name>encoding-filter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>ISO-8859-15</param-value> </init-param> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>encoding-filter</filter-name> <url-pattern>/app/specialRequest.do</url-pattern> </filter-mapping>
        Hide
        Jesse McConnell added a comment -

        closing on request

        Show
        Jesse McConnell added a comment - closing on request

          People

          • Assignee:
            Unassigned
            Reporter:
            Frank Szilinski
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: