ConcurrentModificationException on DefaultConverterManager.getConverterAssignableFrom

View: New views
7 Messages — Rating Filter:   Alert me  

Parent Message unknown ConcurrentModificationException on DefaultConverterManager.getConverterAssignableFrom

by Fabio Collini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi, I am using dwr 2.0.2 in my web application on a websphere 6.1. Today I have this exception and I had to restart server to fix it:

org.directwebremoting.extend.MarshallException: Error marshalling it.omniagroup.lgi.filtri.model.beansext.Regola: concurrent access to HashMap attempted by Thread[WebContainer : 1,5,main]. See the logs for more details.
at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:200)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:189)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.convert.CollectionConverter.convertOutbound(CollectionConverter.java:206)
at it.omniagroup.lgi.utilita.griglia.GrigliaModelPaginatoConverter.convertOutbound(GrigliaModelPaginatoConverter.java:69)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:189)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.convert.CollectionConverter.convertOutbound(CollectionConverter.java:206)
at it.omniagroup.lgi.utilita.griglia.GrigliaModelPaginatoConverter.convertOutbound(GrigliaModelPaginatoConverter.java:69)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.extend.ScriptBufferUtil.createOutput(ScriptBufferUtil.java:56)
at org.directwebremoting.dwrp.BaseCallMarshaller$CallScriptConduit.addScript(BaseCallMarshaller.java:512)
at org.directwebremoting.extend.EnginePrivate.remoteHandleCallback(EnginePrivate.java:56)
at org.directwebremoting.dwrp.BaseCallMarshaller.marshallOutbound(BaseCallMarshaller.java:330)
at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:53)
at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)
at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1095)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1036)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:832)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:679)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:565)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:118)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Caused by: java.util.ConcurrentModificationException: concurrent access to HashMap attempted by Thread[WebContainer : 1,5,main]
at java.util.HashMap.onExit(HashMap.java:226)
at java.util.HashMap.transfer(HashMap.java:690)
at java.util.HashMap.resize(HashMap.java:676)
at java.util.HashMap.addEntry(HashMap.java:1049)
at java.util.HashMap.put(HashMap.java:561)
at org.directwebremoting.dwrp.DefaultConverterManager.getConverterAssignableFrom(DefaultConverterManager.java:406)
at org.directwebremoting.dwrp.DefaultConverterManager.getConverter(DefaultConverterManager.java:302)
at org.directwebremoting.dwrp.DefaultConverterManager.getConverter(DefaultConverterManager.java:234)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:185)
at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:189)
... 49 more

[10/23/09 7:44:12:338 CEST] 00000040 CollectionCon W org.directwebremoting.util.CommonsLoggingOutput warn Conversion error for it.omniagroup.lgi.utilita.griglia.GrigliaModelPaginato.
                                 org.directwebremoting.extend.MarshallException: Error marshalling it.omniagroup.lgi.filtri.model.beansext.Regola: concurrent access to HashMap attempted by Thread[WebContainer : 6,5,main]. See the logs for more details.
at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:200)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:189)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.convert.CollectionConverter.convertOutbound(CollectionConverter.java:206)
at it.omniagroup.lgi.utilita.griglia.GrigliaModelPaginatoConverter.convertOutbound(GrigliaModelPaginatoConverter.java:69)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:189)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.convert.CollectionConverter.convertOutbound(CollectionConverter.java:206)
at it.omniagroup.lgi.utilita.griglia.GrigliaModelPaginatoConverter.convertOutbound(GrigliaModelPaginatoConverter.java:69)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.extend.ScriptBufferUtil.createOutput(ScriptBufferUtil.java:56)
at org.directwebremoting.dwrp.BaseCallMarshaller$CallScriptConduit.addScript(BaseCallMarshaller.java:512)
at org.directwebremoting.extend.EnginePrivate.remoteHandleCallback(EnginePrivate.java:56)
at org.directwebremoting.dwrp.BaseCallMarshaller.marshallOutbound(BaseCallMarshaller.java:330)
at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:53)
at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)
at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1095)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1036)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:832)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:679)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:565)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:118)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Caused by: java.util.ConcurrentModificationException: concurrent access to HashMap attempted by Thread[WebContainer : 6,5,main]
at java.util.HashMap.onEntry(HashMap.java:214)
at java.util.HashMap.transfer(HashMap.java:686)
at java.util.HashMap.resize(HashMap.java:676)
at java.util.HashMap.addEntry(HashMap.java:1049)
at java.util.HashMap.put(HashMap.java:561)
at org.directwebremoting.dwrp.DefaultConverterManager.getConverterAssignableFrom(DefaultConverterManager.java:406)
at org.directwebremoting.dwrp.DefaultConverterManager.getConverter(DefaultConverterManager.java:302)
at org.directwebremoting.dwrp.DefaultConverterManager.getConverter(DefaultConverterManager.java:234)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:185)
at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:189)
... 47 more

I think that converters map declared at line 439 should be syncrohized.
Best regards
Fabio

--


OmniaSoftware ® s.r.l. 
Dott. Fabio Collini

(Analista Programmatore) 
Via Melloni, 29 - 50019 Sesto F.no (FI) 
Tel. 0554200158 int.208 
fcollini@...
sceri@...
http://www.omniagroup.it/

AVVISO DI RISERVATEZZA
Il testo e gli eventuali documenti trasmessi contengono informazioni riservate al destinatario indicato. La seguente e-mail è confidenziale e la sua riservatezza è tutelata legalmente dalle normative vigenti. La lettura, copia od altro uso non autorizzato o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Se si ritiene di non essere il destinatario di questa mail, o se si è ricevuto questa mail per errore, si prega di darne immediata comunicazione al mittente e di provvedere immediatamente alla sua distruzione. Le dichiarazioni contenute nel presente messaggio, nonché nei suoi eventuali allegati, devono essere attribuite esclusivamente al mittente e non possono essere considerate come trasmesse o autorizzate da Omnia Software s.r.l.; le medesime dichiarazioni non impegnano Omnia Software s.r.l. nei confronti del destinatario o di terzi. Omnia Software s.r.l. non si assume alcuna responsabilità per eventuali intercettazioni, modifiche o danneggiamenti del presente messaggio e-mail.

PRIVACY NOTICE
The information contained in this transmittal, including any attachments hereto, are confidential and privileged, and intended solely for the specified addressee(s). This e-mail has a confidential nature which is protected by the Italian law. Moreover, the recipient(s) may not disclose, forward, or copy this e-mail or attachments, or any portion thereof, or permit the use of this information, by anyone not entitled to it, or in a way that may be damaging to the sender. If you are not the intended addressee, or if you receive this message by error, please notify the sender and delete this information from your computer. The statements and opinions expressed in this e-mail message are those of the author of the message and do not necessarily represent those of OMNIA SOFTWARE s.r.l. Besides, The contents of this message shall be understood as neither given nor endorsed by OMNIA SOFTWARE s.r.l.  OMNIA SOFTWARE s.r.l. does not accept liability for corruption, interception or amendment, if any, or the consequences thereof.




Re: ConcurrentModificationException on DefaultConverterManager.getConverterAssignableFrom

by davidmarginian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Fabio,
   I took a quick look at the latest 2.x source (which is not 2.0.2).  I didn't see anything that looked alarming - I did a search online and so a few things that may indicate bugs in WebSphere but I can' confirm or deny this.  Any one else have thoughts here?

On Fri, Oct 23, 2009 at 4:51 AM, Fabio Collini <fcollini@...> wrote:
Hi, I am using dwr 2.0.2 in my web application on a websphere 6.1. Today I have this exception and I had to restart server to fix it:

org.directwebremoting.extend.MarshallException: Error marshalling it.omniagroup.lgi.filtri.model.beansext.Regola: concurrent access to HashMap attempted by Thread[WebContainer : 1,5,main]. See the logs for more details.
at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:200)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:189)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.convert.CollectionConverter.convertOutbound(CollectionConverter.java:206)
at it.omniagroup.lgi.utilita.griglia.GrigliaModelPaginatoConverter.convertOutbound(GrigliaModelPaginatoConverter.java:69)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:189)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.convert.CollectionConverter.convertOutbound(CollectionConverter.java:206)
at it.omniagroup.lgi.utilita.griglia.GrigliaModelPaginatoConverter.convertOutbound(GrigliaModelPaginatoConverter.java:69)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.extend.ScriptBufferUtil.createOutput(ScriptBufferUtil.java:56)
at org.directwebremoting.dwrp.BaseCallMarshaller$CallScriptConduit.addScript(BaseCallMarshaller.java:512)
at org.directwebremoting.extend.EnginePrivate.remoteHandleCallback(EnginePrivate.java:56)
at org.directwebremoting.dwrp.BaseCallMarshaller.marshallOutbound(BaseCallMarshaller.java:330)
at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:53)
at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)
at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1095)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1036)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:832)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:679)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:565)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:118)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Caused by: java.util.ConcurrentModificationException: concurrent access to HashMap attempted by Thread[WebContainer : 1,5,main]
at java.util.HashMap.onExit(HashMap.java:226)
at java.util.HashMap.transfer(HashMap.java:690)
at java.util.HashMap.resize(HashMap.java:676)
at java.util.HashMap.addEntry(HashMap.java:1049)
at java.util.HashMap.put(HashMap.java:561)
at org.directwebremoting.dwrp.DefaultConverterManager.getConverterAssignableFrom(DefaultConverterManager.java:406)
at org.directwebremoting.dwrp.DefaultConverterManager.getConverter(DefaultConverterManager.java:302)
at org.directwebremoting.dwrp.DefaultConverterManager.getConverter(DefaultConverterManager.java:234)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:185)
at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:189)
... 49 more

