java.lang.IndexOutOfBoundsException: Index: -1, Size: 3

ZK-Tracker | emorozovs | 2 years ago
  1. 0

    Listbox with paging. If dynamically in custom renderer call row.detach(), and then on client select last row, ZK throws java.lang.NullPointerException or java.lang.IndexOutOfBoundsException. Please see example: http://zkfiddle.org/sample/1esfv0m/41-Another-new-ZK-fiddle#source-3 1) java.lang.NullPointerException at org.zkoss.zul.Listbox.setSelectedIndex(Listbox.java:929) at org.zkoss.zul.Listbox.selectItem(Listbox.java:953) at org.zkoss.zul.Listbox.service(Listbox.java:3396) at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:699) at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1193) at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:558) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:456) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:464) at javax.servlet.http.HttpServlet.service(HttpServlet.java:595) at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) .. 2) java.lang.IndexOutOfBoundsException: Index: -1, Size: 3 at java.util.ArrayList.get(ArrayList.java:352) at org.zkoss.zul.ListModelList.getElementAt(ListModelList.java:150) at org.zkoss.zul.Listbox.service(Listbox.java:3423) at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:708) at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1204) at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:601) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:483) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:492) at javax.servlet.http.HttpServlet.service(HttpServlet.java:595) at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) ...

    ZK-Tracker | 2 years ago | emorozovs
    java.lang.IndexOutOfBoundsException: Index: -1, Size: 3
  2. 0

    Listbox with paging. If dynamically in custom renderer call row.detach(), and then on client select last row, ZK throws java.lang.NullPointerException or java.lang.IndexOutOfBoundsException. Please see example: http://zkfiddle.org/sample/1esfv0m/41-Another-new-ZK-fiddle#source-3 1) java.lang.NullPointerException at org.zkoss.zul.Listbox.setSelectedIndex(Listbox.java:929) at org.zkoss.zul.Listbox.selectItem(Listbox.java:953) at org.zkoss.zul.Listbox.service(Listbox.java:3396) at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:699) at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1193) at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:558) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:456) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:464) at javax.servlet.http.HttpServlet.service(HttpServlet.java:595) at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) .. 2) java.lang.IndexOutOfBoundsException: Index: -1, Size: 3 at java.util.ArrayList.get(ArrayList.java:352) at org.zkoss.zul.ListModelList.getElementAt(ListModelList.java:150) at org.zkoss.zul.Listbox.service(Listbox.java:3423) at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:708) at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1204) at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:601) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:483) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:492) at javax.servlet.http.HttpServlet.service(HttpServlet.java:595) at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) ...

    ZK-Tracker | 2 years ago | emorozovs
    java.lang.IndexOutOfBoundsException: Index: -1, Size: 3
  3. 0

    Pdfbox throws multiple exception in linux but works fine on windows 7

    Stack Overflow | 2 years ago | Vinayak Agrawal
    java.lang.IndexOutOfBoundsException: Index: 2, Size: 0
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to submit a series of data in jsp back to an arrayList in an action form?

    Stack Overflow | 3 years ago | dunfa
    java.lang.IndexOutOfBoundsException: Index: 3, Size: 3

  1. bmacedo 4 times, last 12 hours ago
  2. mhicauber 1 times, last 16 hours ago
  3. filpgame 2 times, last 4 days ago
  4. tvrmsmith 1 times, last 5 days ago
  5. Indri Yunita 12 times, last 5 days ago
67 more registered users
28 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IndexOutOfBoundsException

    Index: -1, Size: 3

    at java.util.ArrayList.get()
  2. Java RT
    ArrayList.get
    1. java.util.ArrayList.get(ArrayList.java:352)
    1 frame
  3. ZK XUL Components
    Listbox.service
    1. org.zkoss.zul.ListModelList.getElementAt(ListModelList.java:150)
    2. org.zkoss.zul.Listbox.service(Listbox.java:3423)
    2 frames
  4. ZK Kernel
    DHtmlUpdateServlet.doPost
    1. org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:708)
    2. org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1204)
    3. org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:601)
    4. org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:483)
    5. org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:492)
    5 frames
  5. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
    2. javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    2 frames