java.util.ConcurrentModificationException from spark.route.Routes
AndrewPerforce opened this issue · comments
"private List routes" in spark.route.Routes should be synchronised.
java.util.ConcurrentModificationException: null
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1010) ~[?:?]
at java.util.ArrayList$Itr.next(ArrayList.java:964) ~[?:?]
at spark.route.Routes.findTargetsForRequestedRoute(Routes.java:215) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at spark.route.Routes.findMultiple(Routes.java:99) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at spark.http.matching.BeforeFilters.execute(BeforeFilters.java:35) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at spark.http.matching.MatcherFilter.doFilter(MatcherFilter.java:133) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at spark.embeddedserver.jetty.JettyHandler.doHandle(JettyHandler.java:50) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1584) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.server.Server.handle(Server.java:501) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:135) ~[ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) [ha-core-fat.jar:PREP-TEST_ONLY]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) [ha-core-fat.jar:PREP-TEST_ONLY]
at java.lang.Thread.run(Thread.java:830) [?:?]
For people coming from the internet, to save you some time:
- It looks like official spark repo (this one) is dead
- There is an unofficial spark fork which has this bug fixed along some other ones, see Intellisrc#13
- If you don't want to use the unoficial repo then fork the oficial spark and copy over the fix from the unoficial fork then build and use it yourself