[10/23/09 7:44:12:338 CEST] 00000040 CollectionCon W org.directwebremoting.util.CommonsLoggingOutput warn Conversion error for it.omniagroup.lgi.utilita.griglia.GrigliaModelPaginato.
                                 org.directwebremoting.extend.MarshallException: Error marshalling it.omniagroup.lgi.filtri.model.beansext.Regola: concurrent access to HashMap attempted by Thread[WebContainer : 6,5,main]. See the logs for more details.
at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:200)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:189)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.convert.CollectionConverter.convertOutbound(CollectionConverter.java:206)
at it.omniagroup.lgi.utilita.griglia.GrigliaModelPaginatoConverter.convertOutbound(GrigliaModelPaginatoConverter.java:69)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:189)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.convert.CollectionConverter.convertOutbound(CollectionConverter.java:206)
at it.omniagroup.lgi.utilita.griglia.GrigliaModelPaginatoConverter.convertOutbound(GrigliaModelPaginatoConverter.java:69)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:192)
at org.directwebremoting.extend.ScriptBufferUtil.createOutput(ScriptBufferUtil.java:56)
at org.directwebremoting.dwrp.BaseCallMarshaller$CallScriptConduit.addScript(BaseCallMarshaller.java:512)
at org.directwebremoting.extend.EnginePrivate.remoteHandleCallback(EnginePrivate.java:56)
at org.directwebremoting.dwrp.BaseCallMarshaller.marshallOutbound(BaseCallMarshaller.java:330)
at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:53)
at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)
at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1095)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1036)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:832)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:679)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:565)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:118)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Caused by: java.util.ConcurrentModificationException: concurrent access to HashMap attempted by Thread[WebContainer : 6,5,main]
at java.util.HashMap.onEntry(HashMap.java:214)
at java.util.HashMap.transfer(HashMap.java:686)
at java.util.HashMap.resize(HashMap.java:676)
at java.util.HashMap.addEntry(HashMap.java:1049)
at java.util.HashMap.put(HashMap.java:561)
at org.directwebremoting.dwrp.DefaultConverterManager.getConverterAssignableFrom(DefaultConverterManager.java:406)
at org.directwebremoting.dwrp.DefaultConverterManager.getConverter(DefaultConverterManager.java:302)
at org.directwebremoting.dwrp.DefaultConverterManager.getConverter(DefaultConverterManager.java:234)
at org.directwebremoting.dwrp.DefaultConverterManager.convertOutbound(DefaultConverterManager.java:185)
at org.directwebremoting.convert.BasicObjectConverter.convertOutbound(BasicObjectConverter.java:189)
... 47 more

I think that converters map declared at line 439 should be syncrohized.
Best regards
Fabio

--


OmniaSoftware ® s.r.l. 
Dott. Fabio Collini

(Analista Programmatore) 
Via Melloni, 29 - 50019 Sesto F.no (FI) 
Tel. 0554200158 int.208 
fcollini@...
sceri@...
http://www.omniagroup.it/

AVVISO DI RISERVATEZZA
Il testo e gli eventuali documenti trasmessi contengono informazioni riservate al destinatario indicato. La seguente e-mail è confidenziale e la sua riservatezza è tutelata legalmente dalle normative vigenti. La lettura, copia od altro uso non autorizzato o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Se si ritiene di non essere il destinatario di questa mail, o se si è ricevuto questa mail per errore, si prega di darne immediata comunicazione al mittente e di provvedere immediatamente alla sua distruzione. Le dichiarazioni contenute nel presente messaggio, nonché nei suoi eventuali allegati, devono essere attribuite esclusivamente al mittente e non possono essere considerate come trasmesse o autorizzate da Omnia Software s.r.l.; le medesime dichiarazioni non impegnano Omnia Software s.r.l. nei confronti del destinatario o di terzi. Omnia Software s.r.l. non si assume alcuna responsabilità per eventuali intercettazioni, modifiche o danneggiamenti del presente messaggio e-mail.

