glassfish
  1. glassfish
  2. GLASSFISH-18985

missing resource exception during web request redirect

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.2
    • Fix Version/s: 4.1
    • Component/s: security
    • Labels:
      None

      Description

      From http://java.net/projects/glassfish/lists/users/archive/2012-06/message/76

      [#|2012-06-14T00:42:32.624-0700|SEVERE|glassfish3.1.2|org.apache.catalina.connector.CoyoteAdapter|_ThreadID=32;_ThreadName=Thread-2;|PWC3989:
      An exception or error occurred in the container during the request
      processing
      java.util.MissingResourceException: Can't find resource for bundle
      java.util.PropertyResourceBundle, key missing_http_header.host
      at java.util.ResourceBundle.getObject(ResourceBundle.java:402)
      at java.util.ResourceBundle.getString(ResourceBundle.java:362)
      at
      com.sun.web.security.RealmAdapter.getHostAndPort(RealmAdapter.java:973)
      at com.sun.web.security.RealmAdapter.redirect(RealmAdapter.java:1097)
      at
      com.sun.web.security.RealmAdapter.hasUserDataPermission(RealmAdapter.java:945)
      at
      com.sun.web.security.RealmAdapter.hasUserDataPermission(RealmAdapter.java:869)
      at
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:511)
      at
      org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:623)
      at
      org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      at
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
      at
      org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
      at
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
      at
      com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
      at
      com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
      at
      com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
      at
      com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
      at
      com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
      at
      com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at
      com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at
      com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at
      com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at
      com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at
      com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at
      com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at
      com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:679)

      #]

        Activity

        Hide
        Bobby Bissett added a comment -

        This looks like a one-line fix in an i18n file. Is it really bad enough that it needs to be postponed? It's annoying to skim our log files for errors and keep coming across stack traces for this issue.

        Show
        Bobby Bissett added a comment - This looks like a one-line fix in an i18n file. Is it really bad enough that it needs to be postponed? It's annoying to skim our log files for errors and keep coming across stack traces for this issue.
        Hide
        reza_rahman added a comment -

        Wanted to check - would you consider contributing a fix? If so I could check with the component owner to reconsider this. I think the primary problem at the moment is merely prioritization.

        Show
        reza_rahman added a comment - Wanted to check - would you consider contributing a fix? If so I could check with the component owner to reconsider this. I think the primary problem at the moment is merely prioritization.
        Hide
        Bobby Bissett added a comment -

        Sure, am happy to commit a fix, but telling me what text is supposed to be in the i18n file (if that's the issue) would take less time than entering it into the i18n file directly.

        Show
        Bobby Bissett added a comment - Sure, am happy to commit a fix, but telling me what text is supposed to be in the i18n file (if that's the issue) would take less time than entering it into the i18n file directly.
        Hide
        reza_rahman added a comment -

        Given our current very focused priorities in all reality all the development support you would get is probably just a quick code review. I can try my best to help you with the rest myself.

        It is really a small but important first step to being more involved down the line (provided that's something you want to do or are already doing).

        Show
        reza_rahman added a comment - Given our current very focused priorities in all reality all the development support you would get is probably just a quick code review. I can try my best to help you with the rest myself. It is really a small but important first step to being more involved down the line (provided that's something you want to do or are already doing).
        Hide
        Bobby Bissett added a comment -

        I only have a workspace from the 3.1.2-b23 build (to match what we use in production), but I think the fix is simply to add this line to web/war-util/src/main/resources/com/sun/logging/enterprise/system/container/web/LogStrings.properties:

        — begin —
        missing_http_header.host=Host header not found in request
        — end —

        For anyone looking at it, the code in RealmAdapter that needs this string is:

        if(hostPort == null)

        { throw new ProtocolException(rb.getString("missing_http_header.host")); }

        ...added 8/30/11 as a fix for issue 17198.

        Show
        Bobby Bissett added a comment - I only have a workspace from the 3.1.2-b23 build (to match what we use in production), but I think the fix is simply to add this line to web/war-util/src/main/resources/com/sun/logging/enterprise/system/container/web/LogStrings.properties: — begin — missing_http_header.host=Host header not found in request — end — For anyone looking at it, the code in RealmAdapter that needs this string is: if(hostPort == null) { throw new ProtocolException(rb.getString("missing_http_header.host")); } ...added 8/30/11 as a fix for issue 17198.
        Hide
        reza_rahman added a comment -

        Thanks very much. I'll follow up ASAP and report back.

        Show
        reza_rahman added a comment - Thanks very much. I'll follow up ASAP and report back.
        Hide
        reza_rahman added a comment -

        This is now under review for 4.0.1. Thanks again.

        Show
        reza_rahman added a comment - This is now under review for 4.0.1. Thanks again.
        Hide
        Nithya Ramakrishnan added a comment -

        Sending war-util/src//main/resources/com/sun/logging/enterprise/system/container/web/LogStrings.properties
        Transmitting file data .
        Committed revision 63243.

        Show
        Nithya Ramakrishnan added a comment - Sending war-util/src//main/resources/com/sun/logging/enterprise/system/container/web/LogStrings.properties Transmitting file data . Committed revision 63243.

          People

          • Assignee:
            Nithya Ramakrishnan
            Reporter:
            Bobby Bissett
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: