Hi, I have a wierd situation. The method is syncronized and the List is also Syncronized, but I get a ConcurrentModificationException exception.
Appreciate your help. Thanks & regards, Ebe Camel Route: from("file:/vzwhome/c0sineb/work_dir/camel_proj/data/input?delete=true") //from("file:C:\\camelProject\\data\\inbox?delete=true") .log("Starting to process big file: ${header.CamelFileName}") .split(body().tokenize("\n")).streaming() .aggregate(header("CamelFileName"), new MyListAggregation()).completionSize(2000) .parallelProcessing() .executorService(threadPool) .bean(ListParser.class,"parseList") ListParser class: The line 16 in the below error log is in *Bold* public synchronized StringBuilder parseList(List<String> myList) { List<String> syncList = Collections.synchronizedList(myList); logger.info("Size of MyList : "+syncList.size()); StringBuilder result = new StringBuilder(); try{ *for(String in_str: syncList){* result.append("&").append(parseString(in_str)); } }catch(Exception ex){ logger.error("Error parsing List",ex); } return result; } For some reason I get the below error 2011-11-01 16:17:13,220 DEBUG [pool-2-thread-1] aggregate.AggregateProcessor - Processing aggregated exchange: [FAILED toString()] 2011-11-01 16:17:13,221 INFO [pool-2-thread-1] impl.DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy. 2011-11-01 16:17:13,222 DEBUG [pool-2-thread-1] management.DefaultManagementAgent - Starting JMX agent on server: com.sun.jmx.mbeanserver.JmxMBeanServer@1a1c42f 2011-11-01 16:17:13,223 INFO [pool-2-thread-1] camel.VolteListParser - Size of MyList : 2024 2011-11-01 16:17:13,223 ERROR [pool-2-thread-1] camel.VolteListParser - Error parsing List java.util.ConcurrentModificationException at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372) at java.util.AbstractList$Itr.next(AbstractList.java:343) at com.verizon.learn.camel.VolteListParser.parseVolteList(ListParser.java:16) -- View this message in context: http://camel.465427.n5.nabble.com/synchronization-issue-tp4956228p4956228.html Sent from the Camel - Users mailing list archive at Nabble.com.