grizzly
  1. grizzly
  2. GRIZZLY-1538

Glassfish throws unpredicatable java.lang.IllegalStateException: isHexDigit

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.2
    • Fix Version/s: 2.3.7, 3.0
    • Component/s: ajp
    • Labels:
      None
    • Environment:

      Glassfish 4 / Debian

      Description

      Sometimes for a perfectly normal URL Glassfish throws (only under production load):

      java.lang.IllegalStateException: isHexDigit
      at org.glassfish.grizzly.http.util.URLDecoder.decode(URLDecoder.java:470)
      at org.glassfish.grizzly.http.util.Parameters.processParameters(Parameters.java:653)
      at org.glassfish.grizzly.http.util.Parameters.processParameters(Parameters.java:687)
      at org.glassfish.grizzly.http.util.Parameters.handleQueryParameters(Parameters.java:335)
      at org.glassfish.grizzly.http.server.Request.parseRequestParameters(Request.java:1995)
      at org.glassfish.grizzly.http.server.Request.getParameter(Request.java:1052)
      at org.apache.catalina.connector.Request.getParameter(Request.java:1547)
      at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:448)
      at de.epoq.manakin.ManakinShow.doGet(ManakinShow.java:1190)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:354)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
      at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
      at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
      at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
      at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
      at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
      at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
      at java.lang.Thread.run(Thread.java:722)

      Request was:
      http://<domain_name>/m/show?tenantId=ltur-de&imageno=2&customerId=7355446&customerId2&actionId=3688_18&type=0

      Is there a way to work around this?

      If you try a fix pleas also include the fix for https://java.net/jira/browse/GLASSFISH-20665

        Activity

        Hide
        Ryan Lubke added a comment -

        An updated patch for 4.0 is available here: https://dl.dropboxusercontent.com/u/7319744/nucleus-grizzly-all.jar

        Show
        Ryan Lubke added a comment - An updated patch for 4.0 is available here: https://dl.dropboxusercontent.com/u/7319744/nucleus-grizzly-all.jar
        Hide
        gerald.schnabel added a comment -

        Hi - this looks much more better - currently I got

        Information:   GRIZZLY0156: Character decoding failed. Cause: [URLDecoder: Illegal hex characters in escape (%) pattern - %$e].
            Parameter [password] with value [dyndcvgz%$edd] has been ignored.
            Note that the name and value quoted here may be corrupted due to the failed decoding.
            Use FINEST level logging to see the original, non-corrupted values.
        Warnung:   Ignoring invalid query parameter: password=dyndcvgz%$edd
        Warnung:   Ignoring invalid query parameter: password=dyndcvgz%$edd
        

        and this describes much more what the problem really is - and maybe don't corrupt the glassfish - I will keep an eye on this.
        Thanks - for your support.

        Show
        gerald.schnabel added a comment - Hi - this looks much more better - currently I got Information: GRIZZLY0156: Character decoding failed. Cause: [URLDecoder: Illegal hex characters in escape (%) pattern - %$e]. Parameter [password] with value [dyndcvgz%$edd] has been ignored. Note that the name and value quoted here may be corrupted due to the failed decoding. Use FINEST level logging to see the original, non-corrupted values. Warnung: Ignoring invalid query parameter: password=dyndcvgz%$edd Warnung: Ignoring invalid query parameter: password=dyndcvgz%$edd and this describes much more what the problem really is - and maybe don't corrupt the glassfish - I will keep an eye on this. Thanks - for your support.
        Hide
        Ryan Lubke added a comment -

        Marking this as resolved in 2.3.7. If, upon installing the latest GF4 grizzly build (as referenced by the issue) bits, you find the issue persists, please re-open.

        Show
        Ryan Lubke added a comment - Marking this as resolved in 2.3.7. If, upon installing the latest GF4 grizzly build (as referenced by the issue) bits, you find the issue persists, please re-open.
        Hide
        MarceloNascimento added a comment -

        This issue is happening on Glassfish 4.0 (build 89)

        Here is the error:

        [2014-07-24T08:46:28.590-0500] [glassfish 4.0] [WARNING] [] [javax.enterprise.web.core] [tid: _ThreadID=649 _ThreadName=http-listener-1(4)] [timeMillis: 1406209588590] [levelValue: 900] [[
        Error invoking requestInitialized method on ServletRequestListener org.jboss.weld.servlet.WeldListener
        java.lang.IllegalStateException: isHexDigit
        <------>at org.glassfish.grizzly.http.util.URLDecoder.decode(URLDecoder.java:470)
        <------>at org.glassfish.grizzly.http.util.Parameters.processParameters(Parameters.java:652)
        <------>at org.glassfish.grizzly.http.util.Parameters.processParameters(Parameters.java:687)
        <------>at org.glassfish.grizzly.http.util.Parameters.handleQueryParameters(Parameters.java:335)
        <------>at org.glassfish.grizzly.http.server.Request.parseRequestParameters(Request.java:1995)
        <------>at org.glassfish.grizzly.http.server.Request.getParameter(Request.java:1052)
        <------>at org.apache.catalina.connector.Request.getParameter(Request.java:1547)
        <------>at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:448)
        <------>at org.jboss.weld.servlet.ConversationContextActivator.getConversationId(ConversationContextActivator.java:115)
        <------>at org.jboss.weld.servlet.ConversationContextActivator.activateConversationContext(ConversationContextActivator.java:82)
        <------>at org.jboss.weld.servlet.WeldListener.requestInitialized(WeldListener.java:201)
        <------>at org.apache.catalina.core.StandardContext.fireRequestInitializedEvent(StandardContext.java:5225)
        <------>at org.apache.catalina.core.StandardHostValve.preInvoke(StandardHostValve.java:647)
        <------>at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:166)
        <------>at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
        <------>at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
        <------>at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
        <------>at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
        <------>at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
        <------>at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
        <------>at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        <------>at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
        <------>at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
        <------>at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
        <------>at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
        <------>at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        <------>at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
        <------>at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
        <------>at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
        <------>at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
        <------>at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
        <------>at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
        <------>at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
        <------>at java.lang.Thread.run(Thread.java:724)
        ]]

        Not sure what causes it, but once it happens, you can´t add any parameters to a URL, since it will fail right on the "?" character.

        Eg: www.mysite.com/index.jps?arg1=1

        Any ideas?

        Best regards

        -Marcelo

        Show
        MarceloNascimento added a comment - This issue is happening on Glassfish 4.0 (build 89) Here is the error: [2014-07-24T08:46:28.590-0500] [glassfish 4.0] [WARNING] [] [javax.enterprise.web.core] [tid: _ThreadID=649 _ThreadName=http-listener-1(4)] [timeMillis: 1406209588590] [levelValue: 900] [[ Error invoking requestInitialized method on ServletRequestListener org.jboss.weld.servlet.WeldListener java.lang.IllegalStateException: isHexDigit <------>at org.glassfish.grizzly.http.util.URLDecoder.decode(URLDecoder.java:470) <------>at org.glassfish.grizzly.http.util.Parameters.processParameters(Parameters.java:652) <------>at org.glassfish.grizzly.http.util.Parameters.processParameters(Parameters.java:687) <------>at org.glassfish.grizzly.http.util.Parameters.handleQueryParameters(Parameters.java:335) <------>at org.glassfish.grizzly.http.server.Request.parseRequestParameters(Request.java:1995) <------>at org.glassfish.grizzly.http.server.Request.getParameter(Request.java:1052) <------>at org.apache.catalina.connector.Request.getParameter(Request.java:1547) <------>at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:448) <------>at org.jboss.weld.servlet.ConversationContextActivator.getConversationId(ConversationContextActivator.java:115) <------>at org.jboss.weld.servlet.ConversationContextActivator.activateConversationContext(ConversationContextActivator.java:82) <------>at org.jboss.weld.servlet.WeldListener.requestInitialized(WeldListener.java:201) <------>at org.apache.catalina.core.StandardContext.fireRequestInitializedEvent(StandardContext.java:5225) <------>at org.apache.catalina.core.StandardHostValve.preInvoke(StandardHostValve.java:647) <------>at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:166) <------>at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357) <------>at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260) <------>at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188) <------>at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191) <------>at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168) <------>at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189) <------>at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) <------>at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288) <------>at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206) <------>at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136) <------>at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114) <------>at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) <------>at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838) <------>at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113) <------>at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) <------>at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) <------>at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) <------>at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564) <------>at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544) <------>at java.lang.Thread.run(Thread.java:724) ]] Not sure what causes it, but once it happens, you can´t add any parameters to a URL, since it will fail right on the "?" character. Eg: www.mysite.com/index.jps?arg1=1 Any ideas? Best regards -Marcelo
        Hide
        oleksiys added a comment -

        There is a patch for Glassfish 4.0 already
        https://java.net/jira/browse/GLASSFISH-20840

        Show
        oleksiys added a comment - There is a patch for Glassfish 4.0 already https://java.net/jira/browse/GLASSFISH-20840

          People

          • Assignee:
            Ryan Lubke
            Reporter:
            iceandfire
          • Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: