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

Forums throws stack trace for .anon users

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.4.0, 2.4.1, 2.5.0, 2.5.2, 2.5.3
    • Fix Version/s: 2.6.3, 2.7.0
    • Component/s: Messages Tool
    • Labels:
      None
    • Previous Issue Keys:
      SAK-13063, MSGCNTR-185

      Description

      We're attempting to support "public" sites, by the simple mechanism of adding the.anon role to the site. Most tools can handle this, but Forums throws a stack trace with any attempt to view it, presumably because it assumes that the userID will not be null:

      org.sakaiproject.portal.api.PortalHandlerException: org.sakaiproject.tool.api.ToolException: javax.servlet.jsp.JspException: javax.faces.el.EvaluationException: Error getting property 'forums' from bean of type org.sakaiproject.tool.messageforums.DiscussionForumTool: java.lang.IllegalArgumentException: Null Argument for userId in getReadStatusForMessagesWithId
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:718)
      caused by: org.sakaiproject.tool.api.ToolException: javax.servlet.jsp.JspException: javax.faces.el.EvaluationException: Error getting property 'forums' from bean of type org.sakaiproject.tool.messageforums.DiscussionForumTool: java.lang.IllegalArgumentException: Null Argument for userId in getReadStatusForMessagesWithId
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1099)
      caused by: org.apache.jasper.JasperException: javax.servlet.jsp.JspException: javax.faces.el.EvaluationException: Error getting property 'forums' from bean of type org.sakaiproject.tool.messageforums.DiscussionForumTool: java.lang.IllegalArgumentException: Null Argument for userId in getReadStatusForMessagesWithId
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:371)
      caused by: javax.servlet.ServletException: javax.servlet.jsp.JspException: javax.faces.el.EvaluationException: Error getting property 'forums' from bean of type org.sakaiproject.tool.messageforums.DiscussionForumTool: java.lang.IllegalArgumentException: Null Argument for userId in getReadStatusForMessagesWithId
      at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
      caused by: javax.faces.el.EvaluationException: javax.faces.el.EvaluationException: Error getting property 'forums' from bean of type org.sakaiproject.tool.messageforums.DiscussionForumTool: java.lang.IllegalArgumentException: Null Argument for userId in getReadStatusForMessagesWithId
      at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
      caused by: javax.faces.el.EvaluationException: Error getting property 'forums' from bean of type org.sakaiproject.tool.messageforums.DiscussionForumTool: java.lang.IllegalArgumentException: Null Argument for userId in getReadStatusForMessagesWithId
      at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
      caused by: java.lang.IllegalArgumentException: Null Argument for userId in getReadStatusForMessagesWithId
      at org.sakaiproject.component.app.messageforums.ui.DiscussionForumManagerImpl.getReadStatusForMessagesWithId(DiscussionForumManagerImpl.java:2022)
      at sun.reflect.GeneratedMethodAccessor2551.invoke(null:-1)
      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:287)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
      at $Proxy26.getReadStatusForMessagesWithId(null:-1)
      at org.sakaiproject.tool.messageforums.DiscussionForumTool.getForums(DiscussionForumTool.java:481)
      at sun.reflect.GeneratedMethodAccessor2553.invoke(null:-1)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:79)
      at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
      at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
      at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
      at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
      at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
      at javax.faces.component.UIData.getValue(UIData.java:527)
      at javax.faces.component.UIData.getDataModel(UIData.java:856)
      at javax.faces.component.UIData.setRowIndex(UIData.java:379)
      at com.sun.faces.renderkit.html_basic.TableRenderer.encodeBegin(TableRenderer.java:65)
      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
      at javax.faces.component.UIData.encodeBegin(UIData.java:681)
      at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:591)
      at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:543)
      at com.sun.faces.taglib.html_basic.DataTableTag.doEndTag(DataTableTag.java:491)
      at org.apache.jsp.jsp.discussionForum.forumsOnly.dfForums_jsp._jspx_meth_h_005fdataTable_005f0(dfForums_jsp.java:532)
      at org.apache.jsp.jsp.discussionForum.forumsOnly.dfForums_jsp._jspService(dfForums_jsp.java:243)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
      at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
      at org.sakaiproject.jsf.app.SakaiViewHandler.renderView(SakaiViewHandler.java:137)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:555)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at org.sakaiproject.tool.messageforums.MessageForumsFilePickerServlet.dispatch(MessageForumsFilePickerServlet.java:151)
      at org.sakaiproject.jsf.util.JsfTool.doGet(JsfTool.java:241)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:555)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:364)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:441)
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1099)
      at org.sakaiproject.portal.charon.handlers.ToolHandler.doTool(ToolHandler.java:163)
      at org.sakaiproject.portal.charon.handlers.ToolHandler.doGet(ToolHandler.java:86)
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:718)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:592)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
      at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
      at java.lang.Thread.run(Thread.java:595)

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

              There are no Sub-Tasks for this issue.

                Activity

                  People

                  Assignee:
                  maintenanceteam Core Team
                  Reporter:
                  clayf Clay Fenlason (Inactive)
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration