Urs Uetliberger created CXF-9105: ------------------------------------ Summary: ConcurrentModificationException in org.apache.cxf.ext.logging.event when iterating over principals Key: CXF-9105 URL: https://issues.apache.org/jira/browse/CXF-9105 Project: CXF Issue Type: Bug Reporter: Urs Uetliberger
I'm using Apache CXF 3.6.5 and I get {{java.util.ConcurrentModificationException}} [1] from {{org.apache.cxf.ext.logging.event.DefaultLogEventMapper.getJAASPrincipal}} when the library is trying to iterate over the {{java.util.Collections.SynchronizedSet<java.security.Principal>}} collection. The iterator of {{java.util.Collections.SynchronizedSet }}must be synchronized externally as it is mentioned here [2]. [1] {{java.util.ConcurrentModificationException: null }} {{at java.base/java.util.LinkedList$ListItr.checkForComodification (LinkedList.java:970) }} {{at java.base/java.util.LinkedList ListItr.next(LinkedList.java:892) }} {{at java.base/javax.security.auth.Subject$SecureSet$l.next(Subject.java:1121)}} {{at org.apache.cxf.ext.logging.event.DefaultLogEventMapper.getJAASPrincipal (DefaultLogEventMapper.java:132)}} {{at org.apache.cxf.ext.logging.event.DefaultLogEventMapper.getPrincipal (DefaultLogEventMapper.java:112)}} {{at org.apache.cxf.ext.logging.event.DefaultLogEventMapper.map (DefaultLogEventMapper.java:104)}} {{at org.apache.cxf.ext.logging.LoggingOutInterceptor$LoggingCallback.onClose (LoggingOut Interceptor.java:201)}} {{at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:219)}} {{at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)}} {{at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:688)}} {{at org.apache.cxf.interceptor. ptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage (MessageSenderInterceptor.java:63)}} {{at org.apache.cxf.phase.Phase InterceptorChain.doIntercept (PhaseInterceptorChain.java:307)}} {{at org.apache.cxf.endpoint.Client Impl.doInvoke (ClientImpl.java:530)}} {{at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:441)}} {{at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:356)}} {{at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:314)}} {{at org.apache.cxf.frontend.Client Proxy.invokeSync (ClientProxy.java:96)}} {{at org.apache.cxf.jaxws.JaxWsClientProxy.invoke (JaxWsClientProxy.java:140)}} {{at jdk.internal.reflect.GeneratedMethodAccessor616.invoke (Unknown Source)}} {{at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)}} {{at java.base/java.lang.reflect.Method.invoke (Method.java:569) org.springframework.aop.support.AopUtils.invokeJoinpointUsing Reflection (AopUtils.java:344)}} {{at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint (ReflectiveMethodInvocation.java:198)}} {{at org.springframework.aop.framework. ReflectiveMethodInvocation.proceed (ReflectiveMethodInvocation.java:163)org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed (MethodInvocation ProceedingJoinPoint.java:89)}} [2] https://docs.oracle.com/javase/8/docs/api/java/util/Collections.html#synchronizedSet-java.util.Set- -- This message was sent by Atlassian Jira (v8.20.10#820010)