[ 
https://issues.apache.org/jira/browse/HBASE-13001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14327057#comment-14327057
 ] 

Vikas Vishwakarma commented on HBASE-13001:
-------------------------------------------

This looks like a missing null check issue in the following lines for fqtn
{noformat}
     String fqtn = request.getParameter("name"); 
     HTable table = (HTable) master.getConnection().getTable(fqtn)
{noformat}

I have handled it in the following manner 
{noformat}
if (fqtn != null) {
    HTable table = (HTable) master.getConnection().getTable(fqtn)
    + populate all other fqtn  and table dependent parameters
    + existing page loading methods
} else {
     Load an empty page with the message "Table not ready"  
     redirect back to the main page after timeout  
}
{noformat}

I deployed and tested the changes locally and looks to be working fine
To test the fix, I set fqtn explicitly to null in the code and verified the 
page loaded by clicking on a table details page (snapshot attached)
It will show Table not ready for 5 secs and automatically redirect back to the 
main page

> NullPointer in master logs for table.jsp
> ----------------------------------------
>
>                 Key: HBASE-13001
>                 URL: https://issues.apache.org/jira/browse/HBASE-13001
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.98.10
>            Reporter: Vikas Vishwakarma
>            Assignee: Vikas Vishwakarma
>            Priority: Trivial
>         Attachments: HBASE-13001.patch
>
>
> Seeing a NullPointer issue in master logs for table.jsp probably similar to 
> HBASE-6607
> {noformat}
> 2015-02-09 14:04:00,622 ERROR org.mortbay.log: /table.jsp
> java.lang.NullPointerException
>         at 
> org.apache.hadoop.hbase.generated.master.table_jsp._jspService(table_jsp.java:71)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>         at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
>         at 
> org.apache.hadoop.http.lib.StaticUserWebFilter$StaticUserFilter.doFilter(StaticUserWebFilter.java:109)
>         at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
>         at 
> org.apache.hadoop.http.HttpServer$QuotingInputFilter.doFilter(HttpServer.java:1087)
>         at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
>         at 
> org.apache.hadoop.http.NoCacheFilter.doFilter(NoCacheFilter.java:45)
>         at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
>         at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
>         at 
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>         at 
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>         at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
>         at 
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
>         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:326)
>         at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>         at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>         at 
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
>         at 
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to