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

ArrayIndexOutOfBoundsException setScoringAgentProperties

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.3
    • Fix Version/s: 12.4, 19.0 [Tentative]
    • Component/s: Assignments
    • Labels:
      None
    • 12 status:
      Resolved
    • Test Plan:
      Hide

      Please add a Test Plan here.

      Show
      Please add a Test Plan here.

      Description

      This is clearly pretty dangerous code:

      14408 String gradebookUid = toolManager.getCurrentPlacement().getContext();
      14409 boolean scoringAgentEnabled = scoringAgent != null && scoringAgent.isEnabled(gradebookUid, null);
      14410 String studentId = submission.getSubmitters().toArray(new AssignmentSubmissionSubmitter[0])[0].getSubmitter();
      14411

      caused by: java.lang.ArrayIndexOutOfBoundsException: 0
          at org.sakaiproject.assignment.tool.AssignmentAction.setScoringAgentProperties(AssignmentAction.java:14410)
          at org.sakaiproject.assignment.tool.AssignmentAction.build_instructor_grade_submission_context(AssignmentAction.java:3219)
          at org.sakaiproject.assignment.tool.AssignmentAction.buildMainPanelContext(AssignmentAction.java:1230)
          at sun.reflect.GeneratedMethodAccessor1637.invoke(null:-1)
          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)
          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:418)
          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.ToolHandler.doTool(ToolHandler.java:200)
          at org.sakaiproject.portal.charon.handlers.ToolHandler.doGet(ToolHandler.java:96)
          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:467)
          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:496)
          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.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
          at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
          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.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2380)
          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)
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ern Earle R Nietzel
                Reporter:
                ottenhoff Sam Ottenhoff
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code