Details
-
Bug
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
None
-
None
-
None
Description
We have implement a cache that keeps the EDM object and then reuses the same in subsequent calls. What we are observing is when we try to access the EDM object via multiple threads concurrently, at times we get ConcurrentModificationException exception. The issue is typically observed right after updating the cache with new EDM object.
Stacktrace:
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:911)
at java.util.ArrayList$Itr.next(ArrayList.java:861)
at org.apache.olingo.commons.core.edm.EdmProviderImpl.compareAnnotations(EdmProviderImpl.java:970)
at org.apache.olingo.commons.core.edm.EdmProviderImpl.addAnnotationsOnPropertiesOfStructuralType(EdmProviderImpl.java:510)
at org.apache.olingo.commons.core.edm.EdmProviderImpl.updateAnnotationsOnStructuralProperties(EdmProviderImpl.java:490)
at org.apache.olingo.commons.core.edm.EdmProviderImpl.addStructuralTypeAnnotations(EdmProviderImpl.java:283)
at org.apache.olingo.commons.core.edm.EdmSchemaImpl.createEntityTypes(EdmSchemaImpl.java:200)
at org.apache.olingo.commons.core.edm.EdmSchemaImpl.<init>(EdmSchemaImpl.java:82)
at org.apache.olingo.commons.core.edm.EdmProviderImpl.createSchemas(EdmProviderImpl.java:907)
at org.apache.olingo.commons.core.edm.AbstractEdm.initSchemas(AbstractEdm.java:126)
at org.apache.olingo.commons.core.edm.AbstractEdm.getSchemas(AbstractEdm.java:106)
at com.sap.gw.core.ip.converter.EdmUtils.getSchemaName(EdmUtils.java:119)