[SAK-34019] Viewing announcement stack trace Created: 14-Mar-2018  Updated: 14-Mar-2018  Resolved: 14-Mar-2018

Status: Verified
Project: Sakai
Component/s: Announcements
Affects Version/s: 11.5 [Tentative], 12.0, 19.0
Fix Version/s: 11.5 [Tentative], 12.0, 19.0

Type: Bug Priority: Blocker
Reporter: Matthew Jones Assignee: Matthew Jones
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relate
relates to SAK-34018 Student View of Gradebook throws a St... Verified
12 status: Resolved
11 status: Resolved
Test Plan:

Add announcement
Click on announcement to view

Actual: Stack trace
Expected: You see the announcement


 Description   

Viewing a new announcement results in a stack trace on 12 and 13. See test plan. This is similar to SAK-34018.

org.sakaiproject.portal.api.PortalHandlerException: org.sakaiproject.tool.api.ToolException: java.lang.reflect.InvocationTargetException
    at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:857)
caused by: org.sakaiproject.tool.api.ToolException: java.lang.reflect.InvocationTargetException
    at org.sakaiproject.cheftool.ToolServlet.doGet(ToolServlet.java:234)
caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
caused by: org.sakaiproject.exception.IllegalSecurityAdvisorException: SecurityAdvisor not called in correct order
    at org.sakaiproject.authz.impl.SakaiSecurity.popAdvisor(SakaiSecurity.java:932)
    at org.sakaiproject.announcement.tool.AnnouncementAction.buildShowMetadataContext(AnnouncementAction.java:2471)
    at org.sakaiproject.announcement.tool.AnnouncementAction.getTemplate(AnnouncementAction.java:1321)
    at org.sakaiproject.announcement.tool.AnnouncementAction.buildMainPanelContext(AnnouncementAction.java:1019)
    at sun.reflect.GeneratedMethodAccessor3175.invoke(null:-1)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.sakaiproject.cheftool.VelocityPortletPaneledAction.toolModeDispatch(VelocityPortletPaneledAction.java:399)
    at org.sakaiproject.cheftool.ToolServlet.doGet(ToolServlet.java:234)
    at org.sakaiproject.cheftool.VelocityPortletPaneledAction.doGet(VelocityPortletPaneledAction.java:1152)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
    at org.sakaiproject.vm.ComponentServlet.service(ComponentServlet.java:56)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    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:418)
    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:728)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:470)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:356)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:316)
    at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:513)
    at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1488)
    at org.sakaiproject.portal.charon.handlers.ToolHandler.doTool(ToolHandler.java:200)
    at org.sakaiproject.portal.charon.handlers.ToolHandler.doGet(ToolHandler.java:96)
    at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:857)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    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:467)
    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:52)
    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.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
    at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:677)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    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)


user: 26a71b1a-232c-420a-ae84-bd1e8af9714c

usage-session: 2345a46f-2c10-4576-bf1e-63c52ba97115

time: Mar 14, 2018 11:41:20


 Comments   
Comment by Neal Caidin [ 14-Mar-2018 ]

Tested on nightly mysql master. 

 

Comment by Neal Caidin [ 14-Mar-2018 ]

Are there any edge cases that need testing?

 

Comment by Matthew Jones [ 14-Mar-2018 ]

Nope, I can't think of any, pretty straightforward.

Comment by Shawn Foster [ 14-Mar-2018 ]

What caused this to affect 11?

Comment by Matthew Jones [ 14-Mar-2018 ]

The change on KNL-1587 like the other related ticket. Basically the this code was implemented to be a stack however it was incorrect and working like a queue (FIFO) instead of a stack (LIFO).

So any code that pushed 2 advisers would break after this fix. It was probably working incorrectly as FIFO too, but nobody really noticed until there was a problem with Lessons.

Comment by Shawn Foster [ 14-Mar-2018 ]

Thanks for the explanation, Matthew Jones!

Comment by Matthew Jones [ 14-Mar-2018 ]

So in the code these had to be switched as they needed to be pushed off in the correct order. I grepped the code and only saw this as the other case (would have been found quick in testing but noticed the code wrong first)

Generated at Tue Sep 17 02:55:46 CDT 2019 using Jira 8.0.3#800011-sha1:073e8b433c2c0e389c609c14a045ffa7abaca10d.