Dispatch throws a ConcurrentModificationException when parsing xml. It does not matter if I use
thread.Safety or not: val http = new dispatch.Http() with NoLogging with thread.Safety ( http( get <> { _ \\ "result" } ) \\ "doc" \\ "str" ).text caught javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.util.ConcurrentModificationException javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.util.ConcurrentModificationException at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:134) at scala.xml.factory.XMLLoader$class.parser(XMLLoader.scala:28) at scala.xml.XML$.parser(XML.scala:40) at scala.xml.factory.XMLLoader$class.load(XMLLoader.scala:53) at scala.xml.XML$.load(XML.scala:40) at dispatch.HandlerVerbs$$anonfun$$less$greater$1.apply(handlers.scala:88) at dispatch.HandlerVerbs$$anonfun$$less$greater$1.apply(handlers.scala:87) at dispatch.HandlerVerbs$$anonfun$$greater$greater$tilde$1.apply(handlers.scala:82) at dispatch.HandlerVerbs$$anonfun$$greater$greater$tilde$1.apply(handlers.scala:81) at dispatch.HandlerVerbs$$anonfun$$greater$greater$1.apply(handlers.scala:63) at dispatch.HandlerVerbs$$anonfun$$greater$greater$1.apply(handlers.scala:53) at dispatch.Handler$$anonfun$apply$3.apply(handlers.scala:36) at dispatch.Handler$$anonfun$apply$3.apply(handlers.scala:35) at dispatch.HttpExecutor$$anonfun$when$1.apply(executor.scala:51) at dispatch.HttpExecutor$$anonfun$when$1.apply(executor.scala:50) at dispatch.HttpExecutor$$anonfun$x$2.apply(executor.scala:41) at dispatch.HttpExecutor$$anonfun$x$2.apply(executor.scala:36) at dispatch.BlockingHttp$$anonfun$execute$1.apply(Http.scala:54) at dispatch.Http.pack(Http.scala:25) at dispatch.BlockingHttp$class.execute(Http.scala:53) at dispatch.Http.execute(Http.scala:21) at dispatch.HttpExecutor$class.x(executor.scala:36) at dispatch.Http.x(Http.scala:21) at dispatch.HttpExecutor$class.when(executor.scala:50) at dispatch.Http.when(Http.scala:21) at dispatch.HttpExecutor$class.apply(executor.scala:60) at dispatch.Http.apply(Http.scala:21) at indexer.Indexer$.getLastIndexedRev(Indexer.scala:92) at indexer.SVNMapper$.map(SVNMapper.scala:22) at indexer.IndexThread$.callMapper(IndexThread.scala:36) at indexer.IndexThread$$anonfun$act$2$$anonfun$apply$mcV$sp$1.apply(IndexThread.scala:28) at indexer.IndexThread$$anonfun$act$2$$anonfun$apply$mcV$sp$1.apply(IndexThread.scala:27) at scala.actors.Actor$class.receive(Actor.scala:524) at indexer.IndexThread$.receive(IndexThread.scala:21) at indexer.IndexThread$$anonfun$act$2.apply$mcV$sp(IndexThread.scala:27) at indexer.IndexThread$$anonfun$act$2.apply(IndexThread.scala:27) at indexer.IndexThread$$anonfun$act$2.apply(IndexThread.scala:27) at scala.actors.Reactor$class.seq(Reactor.scala:280) at indexer.IndexThread$.seq(IndexThread.scala:21) at scala.actors.Reactor$$anon$3.andThen(Reactor.scala:258) at scala.actors.Combinators$class.loop(Combinators.scala:26) at indexer.IndexThread$.loop(IndexThread.scala:21) at scala.actors.Combinators$$anonfun$loop$1.apply(Combinators.scala:26) at scala.actors.Combinators$$anonfun$loop$1.apply(Combinators.scala:26) at scala.actors.Reactor$$anonfun$seq$1$$anonfun$apply$1.apply(Reactor.scala:277) at scala.actors.ReactorTask.run(ReactorTask.scala:34) at scala.actors.ReactorTask.compute(ReactorTask.scala:66) at scala.concurrent.forkjoin.RecursiveAction.exec(RecursiveAction.java:147) at scala.concurrent.forkjoin.ForkJoinTask.quietlyExec(ForkJoinTask.java:422) at scala.concurrent.forkjoin.ForkJoinWorkerThread.mainLoop(ForkJoinWorkerThread.java:340) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:325) Wondering what might cause this behaviour? |
Administrator
|
Okay, sounds like it is sharing an object that isn't thread safe.
Could you open an issue for it?
https://github.com/n8han/databinder-dispatch/issues Nathan On 07/07/2011 01:03 PM, getagrip [via Databinder] wrote: Dispatch throws a ConcurrentModificationException when parsing xml. It does not matter if I use |
Free forum by Nabble | Edit this page |