HTTP Status 500 - Request processing failed; nested exception is java.util.ConcurrentModificationException

HTTP Status 500 - Request processing failed; nested exception is java.util.ConcurrentModificationException

 这个错误的发生是你在遍历集合的时候,你对集合进行了一些add或者remove的操作

例如

 List<Map<String, Object>> list = ebdTjSjzsDao.getListData(querySql);

for (Map<String, Object> map : list) {

  Map<String, Object> mapTemp = new HashMap<String, Object>();

  //这行代码是错误的,会抛出异常

  list.add(mapTemp);

}

posted @ 2019-01-14 17:31  wjj1013  阅读(1697)  评论(0编辑  收藏  举报