2014-05-23 5 views
-1

quelqu'un peut-il résoudre ce problème, je suis en train dejava.lang.IndexOutOfBoundsException: Index: 0, Taille: 0,, ERROR (SearchSMFController.java:120) Index: 0, Taille: 0

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()); 
+1

Veuillez écrire le code – LMK

+0

La liste est vide. –

+0

semble que 'saksBannersList' est vide.Veuillez publier le code où vous manipulez' saksBannersList' – Rohan

Répondre

0

Le erreur est dans votre logique d'accès à la liste. Votre liste peut être vide, alors vous êtes obligé d'obtenir quelque chose de la liste. i.e (list.get (0))

Cochez cette partie de votre code.

at com.hbc.vp.services.SMFService.getUpdatedBannersList(SMFService.java:609) 
Questions connexes