[ 
https://issues.apache.org/jira/browse/JSPWIKI-1059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Harry Metske updated JSPWIKI-1059:
----------------------------------
    Attachment: JSPWIKI-1059.patch

Make iterating the sessions synchronized.

> ConcurrentModificationException in SessionMonitor
> -------------------------------------------------
>
>                 Key: JSPWIKI-1059
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-1059
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Authentication & Authorization
>    Affects Versions: 2.10.2
>         Environment: Ubuntu 16.04
> Java 8
> JSPWiki v2.10.3-git-38
>            Reporter: Harry Metske
>            Assignee: Harry Metske
>            Priority: Minor
>             Fix For: 2.10.3
>
>         Attachments: JSPWIKI-1059.patch
>
>
> jspwiki.log shows regularly:
> 2017-05-10 12:35:55,838 INFO plugin.DefaultPluginManager - Plugin failed 
> while executing:
> java.util.ConcurrentModificationException
>         at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:806)
>         at java.util.WeakHashMap$ValueIterator.next(WeakHashMap.java:833)
>         at 
> org.apache.wiki.auth.SessionMonitor.userPrincipals(SessionMonitor.java:204)
>         at 
> org.apache.wiki.auth.SessionMonitor.sessions(SessionMonitor.java:185)
>         at org.apache.wiki.WikiSession.sessions(WikiSession.java:808)
>         at 
> org.apache.wiki.plugin.SessionsPlugin.execute(SessionsPlugin.java:115)
>         at 
> org.apache.wiki.plugin.DefaultPluginManager.execute(DefaultPluginManager.java:339)
>         at 
> org.apache.wiki.parser.PluginContent.getText(PluginContent.java:194)
>         at 
> org.jdom2.output.support.AbstractXMLOutputProcessor.printText(AbstractXMLOutputProcessor.java:771)
>         at 
> org.jdom2.output.support.AbstractXMLOutputProcessor.printContent(AbstractXMLOutputProcessor.java:956)
>         at 
> org.jdom2.output.support.AbstractXMLOutputProcessor.printElement(AbstractXMLOutputProcessor.java:868)
>         at 
> org.jdom2.output.support.AbstractXMLOutputProcessor.printContent(AbstractXMLOutputProcessor.java:946)
>         at 
> org.jdom2.output.support.AbstractXMLOutputProcessor.printElement(AbstractXMLOutputProcessor.java:868)
>         at 
> org.jdom2.output.support.AbstractXMLOutputProcessor.printContent(AbstractXMLOutputProcessor.java:946)
>         at 
> org.jdom2.output.support.AbstractXMLOutputProcessor.printElement(AbstractXMLOutputProcessor.java:868)
>         at 
> org.jdom2.output.support.AbstractXMLOutputProcessor.printContent(AbstractXMLOutputProcessor.java:946)
>         at 
> org.jdom2.output.support.AbstractXMLOutputProcessor.process(AbstractXMLOutputProcessor.java:236)
>         at 
> org.jdom2.output.XMLOutputter.outputElementContent(XMLOutputter.java:881)
>         at 
> org.apache.wiki.render.XHTMLRenderer.getString(XHTMLRenderer.java:71)
>         at 
> org.apache.wiki.render.RenderingManager.getHTML(RenderingManager.java:241)
>         at 
> org.apache.wiki.render.RenderingManager.getHTML(RenderingManager.java:286)
>         at org.apache.wiki.WikiEngine.textToHTML(WikiEngine.java:1515)
>         at org.apache.wiki.WikiEngine.getHTML(WikiEngine.java:1457)
>         at 
> org.apache.wiki.tags.InsertPageTag.doWikiStartTag(InsertPageTag.java:128)
>         at org.apache.wiki.tags.WikiTagBase.doStartTag(WikiTagBase.java:89)
>         at 
> org.apache.jsp.templates.haddock.Header_jsp._jspx_meth_wiki_005fInsertPage_005f1(Header_jsp.java:644)
>         at 
> org.apache.jsp.templates.haddock.Header_jsp._jspx_meth_wiki_005fPageExists_005f0(Header_jsp.java:602)
>         at 
> org.apache.jsp.templates.haddock.Header_jsp._jspService(Header_jsp.java:251)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
>         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.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:710)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:580)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:516)
>         at 
> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:895)
>         at 
> org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:490)
>         at org.apache.wiki.tags.IncludeTag.doEndTag(IncludeTag.java:84)
>         at 
> org.apache.jsp.templates.haddock.ViewTemplate_jsp._jspx_meth_wiki_005fInclude_005f1(ViewTemplate_jsp.java:691)
>         at 
> org.apache.jsp.templates.haddock.ViewTemplate_jsp._jspService(ViewTemplate_jsp.java:211)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
>         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.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:710)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:580)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:516)
>         at 
> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:895)
>         at 
> org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:490)
>         at org.apache.wiki.tags.IncludeTag.doEndTag(IncludeTag.java:84)
>         at org.apache.jsp.Wiki_jsp._jspService(Wiki_jsp.java:182)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
>         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.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>         at 
> org.apache.wiki.ui.WikiServletFilter.doFilter(WikiServletFilter.java:160)
> I will attach a proposed patch



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to