Our solution usually runs with a single batch processor (that will then spawn some headless clients to do some processing). Recently I’ve added a second, separate batch processor to do another kind of work and have been occasionally getting the following error when starting the App Server:
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
at java.util.HashMap$ValueIterator.next(Unknown Source)
at com.servoy.j2db.persistence.ServerProxy.combineTables(ServerProxy.java:121)
at com.servoy.j2db.FlattenedSolution.combineServerProxies(FlattenedSolution.java:605)
at com.servoy.j2db.FlattenedSolution.setSolutionAndModules(FlattenedSolution.java:535)
at com.servoy.j2db.FlattenedSolution.setSolution(FlattenedSolution.java:501)
at com.servoy.j2db.ClientState.loadSolutionsAndModules(ClientState.java:1348)
at com.servoy.j2db.server.headlessclient.SessionClient.loadSolution(SessionClient.java:266)
at com.servoy.j2db.server.headlessclient.SessionClient.loadSolution(SessionClient.java:242)
at com.servoy.j2db.server.headlessclient.HeadlessClientFactoryInternal$1.run(HeadlessClientFactoryInternal.java:64)
at com.servoy.j2db.server.headlessclient.HeadlessClientFactoryInternal.createSessionBean(HeadlessClientFactoryInternal.java:76)
at com.servoy.j2db.server.headlessclient.HeadlessClientFactoryInternal.createHeadlessClient(HeadlessClientFactoryInternal.java:40)
at com.servoy.j2db.server.Zb.Zf.Zc(Zf.java:29)
at com.servoy.j2db.server.Zb.Ze.run(Ze.java:2)
at java.lang.Thread.run(Unknown Source)
When this happens, the original batch processor (which is the second one in the list of batch processors due to alphabetical sorting) fails to run and I can see a client with no solution loaded in the Clients area of the Administration area.
If I then kill this client, and manually start the batch processor, it appears to work correctly.