[jdom-interest] conncurrent modification exception with jdom 8

Carey Boldenow c.boldenow at cyterasystems.com
Fri Dec 20 07:58:08 PST 2002


I recently upgraded from build 7 to build 8 and one of my 
methods is now throwing a 
java.util.ConcurrentModificationException where it 
previously did not (see stacktrace below). I have also 
included the method that is throwing the exception. Thanks 
for any help offered.

java.util.ConcurrentModificationException
	at 
org.jdom.ContentList$FilterListIterator.checkConcurrentModification(ContentList.java:1230)
	at 
org.jdom.ContentList$FilterListIterator.hasNext(ContentList.java:942)
	at 
com.cytera.frameworks.database.SqlXmlDocumentManager.buildSqlXmlDocument(SqlXmlDocumentManager.java:86)
	at 
com.cytera.frameworks.database.ConnPoolJuggler.init(ConnPoolJuggler.java:474)


  public Document buildSqlXmlDocument(ArrayList 
xmlDocPaths) {
         sqlXmlDoc = new Document(new 
Element("SQL-STATEMENTS"));
         try {
             for (int i=0; i<xmlDocPaths.size(); i++) {
                 List list = 
getNodesFromXML((String)xmlDocPaths.get(i));
                 Iterator iter = list.iterator();
                 while (iter.hasNext()) { //Exception is 
thrown here
                     sqlXmlDoc.getRootElement().addContent(((Element)iter.next()).detach());
                 }
             }
         }
         catch(Exception e) {
             e.printStackTrace();
         }
         return sqlXmlDoc;
     }



More information about the jdom-interest mailing list