#241 ConcurrentModificationException on first map

Dozer v5.2.2
closed-fixed
5
2015-04-01
2010-01-08
dmitry (lv)
No

FieldMap has concurrency bug during caching of property descriptors. This is happening only if very first mapping was executed in concurrent mode.

Results in following stack trace:
java.util.ConcurrentModificationException: concurrent access to HashMap attempted by Thread[WebContainer : 4,5,main]
at java.util.HashMap.onExit(HashMap.java:217)
at java.util.HashMap.transfer(HashMap.java:514)
at java.util.HashMap.resize(HashMap.java:500)
at java.util.HashMap.addEntry(HashMap.java:800)
at java.util.HashMap.put(HashMap.java:441)
at org.dozer.fieldmap.FieldMap.getSrcPropertyDescriptor(FieldMap.java:381)
at org.dozer.fieldmap.FieldMap.getSrcFieldValue(FieldMap.java:82)
at org.dozer.MappingProcessor.mapField(MappingProcessor.java:232)
at org.dozer.MappingProcessor.map(MappingProcessor.java:214)
at org.dozer.MappingProcessor.processSuperTypeMapping(MappingProcessor.java:938)
at org.dozer.MappingProcessor.map(MappingProcessor.java:203)
at org.dozer.MappingProcessor.mapCustomObject(MappingProcessor.java:441)
at org.dozer.MappingProcessor.mapOrRecurseObject(MappingProcessor.java:405)
at org.dozer.MappingProcessor.mapFromFieldMap(MappingProcessor.java:299)
at org.dozer.MappingProcessor.mapField(MappingProcessor.java:245)
at org.dozer.MappingProcessor.map(MappingProcessor.java:214)
at org.dozer.MappingProcessor.map(MappingProcessor.java:159)
at org.dozer.MappingProcessor.map(MappingProcessor.java:117)
at org.dozer.MappingProcessor.map(MappingProcessor.java:112)
at org.dozer.DozerBeanMapper.map(DozerBeanMapper.java:90)

Discussion

  • dmitry (lv)

    dmitry (lv) - 2010-05-29

    replaced HashMap with ConcurrentHashMap. Should solve the issue.

     
  • dmitry (lv)

    dmitry (lv) - 2010-05-29
    • milestone: 929386 --> Dozer v5.2.2
    • assigned_to: nobody --> buzdin
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks