#1183 ✓resolved
manuel

ConcurrentModificationException in DEV mode

Reported by manuel | October 24th, 2011 @ 01:04 PM | in 1.2.4 (closed)

Framework version: 1.2.3
Platform you're using: Mac OS X / Debian

Reproduction steps:

In DEV / test mode on our CI server, we often get failed builds. The underlying cause looks like this:

Caused by: java.util.ConcurrentModificationException
    at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
    at java.util.AbstractList$Itr.next(AbstractList.java:343)
    at play.classloading.ApplicationClasses.getJava(ApplicationClasses.java:295)
    at play.classloading.ApplicationClasses.getApplicationClass(ApplicationClasses.java:42)
    at play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:134)
    at play.classloading.ApplicationClassloader.loadClass(ApplicationClassloader.java:84)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
    at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:696)
    at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:564)
    at org.codehaus.groovy.control.ResolveVisitor.resolveToClass(ResolveVisitor.java:706)

I also sometimes get this during development locally. It looks like play.classloading.ApplicationClasses.getJava is the culprit - it looks to me as though the map holding the application classes was modified while being read.

Comments and changes to this ticket

  • manuel

    manuel November 10th, 2011 @ 08:24 PM

    • Tag changed from classloader to groovy template, classloader, scala

    More detail:

    
    play.exceptions.UnexpectedException: Unexpected Error
        at play.mvc.ControllerDelegate.renderTemplateForScala(ControllerDelegate.java:48)
        at play.mvc.results.Template.<init>(Template.scala:10)
        at play.mvc.ScalaController.Template(ScalaController.scala:82)
        at controllers.DObjects$.list(Dobjects.scala:23)
        at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:548)
        at play.mvc.ActionInvoker.invoke(ActionInvoker.java:502)
        at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:496)
        at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:473)
        at play.mvc.ActionInvoker.invoke(ActionInvoker.java:161)
        at Invocation.HTTP Request(Play!)
    Caused by: BUG! exception in phase 'semantic analysis' in source unit '/app/views/list.html' null
        at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:828)
        at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:521)
        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:470)
        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:453)
        at play.templates.GroovyTemplate.compile(GroovyTemplate.java:124)
        at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:195)
        at play.templates.Template.render(Template.java:26)
        at play.templates.GroovyTemplate.render(GroovyTemplate.java:187)
        at play.mvc.results.RenderTemplate.<init>(RenderTemplate.java:24)
        at play.mvc.Controller.renderTemplate(Controller.java:660)
        at play.mvc.ControllerDelegate.renderTemplateForScala(ControllerDelegate.java:40)
        ... 9 more
    Caused by: java.util.ConcurrentModificationException
        at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
        at java.util.AbstractList$Itr.next(AbstractList.java:343)
        at play.classloading.ApplicationClasses.getJava(ApplicationClasses.java:323)
        at play.classloading.ApplicationClasses.getApplicationClass(ApplicationClasses.java:48)
        at play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:134)
        at play.classloading.ApplicationClassloader.loadClass(ApplicationClassloader.java:84)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
        at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:696)
        at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:564)
        at org.codehaus.groovy.control.ResolveVisitor.resolveToClass(ResolveVisitor.java:706)
        at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:272)
        at org.codehaus.groovy.control.ResolveVisitor.resolveFromStaticInnerClasses(ResolveVisitor.java:438)
        at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:272)
        at org.codehaus.groovy.control.ResolveVisitor.resolveFromStaticInnerClasses(ResolveVisitor.java:438)
        at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:272)
        at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:240)
        at org.codehaus.groovy.control.ResolveVisitor.transformPropertyExpression(ResolveVisitor.java:878)
        at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:741)
        at org.codehaus.groovy.ast.expr.Expression.transformExpressions(Expression.java:49)
        at org.codehaus.groovy.ast.expr.ArgumentListExpression.transformExpression(ArgumentListExpression.java:67)
        at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:756)
        at org.codehaus.groovy.control.ResolveVisitor.transformMethodCallExpression(ResolveVisitor.java:1092)
        at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:747)
        at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitExpressionStatement(ClassCodeExpressionTransformer.java:139)
        at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
        at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:165)
        at org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1332)
        at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:101)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:112)
        at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitConstructorOrMethod(ClassCodeExpressionTransformer.java:50)
        at org.codehaus.groovy.control.ResolveVisitor.visitConstructorOrMethod(ResolveVisitor.java:171)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:123)
        at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1039)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:50)
        at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1273)
        at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:148)
        at org.codehaus.groovy.control.CompilationUnit$7.call(CompilationUnit.java:584)
        at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:824)
    
  • Nicolas Leroux

    Nicolas Leroux November 13th, 2011 @ 12:41 PM

    • Assigned user set to “Nicolas Leroux”
    • State changed from “new” to “confirmed”
    • Milestone set to 1.2.4
    • Milestone order changed from “838” to “0”
  • Nicolas Leroux

    Nicolas Leroux November 14th, 2011 @ 08:55 PM

    • State changed from “confirmed” to “inprogress”
    • Milestone order changed from “47” to “0”
  • Nicolas Leroux

    Nicolas Leroux November 14th, 2011 @ 09:22 PM

    • Milestone changed from 1.2.4 to 1.3
    • Milestone order changed from “48” to “0”
  • manuel

    manuel November 15th, 2011 @ 10:32 AM

    Thanks for taking this one up Nicolas. It basically renders our test suite useless - every single run on the CI server fails because of that stupid bug.

  • Nicolas Leroux

    Nicolas Leroux November 16th, 2011 @ 04:24 PM

    • Milestone changed from 1.3 to 1.2.4
    • Milestone order changed from “60” to “0”
  • Play Duck
  • Nicolas Leroux

    Nicolas Leroux November 19th, 2011 @ 07:36 PM

    • State changed from “inprogress” to “resolved”
  • Play Duck
  • Play Duck
  • emajames9180
  • emajames9180

    emajames9180 June 5th, 2019 @ 09:59 AM

    Greetings! Very helpful advice within this post! It is the little changes that will make the most important changes. Thanks a lot for sharing!4
    https://thailotterywinningtips.info/

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2>Play framework</h2>

Play makes it easier to build Web applications with Java. It is a clean alternative to bloated Enterprise Java stacks. It focuses on developer productivity and targets RESTful architectures. Learn more on the <a href="http://www.playframework.org">http://www.playframework.org</a> website.<br><br>

<h2>Source code is hosted on github</h2>Check out our repository at <a href="http://github.com/playframework/play">http://github.com/playframework/play</a><br><br>

<h2>Contributing, creating a patch</h2> Please read the <a href="http://play.lighthouseapp.com/projects/57987/contributor-guide">contributor guide</a><br><br>

<h2>Reporting Security Vulnerabilities</h2> Since all bug reports are public, please report any security vulnerability directly to <em>guillaume dot bort at gmail dot com</em>.<br><br>

<h2>Creating a bug report</h2> Bug reports are incredibly helpful, so take time to report bugs and request features in our ticket tracker. We’re always grateful for patches to Play’s code. Indeed, bug reports with attached patches will get fixed far quickly than those without any.<br><br>

Please include as much relevant information as possible including the exact framework version you're using and a code snippet that reproduces the problem.<br><br>

Don't have too much expectations. Unless the bug is really a serious "everything is broken" thing, you're creating a ticket to start a discussion. Having a patch (or a branch on Github we can pull from) is better, but then again we'll only pull high quality branches that make sense to be in the core of Play.

Referenced by

Pages