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

Broken Equality Comparators in Gradebook

    Details

      Description

      Under certain instances the following exception occurs:

      Within edu-services/gradebook:

      org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'public org.sakaiproject.gradebookng.tool.pages.GradebookPage()'. An exception has been thrown during construction!
          at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:194)
          at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:67)
          at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:133)
          at org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:268)
          at org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:166)
          at org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
          at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:279)
          at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
          at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
          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:622)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:399)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:719)
          at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:465)
          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:357)
          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:317)
          at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:513)
          at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1459)
          at org.sakaiproject.portal.charon.handlers.SiteHandler.doToolBuffer(SiteHandler.java:1164)
          at org.sakaiproject.portal.charon.handlers.SiteHandler.bufferContent(SiteHandler.java:1020)
          at org.sakaiproject.portal.charon.handlers.SiteHandler.doSite(SiteHandler.java:485)
          at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:264)
          at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:152)
          at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:835)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:460)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
          at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
          at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:676)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
          at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:676)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
          at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.reflect.InvocationTargetException
          at sun.reflect.GeneratedConstructorAccessor505.newInstance(Unknown Source)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
          at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:175)
          ... 62 more
      Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract!
          at java.util.TimSort.mergeLo(TimSort.java:777)
          at java.util.TimSort.mergeAt(TimSort.java:514)
          at java.util.TimSort.mergeForceCollapse(TimSort.java:457)
          at java.util.TimSort.sort(TimSort.java:254)
          at java.util.Arrays.sort(Arrays.java:1512)
          at java.util.ArrayList.sort(ArrayList.java:1454)
          at java.util.Collections.sort(Collections.java:175)
          at org.sakaiproject.component.gradebook.GradebookServiceHibernateImpl.sortAssignments(GradebookServiceHibernateImpl.java:1518)
          at org.sakaiproject.component.gradebook.GradebookServiceHibernateImpl.access$500(GradebookServiceHibernateImpl.java:98)
          at org.sakaiproject.component.gradebook.GradebookServiceHibernateImpl$14.doInHibernate(GradebookServiceHibernateImpl.java:1461)
          at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
          at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:341)
          at org.sakaiproject.component.gradebook.GradebookServiceHibernateImpl.getAssignments(GradebookServiceHibernateImpl.java:1457)
          at org.sakaiproject.component.gradebook.GradebookServiceHibernateImpl.getViewableAssignmentsForCurrentUser(GradebookServiceHibernateImpl.java:1554)
          at sun.reflect.GeneratedMethodAccessor1290.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:497)
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
          at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
          at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
          at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
          at com.sun.proxy.$Proxy22.getViewableAssignmentsForCurrentUser(Unknown Source)
          at org.sakaiproject.gradebookng.business.GradebookNgBusinessService.getGradebookAssignments(GradebookNgBusinessService.java:324)
          at org.sakaiproject.gradebookng.business.GradebookNgBusinessService.getGradebookAssignments(GradebookNgBusinessService.java:275)
          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:333)
          at WICKET_org.sakaiproject.gradebookng.business.GradebookNgBusinessService$$EnhancerByCGLIB$$67de344f.getGradebookAssignments(<generated>)
          at org.sakaiproject.gradebookng.tool.pages.GradebookPage.<init>(GradebookPage.java:208)
          ... 66 more
      

      I believe this exception is caused as the equality comparators are broken.

      This should be resolved.

      A possible workaround is to use the legacy mergesort in JavaOpts -Djava.util.Arrays.useLegacyMergeSort=true.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  farreri Miguel Pellicer
                  Reporter:
                  lcanessa Leonardo Canessa
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  9 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code