Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-27972

Search Admin Tool is throwing an NPE when search is disabled

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1
    • Fix Version/s: 10.3, 11.0
    • Component/s: Search
    • Labels:
      None
    • 10 status:
      Resolved

      Description

      Jaco Gillman wrote:
      I tried to add the Search tool to a Site in my Sakai 10.1 OOTB installation. I then clicked on the Admin button of the Search tool and got the error below.

      org.sakaiproject.portal.api.PortalHandlerException: org.sakaiproject.tool.api.ToolException: javax.servlet.ServletException: Search Failed
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:901)
      caused by: org.sakaiproject.tool.api.ToolException: javax.servlet.ServletException: Search Failed
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1536)
      caused by: javax.servlet.ServletException: Search Failed
      at org.sakaiproject.search.tool.ControllerServlet2.doGet(ControllerServlet2.java:167)
      caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getSearchStatus' in class org.sakaiproject.search.tool.SearchAdminBeanImpl threw exception java.lang.NullPointerException at /WEB-INF/vm/admin/index.vm[line 14, column 37]
      at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284)
      caused by: java.lang.NullPointerException
      at org.sakaiproject.search.elasticsearch.ElasticSearchIndexBuilder.assureIndex(ElasticSearchIndexBuilder.java:821)
      at org.sakaiproject.search.elasticsearch.ElasticSearchService.getNDocs(ElasticSearchService.java:545)
      at org.sakaiproject.search.elasticsearch.ElasticSearchService.getSearchStatus(ElasticSearchService.java:583)
      at org.sakaiproject.search.adapter.SearchServiceAdapter.getSearchStatus(SearchServiceAdapter.java:110)
      at org.sakaiproject.search.tool.SearchAdminBeanImpl.getSearchStatus(SearchAdminBeanImpl.java:629)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389)
      at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
      at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
      at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
      at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507)
      at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
      at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
      at org.apache.velocity.Template.merge(Template.java:328)
      at org.apache.velocity.Template.merge(Template.java:235)
      at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:381)
      at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:345)
      at org.sakaiproject.search.tool.ControllerServlet2.execute(ControllerServlet2.java:321)
      at org.sakaiproject.search.tool.ControllerServlet2.doGet(ControllerServlet2.java:167)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:394)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:378)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
      at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:513)
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1536)
      at org.sakaiproject.portal.charon.handlers.ToolHandler.doTool(ToolHandler.java:215)
      at org.sakaiproject.portal.charon.handlers.ToolHandler.doGet(ToolHandler.java:98)
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:901)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:455)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
      at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2440)
      at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2429)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:662)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ern Earle R Nietzel
                Reporter:
                ern Earle R Nietzel
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code