java.util.ConcurrentModificationException on app.addRepository
"Axel Zuzek" <[email protected]> Thu, 17 Jul 2008 11:59:25 +0200
| Newsgroups | gmane.comp.java.helma.general |
|---|---|
| Message-ID | <[email protected]> |
--===============0348327784==
Content-Type: multipart/alternative;
boundary="----=_Part_51139_1397789.1216288765727"
------=_Part_51139_1397789.1216288765727
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
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?
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");
}
}
}
------=_Part_51139_1397789.1216288765727
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
<div dir="ltr">Hello list,<br><br>we load our widgets on helma start with app.addRepository and sometimes we get the following error code:<br><br>...<br>[2008/07/17 11:19:23] [INFO] START INFO load widgets [Application twoday_w1_s2]<br>
[2008/07/17 11:19:23] [INFO] ---- adding repository C:\helma-1.6.2\apps\twoday_w1_1_1\core\widgets\amazon\code<br>
[2008/07/17 11:19:23] [ERROR] null: java.util.ConcurrentModificationException<br>
java.util.ConcurrentModificationException<br>
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)<br>
at java.util.HashMap$ValueIterator.next(HashMap.java:821)<br>
at helma.framework.core.TypeManager.checkRepositories(TypeManager.java:204)<br>
at helma.framework.core.TypeManager.checkPrototypes(TypeManager.java:124)<br>
at helma.scripting.rhino.RhinoCore.updatePrototypes(RhinoCore.java:330)<br>
at helma.scripting.rhino.RhinoEngine.enterContext(RhinoEngine.java:174)<br>
at helma.framework.core.RequestEvaluator.run(RequestEvaluator.java:172)<br>
at java.lang.Thread.run(Thread.java:619)<br>
[2008/07/17 11:19:23] [INFO] ---- adding repository C:\helma-1.6.2\apps\twoday_w1_1_1\core\widgets\archive\code<br>
[2008/07/17 11:19:23] [INFO] ---- adding repository C:\helma-1.6.2\apps\twoday_w1_1_1\core\widgets\credits\code<br>...<br>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?<br>
<br>any ideas?<br>many thx<br>axel<br><br>(function used to add repositories:)<br>function modWidgetsLoadWidgets() {<br> var widgetDirs = knallgrau.Base.getRepositorySubDirs("widgets");<br> for (var i in widgetDirs) {<br>
var widgets = widgetDirs[i].list();<br> for (var j in widgets) {<br> var dir = new helma.File(widgetDirs[i], widgets[j]);<br> if (!dir.isDirectory() || dir.getName() == "CVS" || dir.getName() == ".svn") continue;<br>
app.log("---- adding repository " + dir.getAbsolutePath() + helma.File.separator + "code");<br> app.addRepository(dir.getAbsolutePath() + helma.File.separator + "code");<br> }<br>
}<br>}<br clear="all"><br><br></div>
------=_Part_51139_1397789.1216288765727--
--===============0348327784==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Helma-user mailing list
[email protected]
http://helma.org/mailman/listinfo/helma-user
--===============0348327784==--