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

Fail adding or reviewing assignments

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 12.0
    • Fix Version/s: 12.0, 19.0
    • Component/s: None
    • Labels:
    • 12 status:
      Resolved
    • Test Plan:
      Hide

      Please add a Test Plan here.

      Show
      Please add a Test Plan here.

      Description

      Testing in our migrated database we experienced this error adding new assignments or reviewing assignments migrated from the database.

      14-feb-2018 10:34:27.914 WARN [ajp-nio-8016-exec-4] org.sakaiproject.portal.charon.handlers.SiteHandler.bufferContent Failed to buffer content.
      org.sakaiproject.tool.api.ToolException: java.lang.reflect.InvocationTargetException
      	at org.sakaiproject.cheftool.VelocityPortletPaneledAction.toolModeDispatch(VelocityPortletPaneledAction.java:474)
      	at org.sakaiproject.cheftool.ToolServlet.doGet(ToolServlet.java:234)
      	at org.sakaiproject.cheftool.VelocityPortletPaneledAction.doGet(VelocityPortletPaneledAction.java:1152)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
      	at org.sakaiproject.vm.ComponentServlet.service(ComponentServlet.java:56)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:413)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728)
      	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:470)
      	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:356)
      	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:316)
      	at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:513)
      	at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1488)
      	at org.sakaiproject.portal.charon.handlers.SiteHandler.doToolBuffer(SiteHandler.java:1227)
      	at org.sakaiproject.portal.charon.handlers.SiteHandler.bufferContent(SiteHandler.java:1061)
      	at org.sakaiproject.portal.charon.handlers.SiteHandler.doSite(SiteHandler.java:490)
      	at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:266)
      	at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:154)
      	at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:857)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:462)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
      	at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:677)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
      	at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:486)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.sakaiproject.cheftool.VelocityPortletPaneledAction.toolModeDispatch(VelocityPortletPaneledAction.java:399)
      	... 50 more
      Caused by: java.lang.ClassCastException: java.util.HashSet cannot be cast to java.util.List
      	at org.sakaiproject.assignment.tool.AssignmentAction.setAssignmentFormContext(AssignmentAction.java:2652)
      	at org.sakaiproject.assignment.tool.AssignmentAction.build_instructor_new_edit_assignment_context(AssignmentAction.java:2315)
      	at org.sakaiproject.assignment.tool.AssignmentAction.buildMainPanelContext(AssignmentAction.java:1188)
      	... 55 more
      

      Looking at the code this is failing at:
      https://github.com/sakaiproject/sakai/blob/12.x/assignment/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java#L2652

      Collections.sort((List<Group>) groupsAllowAddAssignment, comp);
      

      The groupsAllowAddAssignment is populated in lines:
      https://github.com/sakaiproject/sakai/blob/12.x/assignment/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java#L2615-L2626

      But looking at the method getGroupsAllowAddAssignment (that calls getGroupsAllowFunction) in some cases you could get a HashSet instead of a List.

      https://github.com/sakaiproject/sakai/blob/12.x/assignment/impl/src/java/org/sakaiproject/assignment/impl/AssignmentServiceImpl.java#L2447-L2477

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ern Earle R Nietzel
                Reporter:
                jjmerono@um.es Juan José Meroño Sánchez
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code