任何人都可以解决这个问题,我正在接受
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
2014-05-23 10:33:18,635 [http-8080-1] ERROR (SearchSMFController.java:120) Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(Unknown Source)``
at java.util.ArrayList.get(Unknown Source)
at java.util.Collections.swap(Unknown Source)
at com.hbc.vp.services.SMFService.getUpdatedBannersList(SMFService.java:609)
at com.hbc.vp.services.SMFService.getBannerList(SMFService.java:582)
at com.hbc.vp.controllers.SearchSMFController.setUpForm(SearchSMFController.java:113)
at line java:120 ==LOGGER.error(exception.getMessage(), exception);
at line==Collections.swap(saksBannersList, 0, 1);
at line==return getUpdatedBannersList(bannersListModified);
at line==smfForm.setBannersLst(smfService.getBannerList());
答案 0 :(得分:0)
错误在于您访问列表的逻辑。您的列表可能为空,然后您强制从列表中获取内容。即(list.get(0))
检查代码的这一部分。
at com.hbc.vp.services.SMFService.getUpdatedBannersList(SMFService.java:609)