Re: java.util.ConcurrentModificationException on app.addRepository
"Hannes Wallnoefer" <[email protected]> Thu, 17 Jul 2008 13:40:12 +0200
| Newsgroups | gmane.comp.java.helma.general |
|---|---|
| Message-ID | <[email protected]> |
2008/7/17 Axel Zuzek <[email protected]>: > Hello list, > > we load our widgets on helma start with app.addRepository and sometimes we > get the following error code: > > ... > [2008/07/17 11:19:23] [INFO] START INFO load widgets [Application > twoday_w1_s2] > [2008/07/17 11:19:23] [INFO] ---- adding repository > C:\helma-1.6.2\apps\twoday_w1_1_1\core\widgets\amazon\code > [2008/07/17 11:19:23] [ERROR] null: > java.util.ConcurrentModificationException > java.util.ConcurrentModificationException > at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793) > at java.util.HashMap$ValueIterator.next(HashMap.java:821) > at > helma.framework.core.TypeManager.checkRepositories(TypeManager.java:204) > at > helma.framework.core.TypeManager.checkPrototypes(TypeManager.java:124) > at > helma.scripting.rhino.RhinoCore.updatePrototypes(RhinoCore.java:330) > at > helma.scripting.rhino.RhinoEngine.enterContext(RhinoEngine.java:174) > at > helma.framework.core.RequestEvaluator.run(RequestEvaluator.java:172) > at java.lang.Thread.run(Thread.java:619) > [2008/07/17 11:19:23] [INFO] ---- adding repository > C:\helma-1.6.2\apps\twoday_w1_1_1\core\widgets\archive\code > [2008/07/17 11:19:23] [INFO] ---- adding repository > C:\helma-1.6.2\apps\twoday_w1_1_1\core\widgets\credits\code > ... > the error is reproduceable on some machines (windows, linux) under > helma1.6.0 and helma 1.6.2, java1.6.0_01 and java1.6.0_06. it seems to be a > racing condition? Just to make sure: it happens each time or just sometimes? and always when the application starts up, or at different points in time? hannes > any ideas? > many thx > axel > > (function used to add repositories:) > function modWidgetsLoadWidgets() { > var widgetDirs = knallgrau.Base.getRepositorySubDirs("widgets"); > for (var i in widgetDirs) { > var widgets = widgetDirs[i].list(); > for (var j in widgets) { > var dir = new helma.File(widgetDirs[i], widgets[j]); > if (!dir.isDirectory() || dir.getName() == "CVS" || dir.getName() > == ".svn") continue; > app.log("---- adding repository " + dir.getAbsolutePath() + > helma.File.separator + "code"); > app.addRepository(dir.getAbsolutePath() + helma.File.separator + > "code"); > } > } > } > > > > _______________________________________________ > Helma-user mailing list > [email protected] > http://helma.org/mailman/listinfo/helma-user > >