java.util.ConcurrentModificationException

Sakai JIRA | Chris Wilper | 9 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    On Thu, Jul 10, 2008 at 5:37 AM, Antony Corfield [awc] <awc@aber.ac.uk> wrote: > Hi, I've been running some tests depositing zip files using SWORD. When I hit the server with 50 concurrent threads (unlikely in reality!) I get the following error in the fedora code. > > java.util.ConcurrentModificationException > at java.util.Hashtable$Enumerator.next(Hashtable.java:1031) > at fedora.server.management.DefaultManagement.putTempStream(DefaultManagement.java:1395) > at fedora.server.management.UploadServlet.saveAndGetId(UploadServlet.java:149) > at fedora.server.management.UploadServlet.doPost(UploadServlet.java:99) > > > Here's a simple patch (Fedora 3.0b1) for fedora.server.management.UploadServlet that fixes this problem. > Same problem in Fedora 2.2.1 and other versions I guess. > > > > > Index: C:/Users/awc/eclipse/fedora_release-3.0b1/src/java/fedora/server/management/UploadServlet.java > =================================================================== > --- C:/Users/awc/eclipse/fedora_release-3.0b1/src/java/fedora/server/management/UploadServlet.java (revision 6592) > +++ C:/Users/awc/eclipse/fedora_release-3.0b1/src/java/fedora/server/management/UploadServlet.java (working copy) > @@ -129,8 +129,10 @@ > } > > private String saveAndGetId(Context context, FilePart filePart) > - throws ServerException, IOException { > - return s_management.putTempStream(context, filePart.getInputStream()); > + throws ServerException, IOException { > + synchronized (s_management) { > + return s_management.putTempStream(context, filePart.getInputStream()); > + } > }

    Sakai JIRA | 9 years ago | Chris Wilper
    java.util.ConcurrentModificationException
  2. 0

    On Thu, Jul 10, 2008 at 5:37 AM, Antony Corfield [awc] <awc@aber.ac.uk> wrote: > Hi, I've been running some tests depositing zip files using SWORD. When I hit the server with 50 concurrent threads (unlikely in reality!) I get the following error in the fedora code. > > java.util.ConcurrentModificationException > at java.util.Hashtable$Enumerator.next(Hashtable.java:1031) > at fedora.server.management.DefaultManagement.putTempStream(DefaultManagement.java:1395) > at fedora.server.management.UploadServlet.saveAndGetId(UploadServlet.java:149) > at fedora.server.management.UploadServlet.doPost(UploadServlet.java:99) > > > Here's a simple patch (Fedora 3.0b1) for fedora.server.management.UploadServlet that fixes this problem. > Same problem in Fedora 2.2.1 and other versions I guess. > > > > > Index: C:/Users/awc/eclipse/fedora_release-3.0b1/src/java/fedora/server/management/UploadServlet.java > =================================================================== > --- C:/Users/awc/eclipse/fedora_release-3.0b1/src/java/fedora/server/management/UploadServlet.java (revision 6592) > +++ C:/Users/awc/eclipse/fedora_release-3.0b1/src/java/fedora/server/management/UploadServlet.java (working copy) > @@ -129,8 +129,10 @@ > } > > private String saveAndGetId(Context context, FilePart filePart) > - throws ServerException, IOException { > - return s_management.putTempStream(context, filePart.getInputStream()); > + throws ServerException, IOException { > + synchronized (s_management) { > + return s_management.putTempStream(context, filePart.getInputStream()); > + } > }

    Sakai JIRA | 9 years ago | Chris Wilper
    java.util.ConcurrentModificationException
  3. 0

    ConcurrentModificationException on Richfaces Tree

    Stack Overflow | 5 years ago | Lucas Merencia
    java.util.ConcurrentModificationException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.util.ConcurrentModificationException

      No message provided

      at java.util.Hashtable$Enumerator.next()
    2. Java RT
      Hashtable$Enumerator.next
      1. java.util.Hashtable$Enumerator.next(Hashtable.java:1031)
      1 frame
    3. fedora.server.management
      UploadServlet.doPost
      1. fedora.server.management.DefaultManagement.putTempStream(DefaultManagement.java:1395)
      2. fedora.server.management.UploadServlet.saveAndGetId(UploadServlet.java:149)
      3. fedora.server.management.UploadServlet.doPost(UploadServlet.java:99)
      3 frames