We saw on production the error below:
Caused by: java.util.ConcurrentModificationException at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1493) at java.base/java.util.HashMap$EntryIterator.next(HashMap.java:1526) at java.base/java.util.HashMap$EntryIterator.next(HashMap.java:1524) at java.base/java.util.HashMap.putMapEntries(HashMap.java:507) at java.base/java.util.HashMap.putAll(HashMap.java:780) at org.nuxeo.client.objects.AbstractBase.replaceWith(AbstractBase.java:322) at org.nuxeo.client.objects.AbstractBase.<init>(AbstractBase.java:73) at org.nuxeo.client.objects.AbstractConnectable.<init>(AbstractConnectable.java:58) at org.nuxeo.client.objects.ConnectableEntity.<init>(ConnectableEntity.java:49) at org.nuxeo.client.objects.RepositoryEntity.<init>(RepositoryEntity.java:40) at org.nuxeo.client.objects.Repository.<init>(Repository.java:44) at org.nuxeo.client.objects.Repository.<init>(Repository.java:48) at org.nuxeo.client.NuxeoClient.repository(NuxeoClient.java:201)
This seems to happen when the client is used in a concurrent environment and two threads are trying to create a sub-object of the client, such as repository, directory, header, and more globally every method which touch the headerInterceptors and headerValues maps.
We should add a synchronized bloc to avoid this error.
- is required by
-
NEV-500 Integrate the java client 3.12.0 version
- Resolved
- Is referenced in