cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: ConcurrentModificationException from JSONProvider.java
Date Fri, 25 Jan 2013 10:02:23 GMT
Hi
On 24/01/13 23:20, Joe Lin wrote:
> Hi,
>
> We are on cxf 2.6.1 and this error happens intermittently on one of the
> rest call that we exposed through cxf. Any help will be great:
>

First time I'm seeing it, can you give me a favor and register custom 
WebApplicationException mapper and print the stack trace or register 
org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper and set its 
"printStackTrace" property to true, I'd like to see where the exception 
is coming from. Neither JSONProvider nor Jettison keeps any global state 
so I'm wondering what might be going wrong.

Here is a theory: the custom object which is being serialized has its 
(collection) properties modified concurrently by the application code, 
can it be the case ?

Thanks, Sergey

>
> Jan 23, 2013 8:18:55 AM
> org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper toResponse
> FINE: WebApplicationException has been caught, status: 500, message:
> exception cause class: java.util.ConcurrentModificationException
> javax.ws.rs.WebApplicationException:
> java.util.ConcurrentModificationException
> at
> org.apache.cxf.jaxrs.provider.json.JSONProvider.writeTo(JSONProvider.java:365)
>
> at
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.writeTo(JAXRSOutInterceptor.java:297)
>
> at
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:257)
>
> at
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:145)
>
> at
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:84)
>
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
>
> at
> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)
>
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
>
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:122)
>
> at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:211)
>
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
>
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:154)
>
> at
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:129)
>
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:187)
>
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:115)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:166)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
>
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
>
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
>
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
>
> at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
>
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.util.ConcurrentModificationException
> at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
> at java.util.ArrayList$Itr.next(Unknown Source)
> at
> com.sun.xml.bind.v2.runtime.reflect.Lister$CollectionLister$1.next(Lister.java:288)
>
> at
> com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:139)
>
> at
> com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:159)
>
> at
> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:358)
>
> at
> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializer.java:593)
>
> at
> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInfoImpl.java:340)
>
> at
> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:494)
>
> at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:323)
> at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:178)
> at
> org.apache.cxf.jaxrs.provider.json.JSONProvider.marshal(JSONProvider.java:464)
>
> at
> org.apache.cxf.jaxrs.provider.json.JSONProvider.marshal(JSONProvider.java:512)
>
> at
> org.apache.cxf.jaxrs.provider.json.JSONProvider.writeTo(JSONProvider.java:357)
>
> ... 32 more
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Mime
View raw message