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

NullPointerException in Calendar tool after Assignment tool removed from site

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.x, 2.6.0, 2.6.1, 2.7.0
    • Fix Version/s: 2.6.2, 2.7.0
    • Component/s: Calendar
    • Labels:
      None

      Description

      The following is from CTools production (2.6.0 for Calendar) automatic bug report:

      stack trace:

      org.sakaiproject.portal.api.PortalHandlerException: org.sakaiproject.tool.api.ToolException
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:768)
      caused by: org.sakaiproject.tool.api.ToolException
      at org.sakaiproject.cheftool.ToolServlet.doGet(ToolServlet.java:227)
      caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      caused by: java.lang.NullPointerException
      at org.sakaiproject.calendar.tool.CalendarAction.buildDescriptionContext(CalendarAction.java:3010)
      at org.sakaiproject.calendar.tool.CalendarAction.buildMainPanelContext(CalendarAction.java:2481)
      at sun.reflect.GeneratedMethodAccessor7013.invoke(null:-1)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:592)
      at org.sakaiproject.cheftool.VelocityPortletPaneledAction.toolModeDispatch(VelocityPortletPaneledAction.java:401)
      at org.sakaiproject.cheftool.ToolServlet.doGet(ToolServlet.java:227)
      at org.sakaiproject.cheftool.VelocityPortletPaneledAction.doGet(VelocityPortletPaneledAction.java:1014)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
      at org.sakaiproject.vm.ComponentServlet.service(ComponentServlet.java:56)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:565)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:364)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:486)
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1216)
      at org.sakaiproject.portal.charon.handlers.ToolHandler.doTool(ToolHandler.java:188)
      at org.sakaiproject.portal.charon.handlers.ToolHandler.doGet(ToolHandler.java:93)
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:768)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:616)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:548)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
      at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
      at java.lang.Thread.run(Thread.java:595)

      Tool Placement:
      No Placement

      To reproduce:

      1. create a site with both Assignment tool and Schedule tool.
      2. create an assignment and choose add due date to Schedule tool.
      3. remove the assignment tool.
      4. go to the schedule tool and try to access the event and see the error.

      I will file another jira for the fact that remove assignment tool doesn't clean out all events from Schedule tool. But even after that, this is still a desired fix since the schedule tool might not refresh before user clicks on the event link.

      I have attached a possible patch here.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bkirschn Beth Kirschner
                Reporter:
                zqian Zhen Qian
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code