You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Hervé Boutemy (JIRA)" <ji...@apache.org> on 2015/12/20 01:37:46 UTC

[jira] [Moved] (MSITE-754) ConcurrentModificationException when using site:run

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

Hervé Boutemy moved DOXIASITETOOLS-69 to MSITE-754:
---------------------------------------------------

        Fix Version/s:     (was: 1.7)
                       3.5
    Affects Version/s:     (was: 1.2)
                       3.4
          Component/s:     (was: Site renderer)
                       site:run
                  Key: MSITE-754  (was: DOXIASITETOOLS-69)
              Project: Maven Site Plugin  (was: Maven Doxia Sitetools)

> ConcurrentModificationException when using site:run
> ---------------------------------------------------
>
>                 Key: MSITE-754
>                 URL: https://issues.apache.org/jira/browse/MSITE-754
>             Project: Maven Site Plugin
>          Issue Type: Bug
>          Components: site:run
>    Affects Versions: 3.4
>         Environment: Maven 2.2.1 with maven-site-plugin 3.0
>            Reporter: Christof Schöll
>             Fix For: 3.5
>
>         Attachments: testmvnsite.zip
>
>
> When using maven with site:run I get the following exception, which seem to originate from the Doxia Site Renderer
> {noformat}2012-04-04 12:27:07.653:WARN::/css/maven-theme.css
> java.util.ConcurrentModificationException
>         at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
>         at java.util.AbstractList$Itr.next(AbstractList.java:343)
>         at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.locateDocumentFiles(DefaultSiteRenderer.java:149)
>         at org.apache.maven.plugins.site.webapp.DoxiaFilter.doFilter(DoxiaFilter.java:174)
>         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
>         at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
>         at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>         at org.mortbay.jetty.Server.handle(Server.java:326)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
>         at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> 2012-04-04 12:27:07.656:WARN::/images/logos/maven-feather.png
> java.util.ConcurrentModificationException
>         at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
>         at java.util.AbstractList$Itr.next(AbstractList.java:343)
>         at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.locateDocumentFiles(DefaultSiteRenderer.java:149)
>         at org.apache.maven.plugins.site.webapp.DoxiaFilter.doFilter(DoxiaFilter.java:174)
>         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
>         at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
>         at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>         at org.mortbay.jetty.Server.handle(Server.java:326)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
>         at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582){noformat}
> The following source code in org.apache.maven.doxia.siterenderer.DefaultSiteRenderer (line 149) seems to contain the problem:
> {code:java}149  for ( File siteDirectory : siteRenderingContext.getSiteDirectories() )
> 150         {
> 151             if ( siteDirectory.exists() )
> 152             {
> 153                 Collection<SiteModule> modules = siteModuleManager.getSiteModules();
> 154                 for ( SiteModule module : modules )
> 155                 {
> 156                     File moduleBasedir = new File( siteDirectory, module.getSourceDirectory() );
> 157 
> 158                     if ( moduleExcludes != null && moduleExcludes.containsKey( module.getParserId() ) )
> 159                     {
> 160                         addModuleFiles( moduleBasedir, module, moduleExcludes.get( module.getParserId() ),
> 161                                 files );
> 162                     }
> 163                     else
> 164                     {
> 165                         addModuleFiles( moduleBasedir, module, null, files );
> 166                     }
> 167                 }
> 168             }
> 169         }{code}
> Iterating over a clone of the siteDirectories should make this code much more robust and should generally fix this problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)