maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Lundberg (JIRA)" <j...@codehaus.org>
Subject [jira] (DOXIASITETOOLS-69) ConcurrentModificationException when using site:run
Date Thu, 05 Apr 2012 21:29:02 GMT

    [ https://jira.codehaus.org/browse/DOXIASITETOOLS-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=295969#comment-295969
] 

Dennis Lundberg commented on DOXIASITETOOLS-69:
-----------------------------------------------

Can you please put together a sample project that shows this problem.
                
> ConcurrentModificationException when using site:run
> ---------------------------------------------------
>
>                 Key: DOXIASITETOOLS-69
>                 URL: https://jira.codehaus.org/browse/DOXIASITETOOLS-69
>             Project: Maven Doxia Sitetools
>          Issue Type: Bug
>          Components: Site renderer
>    Affects Versions: 1.2
>         Environment: Maven 2.2.1 with maven-site-plugin 3.0
>            Reporter: Christof Schöll
>
> When using maven with site:run I get the following exception, which seem to originate
from the Doxia Site Renderer
> 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)
> The following source code in org.apache.maven.doxia.siterenderer.DefaultSiteRenderer
(line 149) seems to contain the problem:
> 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         }
> Iterating over a clone of the siteDirectories should make this code much more robust
and should generally fix this problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message