PRIVACY NOTICE
The information contained in this transmittal, including any attachments hereto, are confidential and privileged, and intended solely for the specified addressee(s). This e-mail has a confidential nature which is protected by the Italian law. Moreover, the recipient(s) may not disclose, forward, or copy this e-mail or attachments, or any portion thereof, or permit the use of this information, by anyone not entitled to it, or in a way that may be damaging to the sender. If you are not the intended addressee, or if you receive this message by error, please notify the sender and delete this information from your computer. The statements and opinions expressed in this e-mail message are those of the author of the message and do not necessarily represent those of OMNIA SOFTWARE s.r.l. Besides, The contents of this message shall be understood as neither given nor endorsed by OMNIA SOFTWARE s.r.l.  OMNIA SOFTWARE s.r.l. does not accept liability for corruption, interception or amendment, if any, or the consequences thereof.





Re: ConcurrentModificationException on DefaultConverterManager.getConverterAssignableFrom

by tpeierls :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In the current 2.x source (and on the trunk), converters is a non-final, non-volatile field, initialized with an empty HashMap. Last time I looked at this code, I assumed that all mutative calls that affect converters (addConverter and setConverters) were confined to a single thread during servlet init, after which all access to converters was non-mutative and made during requests -- in which case, everything would be fine. (I'm taking the standard view that there is a happens-before edge between servlet init and servlet request handling.)

However, Fabio's example makes it clear that there can be mutative access to converters during request handling as a result of calls to getConverterAssignableFrom. That means all bets are off and that this is a pretty serious concurrency bug.

I think the following steps should be taken for the converters field (and other fields like it):

  • The converters field should be final.
  • The converters field should be initialized with an empty ConcurrentHashMap. For the 2.x branch, if Java 1.4 compatibility is still required, use a plain HashMap wrapped with Collections.synchronizedMap().
  • The setConverters method should be implemented as
        synchronized (this.converters) {
            this.converters.clear();
            this.converters.putAll(converters);
        }
      

I posted some rules for thread-safety that might prove useful.

davidmarginian wrote:
Fabio, I took a quick look at the latest 2.x source (which is not 2.0.2). I didn't see anything that looked alarming - I did a search online and so a few things that may indicate bugs in WebSphere but I can' confirm or deny this. Any one else have thoughts here?

RE: ConcurrentModificationException on DefaultConverterManager.getConverterAssignableFrom

by mikewse :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, I haven't noticed this before but it is pretty clear that DefaultConverterManager.getConverterAssignableFrom() mutates the converters field along the way. It caches results of previous lookups, and this happens in (after-init) run-time.
 
Btw, DWR 2.x is built against Java 1.3.
 
Fabio: would you mind adding this as a bug to our JIRA? I think we will want to fix it for 2.0.6 and 3.0RC2.
 
Best regards
Mike Wilson


From: tpeierls [mailto:tim@...]
Sent: den 23 oktober 2009 15:58
To: dev@...
Subject: Re: [dwr-dev] ConcurrentModificationException on DefaultConverterManager.getConverterAssignableFrom

In the current 2.x source (and on the trunk), converters is a non-final, non-volatile field, initialized with an empty HashMap. Last time I looked at this code, I assumed that all mutative calls that affect converters (addConverter and setConverters) were confined to a single thread during servlet init, after which all access to converters was non-mutative and made during requests -- in which case, everything would be fine. (I'm taking the standard view that there is a happens-before edge between servlet init and servlet request handling.)

However, Fabio's example makes it clear that there can be mutative access to converters during request handling as a result of calls to getConverterAssignableFrom. That means all bets are off and that this is a pretty serious concurrency bug.

I think the following steps should be taken for the converters field (and other fields like it):

  • The converters field should be final.
  • The converters field should be initialized with an empty ConcurrentHashMap. For the 2.x branch, if Java 1.4 compatibility is still required, use a plain HashMap wrapped with Collections.synchronizedMap().
  • The setConverters method should be implemented as
        synchronized (this.converters) {
            this.converters.clear();
            this.converters.putAll(converters);
        }
      

I posted some rules for thread-safety that might prove useful.

davidmarginian wrote:
Fabio, I took a quick look at the latest 2.x source (which is not 2.0.2). I didn't see anything that looked alarming - I did a search online and so a few things that may indicate bugs in WebSphere but I can' confirm or deny this. Any one else have thoughts here?


View this message in context: Re: ConcurrentModificationException on DefaultConverterManager.getConverterAssignableFrom
Sent from the DWR - Dev mailing list archive at Nabble.com.

Re: ConcurrentModificationException on DefaultConverterManager.getConverterAssignableFrom

by davidmarginian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am really surprised we haven't spotted this before.  We were wanting to push out a 2.0.6 release anyway so I will work on this and hopefully push something out early-mid next week.  

On Fri, Oct 23, 2009 at 8:31 AM, Mike Wilson <mikewse@...> wrote:
Yes, I haven't noticed this before but it is pretty clear that DefaultConverterManager.getConverterAssignableFrom() mutates the converters field along the way. It caches results of previous lookups, and this happens in (after-init) run-time.
 
Btw, DWR 2.x is built against Java 1.3.
 
Fabio: would you mind adding this as a bug to our JIRA? I think we will want to fix it for 2.0.6 and 3.0RC2.
 
Best regards
Mike Wilson


From: tpeierls [mailto:tim@...]
Sent: den 23 oktober 2009 15:58
To: dev@...
Subject: Re: [dwr-dev] ConcurrentModificationException on DefaultConverterManager.getConverterAssignableFrom

In the current 2.x source (and on the trunk), converters is a non-final, non-volatile field, initialized with an empty HashMap. Last time I looked at this code, I assumed that all mutative calls that affect converters (addConverter and setConverters) were confined to a single thread during servlet init, after which all access to converters was non-mutative and made during requests -- in which case, everything would be fine. (I'm taking the standard view that there is a happens-before edge between servlet init and servlet request handling.)

However, Fabio's example makes it clear that there can be mutative access to converters during request handling as a result of calls to getConverterAssignableFrom. That means all bets are off and that this is a pretty serious concurrency bug.

I think the following steps should be taken for the converters field (and other fields like it):

  • The converters field should be final.
  • The converters field should be initialized with an empty ConcurrentHashMap. For the 2.x branch, if Java 1.4 compatibility is still required, use a plain HashMap wrapped with Collections.synchronizedMap().
  • The setConverters method should be implemented as
        synchronized (this.converters) {
            this.converters.clear();
            this.converters.putAll(converters);
        }
      

I posted some rules for thread-safety that might prove useful.

davidmarginian wrote:
Fabio, I took a quick look at the latest 2.x source (which is not 2.0.2). I didn't see anything that looked alarming - I did a search online and so a few things that may indicate bugs in WebSphere but I can' confirm or deny this. Any one else have thoughts here?


View this message in context: Re: ConcurrentModificationException on DefaultConverterManager.getConverterAssignableFrom
Sent from the DWR - Dev mailing list archive at Nabble.com.



Re: ConcurrentModificationException on DefaultConverterManager.getConverterAssignableFrom

by tpeierls :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

And remember this is not just a 2.x issue; it's present in the trunk, too.

I'm dismayed because there are probably a zillion places where DWR has non-final, non-volatile, unguarded references to non-thread-safe objects, and now they are all called into question. I can't believe I let myself relax into thinking everything was OK. :-(

--tim

davidmarginian wrote:
I am really surprised we haven't spotted this before.  We were wanting to
push out a 2.0.6 release anyway so I will work on this and hopefully push
something out early-mid next week.

On Fri, Oct 23, 2009 at 8:31 AM, Mike Wilson <mikewse@hotmail.com> wrote:

>  Yes, I haven't noticed this before but it is pretty clear that
> DefaultConverterManager.getConverterAssignableFrom() mutates the converters
> field along the way. It caches results of previous lookups, and this happens
> in (after-init) run-time.

Re: ConcurrentModificationException on DefaultConverterManager.getConverterAssignableFrom

by davidmarginian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugs.directwebremoting.org/jira/browse/DWR-427

tpeierls wrote:

> And remember this is not just a 2.x issue; it's present in the trunk, too.
>
> I'm dismayed because there are probably a zillion places where DWR has
> non-final, non-volatile, unguarded references to non-thread-safe objects,
> and now they are all called into question. I can't believe I let myself
> relax into thinking everything was OK. :-(
>
> --tim
>
>
> davidmarginian wrote:
>  
>> I am really surprised we haven't spotted this before.  We were wanting to
>> push out a 2.0.6 release anyway so I will work on this and hopefully push
>> something out early-mid next week.
>>
>> On Fri, Oct 23, 2009 at 8:31 AM, Mike Wilson <mikewse@...> wrote:
>>
>>    
>>>  Yes, I haven't noticed this before but it is pretty clear that
>>> DefaultConverterManager.getConverterAssignableFrom() mutates the
>>> converters
>>> field along the way. It caches results of previous lookups, and this
>>> happens
>>> in (after-init) run-time.
>>>      
>
>  



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4537 (20091023) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...