IBM Support

PI67586: ConcurrentModificationException in org.apache.cxf.jaxrs.JAXRSSer viceFactoryBean

Fixes are available

16.0.0.3: WebSphere Application Server Liberty 16.0.0.3
16.0.0.4: WebSphere Application Server Liberty 16.0.0.4
17.0.0.1: WebSphere Application Server Liberty 17.0.0.1
17.0.0.2: WebSphere Application Server Liberty 17.0.0.2
17.0.0.3: WebSphere Application Server Liberty 17.0.0.3
17.0.0.4: WebSphere Application Server Liberty 17.0.0.4
18.0.0.1: WebSphere Application Server Liberty 18.0.0.1
18.0.0.2: WebSphere Application Server Liberty 18.0.0.2
18.0.0.3: WebSphere Application Server Liberty 18.0.0.3
18.0.0.4: WebSphere Application Server Liberty 18.0.0.4
19.0.0.1: WebSphere Application Server Liberty 19.0.0.1
19.0.0.2: WebSphere Application Server Liberty 19.0.0.2
19.0.0.3: WebSphere Application Server Liberty 19.0.0.3
19.0.0.4: WebSphere Application Server Liberty 19.0.0.4
19.0.0.5: WebSphere Application Server Liberty 19.0.0.5
19.0.0.6: WebSphere Application Server Liberty 19.0.0.6
19.0.0.7: WebSphere Application Server Liberty 19.0.0.7
19.0.0.8: WebSphere Application Server Liberty 19.0.0.8
19.0.0.9: WebSphere Application Server Liberty 19.0.0.9
19.0.0.10: WebSphere Application Server Liberty 19.0.0.10
19.0.0.11: WebSphere Application Server Liberty 19.0.0.11
19.0.0.12: WebSphere Application Server Liberty 19.0.0.12
20.0.0.1: WebSphere Application Server Liberty 20.0.0.1
20.0.0.2: WebSphere Application Server Liberty 20.0.0.2
20.0.0.3: WebSphere Application Server Liberty 20.0.0.3
20.0.0.4: WebSphere Application Server Liberty 20.0.0.4
20.0.0.5: WebSphere Application Server Liberty 20.0.0.5
20.0.0.6: WebSphere Application Server Liberty 20.0.0.6
20.0.0.7: WebSphere Application Server Liberty 20.0.0.7
20.0.0.8: WebSphere Application Server Liberty 20.0.0.8
20.0.0.9: WebSphere Application Server Liberty 20.0.0.9
20.0.0.10: WebSphere Application Server Liberty 20.0.0.10
20.0.0.11: WebSphere Application Server Liberty 20.0.0.11
20.0.0.12: WebSphere Application Server Liberty 20.0.0.12

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • If two or more servlets are initialized at the same time,
    the user may see an error message like this:
    
    [ERROR   ] SRVE0276E: Error while initializing Servlet
    [StatelessApplicationSubclassAsEJB]:
    javax.servlet.ServletException: SRVE0207E: Uncaught
    initialization exception created by servlet
    	at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletW
    rapper.java:401)
    	at [internal classes]
    Caused by: java.util.ConcurrentModificationException
    	at
    java.util.ArrayList$Itr.checkForComodification(ArrayList.jav
    a:881)
    	at java.util.ArrayList$Itr.next(ArrayList.java:853)
    	at
    org.apache.cxf.jaxrs.JAXRSServiceFactoryBean.setResourceClas
    ses(JAXRSServiceFactoryBean.java:154)
    	... 1 more
    
    Additionally, the user may see an FFDC report like this:
    ------Start of DE processing------ = [7/18/16 4:01:09:867
    BST]
    Exception = java.util.ConcurrentModificationException
    Source = com.ibm.ws.webcontainer.servlet.ServletWrapper.init
    probeid = 181
    Stack Dump = java.util.ConcurrentModificationException
    	at
    java.util.ArrayList$Itr.checkForComodification(ArrayList.jav
    a:881)
    	at java.util.ArrayList$Itr.next(ArrayList.java:853)
    	at
    org.apache.cxf.jaxrs.JAXRSServiceFactoryBean.setResourceClas
    ses(JAXRSServiceFactoryBean.java:154)
    	at
    org.apache.cxf.jaxrs.JAXRSServerFactoryBean.setResourceClass
    es(JAXRSServerFactoryBean.java:300)
    	at
    com.ibm.ws.jaxrs20.server.LibertyJaxRsServerFactoryBean.doIn
    it(LibertyJaxRsServerFactoryBean.java:332)
    	at
    com.ibm.ws.jaxrs20.server.JaxRsWebEndpointImpl.init(JaxRsWeb
    EndpointImpl.java:62)
    	at
    com.ibm.websphere.jaxrs.server.IBMRestServlet.init(IBMRestSe
    rvlet.java:65)
    	at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletW
    rapper.java:332)
    	at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartup
    Check(ServletWrapper.java:1428)
    	at
    com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions
    (WebApp.java:1181)
    	at
    com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFi
    nally(WebApp.java:1149)
    	at
    com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java
    :1055)
    	at
    com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java
    :6507)
    	at
    com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApp(
    DynamicVirtualHost.java:446)
    	at
    com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebAppl
    ication(DynamicVirtualHost.java:441)
    	at
    com.ibm.ws.webcontainer.osgi.WebContainer.startWebApplicatio
    n(WebContainer.java:1013)
    	at
    com.ibm.ws.webcontainer.osgi.WebContainer.access$000(WebCont
    ainer.java:101)
    	at
    com.ibm.ws.webcontainer.osgi.WebContainer$2.run(WebContainer
    .java:837)
    	at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
    Executor.java:1177)
    	at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
    lExecutor.java:642)
    	at java.lang.Thread.run(Thread.java:795)
    
    This will prevent the web application from starting
    successfully.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty - Web Services (JAX-WS, JAX- *
    *                  RS)                                         *
    ****************************************************************
    * PROBLEM DESCRIPTION: ConcurrentModificationException in      *
    *                      org.apache.cxf.jaxrs.JAXRSServiceFactor *
    *                      yBean                                   *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    If two or more servlets are initialized at the same time, the
    user may see an error message like this:
    
    [ERROR   ] SRVE0276E: Error while initializing Servlet
    [StatelessApplicationSubclassAsEJB]:
    javax.servlet.ServletException: SRVE0207E: Uncaught
    initialization exception created by servlet
    	at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapp
    er.java:401)
    	at [internal classes]
    Caused by: java.util.ConcurrentModificationException
    	at
    java.util.ArrayList$Itr.checkForComodification(ArrayList.java:88
    1)
    	at java.util.ArrayList$Itr.next(ArrayList.java:853)
    	at
    org.apache.cxf.jaxrs.JAXRSServiceFactoryBean.setResourceClasses(
    JAXRSServiceFactoryBean.java:154)
    	... 1 more
    
    Additionally, the user may see an FFDC report like this:
    ------Start of DE processing------ = [7/18/16 4:01:09:867 BST]
    Exception = java.util.ConcurrentModificationException
    Source = com.ibm.ws.webcontainer.servlet.ServletWrapper.init
    probeid = 181
    Stack Dump = java.util.ConcurrentModificationException
    	at
    java.util.ArrayList$Itr.checkForComodification(ArrayList.java:88
    1)
    	at java.util.ArrayList$Itr.next(ArrayList.java:853)
    	at
    org.apache.cxf.jaxrs.JAXRSServiceFactoryBean.setResourceClasses(
    JAXRSServiceFactoryBean.java:154)
    	at
    org.apache.cxf.jaxrs.JAXRSServerFactoryBean.setResourceClasses(J
    AXRSServerFactoryBean.java:300)
    	at
    com.ibm.ws.jaxrs20.server.LibertyJaxRsServerFactoryBean.doInit(L
    ibertyJaxRsServerFactoryBean.java:332)
    	at
    com.ibm.ws.jaxrs20.server.JaxRsWebEndpointImpl.init(JaxRsWebEndp
    ointImpl.java:62)
    	at
    com.ibm.websphere.jaxrs.server.IBMRestServlet.init(IBMRestServle
    t.java:65)
    	at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapp
    er.java:332)
    	at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupChec
    k(ServletWrapper.java:1428)
    	at
    com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(Web
    App.java:1181)
    	at
    com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinall
    y(WebApp.java:1149)
    	at
    com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:105
    5)
    	at
    com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:650
    7)
    	at
    com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApp(Dyna
    micVirtualHost.java:446)
    	at
    com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApplicat
    ion(DynamicVirtualHost.java:441)
    	at
    com.ibm.ws.webcontainer.osgi.WebContainer.startWebApplication(We
    bContainer.java:1013)
    	at
    com.ibm.ws.webcontainer.osgi.WebContainer.access$000(WebContaine
    r.java:101)
    	at
    com.ibm.ws.webcontainer.osgi.WebContainer$2.run(WebContainer.jav
    a:837)
    	at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExec
    utor.java:1177)
    	at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExe
    cutor.java:642)
    	at java.lang.Thread.run(Thread.java:795)
    
    This will prevent the web application from starting
    successfully.
    

Problem conclusion

  • The fix for this APAR adds synchronization logic to prevent the
    ConcurrentModificationException.
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 16.0.0.3.  Please refer to the Recommended Updates page for
    delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI67586

  • Reported component name

    WAS LIBERTY COR

  • Reported component ID

    5725L2900

  • Reported release

    855

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-08-15

  • Closed date

    2016-08-16

  • Last modified date

    2016-08-16

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WAS LIBERTY COR

  • Fixed component ID

    5725L2900

Applicable component levels

  • R855 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Product":{"code":"SSD28V","label":"WebSphere Application Server Liberty Core"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"855","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
14 October 2021