Uploaded image for project: 'LAMS Development'
  1. LAMS Development
  2. LDEV-2477

Learner gets a ClassCastException after answer MCQ

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Tool Multiple Choice
    • Labels:
      None

      Description

      In LAMS 2.4, import this sequence: http://lamscommunity.org/lamscentral/sequence?seq%5fid=687843. Run preview and go to the Optional Sequences, choose the first option "Assessment" and then do the MCQ (see Pict2). As soon as you enter the answers, then you get the error message show in Pict1.

      Does this have to do with Gradebook?



      Exception:

      2009-12-12 04:57:20,906 FATAL [CustomStrutsExceptionHandler] fatal System exception: [java.lang.ClassCastException: java.lang.Double] :java.lang.Double
      java.lang.ClassCastException: java.lang.Double
              at org.lamsfoundation.lams.tool.mc.dao.hibernate.McUserDAO.getMarkStatisticsForSession(McUserDAO.java:110)
              at org.lamsfoundation.lams.tool.mc.service.McServicePOJO.getMarkStatistics(McServicePOJO.java:583)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at $Proxy166.getMarkStatistics(Unknown Source)
              at org.lamsfoundation.lams.tool.mc.web.McLearningAction.continueOptionsCombined(McLearningAction.java:800)
              at org.lamsfoundation.lams.tool.mc.web.McLearningAction.displayMc(McLearningAction.java:248)
              at sun.reflect.GeneratedMethodAccessor1480.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)
              at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
              at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
              at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
              at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
              at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.lamsfoundation.lams.web.filter.LocaleFilter.doFilterInternal(LocaleFilter.java:142)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.lamsfoundation.lams.web.session.SystemSessionFilter.doFilter(SystemSessionFilter.java:69)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.lamsfoundation.lams.integration.security.SingleSignOn.invoke(SingleSignOn.java:121)
              at org.lamsfoundation.lams.integration.security.LoginRequestValve.invoke(LoginRequestValve.java:67)
              at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              at java.lang.Thread.run(Thread.java:613)
      2009-12-12 04:57:20,910 FATAL [CustomStrutsExceptionHandler] java.lang.ClassCastException: java.lang.Double
              at org.lamsfoundation.lams.tool.mc.dao.hibernate.McUserDAO.getMarkStatisticsForSession(McUserDAO.java:110)
              at org.lamsfoundation.lams.tool.mc.service.McServicePOJO.getMarkStatistics(McServicePOJO.java:583)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at $Proxy166.getMarkStatistics(Unknown Source)
              at org.lamsfoundation.lams.tool.mc.web.McLearningAction.continueOptionsCombined(McLearningAction.java:800)
              at org.lamsfoundation.lams.tool.mc.web.McLearningAction.displayMc(McLearningAction.java:248)
              at sun.reflect.GeneratedMethodAccessor1480.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)
              at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
              at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
              at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
              at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
              at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.lamsfoundation.lams.web.filter.LocaleFilter.doFilterInternal(LocaleFilter.java:142)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.lamsfoundation.lams.web.session.SystemSessionFilter.doFilter(SystemSessionFilter.java:69)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.lamsfoundation.lams.integration.security.SingleSignOn.invoke(SingleSignOn.java:121)
              at org.lamsfoundation.lams.integration.security.LoginRequestValve.invoke(LoginRequestValve.java:67)
              at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              at java.lang.Thread.run(Thread.java:613)

      05:07:53,648 WARN [ContainerBase] Exception processing manager org.apache.catalina.session.StandardManager@31e282 background process
      java.lang.NegativeArraySizeException
              at org.apache.catalina.authenticator.SingleSignOnEntry.removeSession(SingleSignOnEntry.java:102)
              at org.apache.catalina.authenticator.SingleSignOn.removeSession(SingleSignOn.java:651)
              at org.apache.catalina.authenticator.SingleSignOn.sessionEvent(SingleSignOn.java:327)
              at org.apache.catalina.session.StandardSession.fireSessionEvent(StandardSession.java:1601)
              at org.apache.catalina.session.StandardSession.expire(StandardSession.java:747)
              at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:592)
              at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:682)
              at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:667)
              at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1327)
              at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1612)
              at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1621)
              at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1621)
              at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1601)
              at java.lang.Thread.run(Thread.java:613)
      1. Picture 1.jpg
        178 kB
      2. Picture 2.jpg
        231 kB

        Activity

        Hide
        ernieg Ernie Ghiglione added a comment -
        BTW, this does now seem to happen in 2.3.x.

        Show
        ernieg Ernie Ghiglione added a comment - BTW, this does now seem to happen in 2.3.x.
        Hide
        lfoxton Luke Foxton added a comment -
        This isnt related to gradebook, but for some reason in 2.4 the query to the db is returning a Double instead of a float.

        Easily fixed, just added an extra "instanceof" test to cast it properly and the problem goes away
        Show
        lfoxton Luke Foxton added a comment - This isnt related to gradebook, but for some reason in 2.4 the query to the db is returning a Double instead of a float. Easily fixed, just added an extra "instanceof" test to cast it properly and the problem goes away
        Hide
        ernieg Ernie Ghiglione added a comment -
        Tested and closed
        Show
        ernieg Ernie Ghiglione added a comment - Tested and closed

          People

          • Assignee:
            lfoxton Luke Foxton
            Reporter:
            ernieg Ernie Ghiglione
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development