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

GBNG > stack trace when entering grades in table

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 20.0 [Tentative]
    • Fix Version/s: 19.0, 20.0 [Tentative]
    • Component/s: Gradebook
    • Labels:
      None
    • 19 status:
      Resolved
    • Test Plan:
      Hide
      1. enter grades in the table; verify it works and saves as expected
      2. enter comments using the drop down
      3. use inspect element to inspect the comment text box, and remove the maxlength attribute
      4. enter a comment larger than the value of the maxlength attribute removed in the previous step
      5. save; verify error message is displayed in the dialog indicating why the comment was not saved
      6. reduce the comment to a sane length less than the max and verify the comment is saved properly
      Show
      enter grades in the table; verify it works and saves as expected enter comments using the drop down use inspect element to inspect the comment text box, and remove the maxlength attribute enter a comment larger than the value of the maxlength attribute removed in the previous step save; verify error message is displayed in the dialog indicating why the comment was not saved reduce the comment to a sane length less than the max and verify the comment is saved properly

      Description

      You'll get the following stack trace when entering grades in the table:

      org.apache.wicket.WicketRuntimeException: Method onRequest of interface org.apache.wicket.behavior.IBehaviorListener targeted at org.sakaiproject.gradebookng.tool.component.GbGradeTable$1@6f9f7fb on component [WebMarkupContainer [Component id = gradeTable]] threw an exception
      	at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:268)
      	at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241)
      	at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:250)
      	at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:236)
      	at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:890)
      	at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
      	at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
      	at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
      	at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
      	at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
      	at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
      	at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      	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:426)
      	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:712)
      	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459)
      	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:352)
      	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
      	at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:513)
      	at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1490)
      	at org.sakaiproject.portal.charon.handlers.SiteHandler.doSite(SiteHandler.java:470)
      	at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:267)
      	at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:155)
      	at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:856)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      	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:475)
      	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:53)
      	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:199)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      	at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:685)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388)
      	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.GeneratedMethodAccessor2697.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
      	... 55 more
      Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.sakaiproject.gradebookng.business.importExport.CommentValidator
      	at org.sakaiproject.gradebookng.business.GradebookNgBusinessService.saveGrade(GradebookNgBusinessService.java:752)
      	at WICKET_org.sakaiproject.gradebookng.business.GradebookNgBusinessService$$FastClassByCGLIB$$86be4ca5.invoke(<generated>)
      	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
      	at org.apache.wicket.proxy.LazyInitProxyFactory$CGLibInterceptor.intercept(LazyInitProxyFactory.java:341)
      	at WICKET_org.sakaiproject.gradebookng.business.GradebookNgBusinessService$$EnhancerByCGLIB$$6d4aed46.saveGrade(<generated>)
      	at org.sakaiproject.gradebookng.tool.actions.GradeUpdateAction.handleEvent(GradeUpdateAction.java:157)
      	at org.sakaiproject.gradebookng.tool.component.GbGradeTable.handleEvent(GbGradeTable.java:70)
      	at org.sakaiproject.gradebookng.tool.component.GbGradeTable$1.onEvent(GbGradeTable.java:94)
      	at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:145)
      	at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:654)
      	... 59 more
      

      This is a regression caused by SAK-41222, where it was requested that all ServerConfigurationService calls be refactored to use the API rather than the Cover. This is apparently an area I neglected to test.

      I also noticed that comment length validation is not properly implemented when adding/editing comments through the grades table. If the comment is too long, clicking the save button does nothing and the logs spit out warnings about message bundle keys not being found. The linked PR refactors this area to provide a proper feedback message to the user indicating why the comment was not saved.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  bjones86 Brian Jones
                  Reporter:
                  bjones86 Brian Jones
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code