Hadoop Common
  1. Hadoop Common
  2. HADOOP-6281

HtmlQuoting throws NullPointerException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Fixed null pointer error when quoting HTML in the case JSP has no parameters.

      Description

      java.lang.NullPointerException
      	at org.apache.hadoop.http.HtmlQuoting.quoteHtmlChars(HtmlQuoting.java:95)
      	at org.apache.hadoop.http.HttpServer$QuotingInputFilter$RequestQuoter.getParameter(HttpServer.java:570)
      	at org.apache.hadoop.hdfs.server.namenode.NamenodeJspHelper$HealthJsp.generateHealthReport(NamenodeJspHelper.java:168)
      	at org.apache.hadoop.hdfs.server.namenode.dfshealth_jsp._jspService(dfshealth_jsp.java:96)
      	...
      
      1. h-6281.patch
        2 kB
        Owen O'Malley
      2. h-6281.20.patch
        2 kB
        Devaraj Das

        Issue Links

          Activity

          Hide
          Owen O'Malley added a comment -

          Add check for null pointers.

          Show
          Owen O'Malley added a comment - Add check for null pointers.
          Hide
          Chris Douglas added a comment -

          +1

          Show
          Chris Douglas added a comment - +1
          Hide
          Owen O'Malley added a comment -

          [exec] +1 overall.
          [exec]
          [exec] +1 @author. The patch does not contain any @author tags.
          [exec]
          [exec] +1 tests included. The patch appears to include 3 new or modified tests.
          [exec]
          [exec] +1 javadoc. The javadoc tool did not generate any warning messages.
          [exec]
          [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
          [exec]
          [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
          [exec]
          [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings.

          All of the common tests also pass.

          Show
          Owen O'Malley added a comment - [exec] +1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] +1 tests included. The patch appears to include 3 new or modified tests. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings. All of the common tests also pass.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #51 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/51/)
          . Avoid null pointer exceptions when the jsps don't have
          paramaters (omalley)

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #51 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/51/ ) . Avoid null pointer exceptions when the jsps don't have paramaters (omalley)
          Hide
          Owen O'Malley added a comment -

          I just committed this.

          Show
          Owen O'Malley added a comment - I just committed this.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk-Commit #62 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/62/)
          . Fix null pointer in jsps.

          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #62 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/62/ ) . Fix null pointer in jsps.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk-Commit #63 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/63/)
          . Pushed the jars without the fix last time.

          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #63 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/63/ ) . Pushed the jars without the fix last time.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk #108 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/108/)
          . Avoid null pointer exceptions when the jsps don't have
          paramaters (omalley)

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk #108 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/108/ ) . Avoid null pointer exceptions when the jsps don't have paramaters (omalley)
          Hide
          gary murry added a comment -

          Hey Owen, now we are getting the following:

          2009-09-25 14:06:11,259 ERROR mortbay.log (?:invoke0(?)) - /getimage
          java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String
          	at org.apache.hadoop.http.HttpServer$QuotingInputFilter$RequestQuoter.getParameterMap(HttpServer.java:591)
          	at org.apache.hadoop.hdfs.server.namenode.GetImageServlet.doGet(GetImageServlet.java:42)
          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
          	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
          	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1124)
          	at org.apache.hadoop.http.HttpServer$QuotingInputFilter.doFilter(HttpServer.java:613)
          	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
          	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:361)
          	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
          	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
          	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
          	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
          	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
          	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
          	at org.mortbay.jetty.Server.handle(Server.java:324)
          	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
          	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)
          	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
          	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
          	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
          	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
          	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)
          
          Show
          gary murry added a comment - Hey Owen, now we are getting the following: 2009-09-25 14:06:11,259 ERROR mortbay.log (?:invoke0(?)) - /getimage java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String at org.apache.hadoop.http.HttpServer$QuotingInputFilter$RequestQuoter.getParameterMap(HttpServer.java:591) at org.apache.hadoop.hdfs.server.namenode.GetImageServlet.doGet(GetImageServlet.java:42) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1124) at org.apache.hadoop.http.HttpServer$QuotingInputFilter.doFilter(HttpServer.java:613) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:361) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)
          Hide
          gary murry added a comment -

          I am re-closing. I did not see that HADOOP-6285 had been opened against the issue.

          Show
          gary murry added a comment - I am re-closing. I did not see that HADOOP-6285 had been opened against the issue.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          Gary, see HADOOP-6285.

          Show
          Tsz Wo Nicholas Sze added a comment - Gary, see HADOOP-6285 .
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk-Commit #57 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/57/)

          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #57 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/57/ )
          Hide
          Hudson added a comment -

          Integrated in Hdfs-Patch-h2.grid.sp2.yahoo.net #20 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/20/)

          Show
          Hudson added a comment - Integrated in Hdfs-Patch-h2.grid.sp2.yahoo.net #20 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/20/ )
          Hide
          Devaraj Das added a comment -

          This patch applies to 0.20. (not to be committed)

          Show
          Devaraj Das added a comment - This patch applies to 0.20. (not to be committed)

            People

            • Assignee:
              Owen O'Malley
              Reporter:
              Tsz Wo Nicholas Sze
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development