You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Oliver Wulff (JIRA)" <ji...@apache.org> on 2011/09/12 20:43:09 UTC

[jira] [Created] (CXF-3801) EndpointReferenceUtils.convertToXML() causes ConcurrentModificationException under load

EndpointReferenceUtils.convertToXML() causes ConcurrentModificationException under load
---------------------------------------------------------------------------------------

                 Key: CXF-3801
                 URL: https://issues.apache.org/jira/browse/CXF-3801
             Project: CXF
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.4.2
            Reporter: Oliver Wulff


If EndpointReferenceUtils.convertToXML() is called very often by a service implementation it causes ConcurrentModificationException.

[2011-09-08 03:08:00.038:http-17600-12] ERROR
org.example.service.LocatorServiceImpl
java.util.ConcurrentModificationException
         at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
         at java.util.HashMap$KeyIterator.next(HashMap.java:828)
         at org.apache.cxf.common.util.WeakIdentityHashMap.keySet(WeakIdentityHashMap.java:95) at
         org.apache.cxf.common.util.CacheMap.updateMainDataMap(CacheMap.java:57) at
         org.apache.cxf.common.util.CacheMap.entrySet(CacheMap.java:78) at
         org.apache.cxf.jaxb.JAXBContextCache.getCachedContextAndSchemas(JAXBContextCache.java:148) at
         org.apache.cxf.wsdl.EndpointReferenceUtils.convertToXML(EndpointReferenceUtils.java:1018) at
         org.example.service.LocatorServiceImpl.createEndpoint(LocatorServiceImpl.java:461) at
         org.example.service.LocatorServiceImpl.listEndpoints(LocatorServiceImpl.java:277)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3801) EndpointReferenceUtils.convertToXML() causes ConcurrentModificationException under load

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13102939#comment-13102939 ] 

Daniel Kulp commented on CXF-3801:
----------------------------------

Oli,

How easy is it for you to reproduce and test this?

I just discovered the call in JAXBContextCache to "remove" was not in a synchronized block which could definitely cause this.   I'm committing that fix to trunk and the branches, but would definitely like to see this tested to make sure it really fixes the problem.


> EndpointReferenceUtils.convertToXML() causes ConcurrentModificationException under load
> ---------------------------------------------------------------------------------------
>
>                 Key: CXF-3801
>                 URL: https://issues.apache.org/jira/browse/CXF-3801
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.4.2
>            Reporter: Oliver Wulff
>            Assignee: Daniel Kulp
>
> If EndpointReferenceUtils.convertToXML() is called very often by a service implementation it causes ConcurrentModificationException.
> [2011-09-08 03:08:00.038:http-17600-12] ERROR
> org.example.service.LocatorServiceImpl
> java.util.ConcurrentModificationException
>          at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>          at java.util.HashMap$KeyIterator.next(HashMap.java:828)
>          at org.apache.cxf.common.util.WeakIdentityHashMap.keySet(WeakIdentityHashMap.java:95) at
>          org.apache.cxf.common.util.CacheMap.updateMainDataMap(CacheMap.java:57) at
>          org.apache.cxf.common.util.CacheMap.entrySet(CacheMap.java:78) at
>          org.apache.cxf.jaxb.JAXBContextCache.getCachedContextAndSchemas(JAXBContextCache.java:148) at
>          org.apache.cxf.wsdl.EndpointReferenceUtils.convertToXML(EndpointReferenceUtils.java:1018) at
>          org.example.service.LocatorServiceImpl.createEndpoint(LocatorServiceImpl.java:461) at
>          org.example.service.LocatorServiceImpl.listEndpoints(LocatorServiceImpl.java:277)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CXF-3801) EndpointReferenceUtils.convertToXML() causes ConcurrentModificationException under load

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3801?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp reassigned CXF-3801:
--------------------------------

    Assignee: Daniel Kulp

> EndpointReferenceUtils.convertToXML() causes ConcurrentModificationException under load
> ---------------------------------------------------------------------------------------
>
>                 Key: CXF-3801
>                 URL: https://issues.apache.org/jira/browse/CXF-3801
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.4.2
>            Reporter: Oliver Wulff
>            Assignee: Daniel Kulp
>
> If EndpointReferenceUtils.convertToXML() is called very often by a service implementation it causes ConcurrentModificationException.
> [2011-09-08 03:08:00.038:http-17600-12] ERROR
> org.example.service.LocatorServiceImpl
> java.util.ConcurrentModificationException
>          at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>          at java.util.HashMap$KeyIterator.next(HashMap.java:828)
>          at org.apache.cxf.common.util.WeakIdentityHashMap.keySet(WeakIdentityHashMap.java:95) at
>          org.apache.cxf.common.util.CacheMap.updateMainDataMap(CacheMap.java:57) at
>          org.apache.cxf.common.util.CacheMap.entrySet(CacheMap.java:78) at
>          org.apache.cxf.jaxb.JAXBContextCache.getCachedContextAndSchemas(JAXBContextCache.java:148) at
>          org.apache.cxf.wsdl.EndpointReferenceUtils.convertToXML(EndpointReferenceUtils.java:1018) at
>          org.example.service.LocatorServiceImpl.createEndpoint(LocatorServiceImpl.java:461) at
>          org.example.service.LocatorServiceImpl.listEndpoints(LocatorServiceImpl.java:277)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CXF-3801) EndpointReferenceUtils.convertToXML() causes ConcurrentModificationException under load

Posted by "Daniel Kulp (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3801?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-3801.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.4.3
    
> EndpointReferenceUtils.convertToXML() causes ConcurrentModificationException under load
> ---------------------------------------------------------------------------------------
>
>                 Key: CXF-3801
>                 URL: https://issues.apache.org/jira/browse/CXF-3801
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.4.2
>            Reporter: Oliver Wulff
>            Assignee: Daniel Kulp
>             Fix For: 2.4.3
>
>
> If EndpointReferenceUtils.convertToXML() is called very often by a service implementation it causes ConcurrentModificationException.
> [2011-09-08 03:08:00.038:http-17600-12] ERROR
> org.example.service.LocatorServiceImpl
> java.util.ConcurrentModificationException
>          at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>          at java.util.HashMap$KeyIterator.next(HashMap.java:828)
>          at org.apache.cxf.common.util.WeakIdentityHashMap.keySet(WeakIdentityHashMap.java:95) at
>          org.apache.cxf.common.util.CacheMap.updateMainDataMap(CacheMap.java:57) at
>          org.apache.cxf.common.util.CacheMap.entrySet(CacheMap.java:78) at
>          org.apache.cxf.jaxb.JAXBContextCache.getCachedContextAndSchemas(JAXBContextCache.java:148) at
>          org.apache.cxf.wsdl.EndpointReferenceUtils.convertToXML(EndpointReferenceUtils.java:1018) at
>          org.example.service.LocatorServiceImpl.createEndpoint(LocatorServiceImpl.java:461) at
>          org.example.service.LocatorServiceImpl.listEndpoints(LocatorServiceImpl.java:277)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira