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

ClassCastException possible in hasNextTopic

    XMLWordPrintable

Details

    • Bug
    • Status: OPEN
    • Major
    • Resolution: Unresolved
    • 20.3
    • None
    • Forums Tool
    • None
    • 20.x Instance on MySQL
    • Hide

      I don't have reproducible steps yet.  

      Show
      I don't have reproducible steps yet.  

    Description

      Relates to SAK-24996, got the following stack in a 20.x instance on MySQL when attempting to load specific topics in a Forum:

      16-Jun-2021 11:34:17.751 ERROR [http-apr-8366-exec-703] org.sakaiproject.component.app.messageforums.ui.DiscussionForumManagerImpl.hasNextTopic org.sakaiproject.component.app.messageforums.dao.hibernate.TopicImpl_$$_jvstbb9_4a cannot be cast to org.sakaiproject.api.app.messageforums.DiscussionTopic16-Jun-2021 11:34:17.751 ERROR [http-apr-8366-exec-703] org.sakaiproject.component.app.messageforums.ui.DiscussionForumManagerImpl.hasNextTopic org.sakaiproject.component.app.messageforums.dao.hibernate.TopicImpl_$$_jvstbb9_4a cannot be cast to org.sakaiproject.api.app.messageforums.DiscussionTopic16-Jun-2021 11:34:17.758 ERROR [http-apr-8366-exec-703] org.sakaiproject.tool.messageforums.DiscussionForumTool.resetTopicById org.sakaiproject.component.app.messageforums.dao.hibernate.TopicImpl_$$_jvstbb9_4a cannot be cast to org.sakaiproject.api.app.messageforums.DiscussionTopicjava.lang.ClassCastException: org.sakaiproject.component.app.messageforums.dao.hibernate.TopicImpl_$$_jvstbb9_4a cannot be cast to org.sakaiproject.api.app.messageforums.DiscussionTopic at org.sakaiproject.component.app.messageforums.ui.DiscussionForumManagerImpl.hasPreviousTopic(DiscussionForumManagerImpl.java:799) at sun.reflect.GeneratedMethodAccessor2124.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) 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:283) 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:213) at com.sun.proxy.$Proxy221.hasPreviousTopic(Unknown Source) at org.sakaiproject.tool.messageforums.DiscussionForumTool.getDecoratedTopic(DiscussionForumTool.java:3092) at org.sakaiproject.tool.messageforums.DiscussionForumTool.resetTopicById(DiscussionForumTool.java:3385) at org.sakaiproject.tool.messageforums.DiscussionForumTool.displayTopicById(DiscussionForumTool.java:3414) at org.sakaiproject.tool.messageforums.DiscussionForumTool.processActionDisplayTopic(DiscussionForumTool.java:2215) at sun.reflect.GeneratedMethodAccessor2853.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.el.parser.AstValue.invoke(AstValue.java:247) at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267) at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:74) at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87) at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) at javax.faces.component.UICommand.broadcast(UICommand.java:330) at javax.faces.component.UIData.broadcast(UIData.java:1158) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:870) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1418) at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:201) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:670)

      Was able to resolve the issue by removing an attachment in the topic settings.  Before removing the attachment, I downloaded it.  After I verified removing the attachment resolved the issue, I uploaded the downloaded file back to the topic without issue.

      Gliffy Diagrams

        Zeplin

          Attachments

            Issue Links

              Activity

                People

                  Unassigned Unassigned
                  karagon Kenneth Aragon
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                    Created:
                    Updated:

                    Git Integration