java.lang.IndexOutOfBoundsException: Index: 1, Size: 0

ZK-Tracker | dsised | 4 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Try this (source code below TestModel.java and test.zul) : - Click on first line (ENGLISH) - On the list box, select FRANCAIS - Click OK : you w'll encounter an excpmtion CAUTION : - It's working with ZK 6.0.0, 6.0.1 - Since ZK 6.0.2 this sample below is not working Exception: {code} juil. 31, 2013 4:31:56 PM org.zkoss.zk.ui.impl.UiEngineImpl handleError:1359 SEVERE: >>java.lang.IndexOutOfBoundsException: Index: 1, Size: 0 >> at org.zkoss.zk.ui.AbstractComponent$ChildIter.<init>(AbstractComponent.java:2848) >> at org.zkoss.zk.ui.AbstractComponent$ChildIter.<init>(AbstractComponent.java:2840) >> at org.zkoss.zk.ui.AbstractComponent$Children.listIterator(AbstractComponent.java:185) >> at java.util.AbstractSequentialList.get(AbstractSequentialList.java:88) >> at org.zkoss.zul.Combobox.getItemAtIndex(Combobox.java:614) >> at org.zkoss.zkplus.databind.ComboitemCollectionItem.getComponentAtIndexByOwner(ComboitemCollectionItem.java:56) >> at org.zkoss.zkplus.databind.DataBinder.getCollectionItems(DataBinder.java:810) >> at org.zkoss.zkplus.databind.DataBinder.access$200(DataBinder.java:66) >> at org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.loadAllBindings(DataBinder.java:1557) >> at org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.myLoadAllNodes(DataBinder.java:1481) >> at org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.myLoadAllNodes(DataBinder.java:1511) >> at org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.loadAllNodes(DataBinder.java:1439) >> at org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.doLoad(DataBinder.java:1428) >> at org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.onEvent(DataBinder.java:1405) >> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2742) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2713) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2654) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) >> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1717) >> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1502) >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1212) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:600) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:482) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:491) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >> at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:180) >> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >> at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) >> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >> at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) >> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) >> at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) >> at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) >> at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) >> at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) >> at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) >> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) >> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) >> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) >> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) >> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936) >> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) >> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) >> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004) >> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) >> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) >> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) >> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) >> at java.lang.Thread.run(Thread.java:724) {code} test.zul : {code} <?page title="new page title" contentType="text/html;charset=UTF-8"?> <?meta http-equiv="X-UA-Compatible" content="chrome=1"?> <zk> <window id="test" apply="nc.mairie.temp.TestModel"> <div id="windowListWord"> <listbox id="listBoxWord" model="@{test.listWord}" selectedItem="@{test.currentWord}" width="500px"> <listhead> <listheader label="word" /> <listheader label="lang" /> <listheader label="fullName" /> </listhead> <listitem self="@{each=word}"> <listcell label="@{word.word}" /> <listcell label="@{word.lang.language}" /> <listcell label="@{word.fullName}" /> </listitem> </listbox> </div> <div id="detailWord" visible="@{test.visible}"> <grid width="400px"> <rows> <row> First Name: <textbox id="firstName" value="@{test.currentWord.word, save-when='btnOk.onClick'}" /> </row> <row> Lang: <combobox mold="rounded" model="@{test.listLang}" selectedItem="@{test.currentWord.lang, save-when='btnOk.onClick'}"> <comboitem self="@{each=lang}" label="@{lang.language}" /> </combobox> </row> <row> Full Name: <label id="fullName" value="@{test.currentWord.fullName}" /> </row> <row> <button id="btnOk" label="Ok" /> </row> </rows> </grid> </div> </window> </zk> {code} TestModel.jave: {code} /** * */ package nc.mairie.temp; import java.util.ArrayList; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.select.SelectorComposer; import org.zkoss.zk.ui.select.annotation.Listen; import org.zkoss.zk.ui.select.annotation.Wire; import org.zkoss.zkplus.databind.AnnotateDataBinder; import org.zkoss.zul.Div; import org.zkoss.zul.Window; /** * @author boulu72 * */ public class TestModel extends SelectorComposer<Component> { /** * */ private static final long serialVersionUID = -8608406922690897596L; AnnotateDataBinder binder; ArrayList<Word> listWord; public ArrayList<Word> getListWord() { return listWord; } ArrayList <Lang> listLang = new ArrayList<Lang>(); public ArrayList<Lang> getListLang () { return listLang; } public static class Lang { String name; String language; Lang(String name, String language) { this.name = name; this.language = language; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getLanguage() { return language; } public void setLanguage(String language) { this.language = language; } } Word currentWord; public static class Word { String word; Lang lang; Word(String word, Lang lang) { this.word = word; this.lang = lang; } public String getWord() { return word; } public void setWord(String word) { this.word = word; } public Lang getLang() { return lang; } public void setLang(Lang lang) { this.lang=lang; } public String getFullName () { return getWord() + " "+ getLang().getLanguage(); } } boolean visible = false; public Word getCurrentWord(){ return currentWord; } public void setCurrentWord(Word word){ this.currentWord= word; } public boolean isVisible() { return visible; } @Wire Div detailWord; @Wire Window test; @Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); Lang l1 = new Lang("eng","ENGLISH"); Lang l2 = new Lang("fr","FRANCAIS"); listLang.add(l1); listLang.add(l2); Word p1 = new Word("Hello", listLang.get(0)); Word p2 = new Word("Coucou", listLang.get(1)); listWord = new ArrayList<Word>(); listWord.add(p1); listWord.add(p2); comp.setAttribute(comp.getId(), this, true); binder = new AnnotateDataBinder(comp); System.out.println(binder.isLoadOnSave()); //OBLIGE DE METTRE à FALSE pour ne pas avoir le bug de save-whn... pas terrible //binder.setLoadOnSave(false); binder.loadAll(); } @Listen("onClick = #listBoxWord;") public void onClick$listBoxWord() { visible = true; binder.loadComponent(detailWord); } @Listen("onClick = #btnOk;") public void onClick$btnOk() { //visible = false; //OBLIGE DE raffraichir TOUTE la fenêtre car loadOnSave est à faux :( binder.loadComponent(test); //binder.loadComponent(detailWord); } } {code}

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

    Try this (source code below TestModel.java and test.zul) : - Click on first line (ENGLISH) - On the list box, select FRANCAIS - Click OK : you w'll encounter an excpmtion CAUTION : - It's working with ZK 6.0.0, 6.0.1 - Since ZK 6.0.2 this sample below is not working Exception: {code} juil. 31, 2013 4:31:56 PM org.zkoss.zk.ui.impl.UiEngineImpl handleError:1359 SEVERE: >>java.lang.IndexOutOfBoundsException: Index: 1, Size: 0 >> at org.zkoss.zk.ui.AbstractComponent$ChildIter.<init>(AbstractComponent.java:2848) >> at org.zkoss.zk.ui.AbstractComponent$ChildIter.<init>(AbstractComponent.java:2840) >> at org.zkoss.zk.ui.AbstractComponent$Children.listIterator(AbstractComponent.java:185) >> at java.util.AbstractSequentialList.get(AbstractSequentialList.java:88) >> at org.zkoss.zul.Combobox.getItemAtIndex(Combobox.java:614) >> at org.zkoss.zkplus.databind.ComboitemCollectionItem.getComponentAtIndexByOwner(ComboitemCollectionItem.java:56) >> at org.zkoss.zkplus.databind.DataBinder.getCollectionItems(DataBinder.java:810) >> at org.zkoss.zkplus.databind.DataBinder.access$200(DataBinder.java:66) >> at org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.loadAllBindings(DataBinder.java:1557) >> at org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.myLoadAllNodes(DataBinder.java:1481) >> at org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.myLoadAllNodes(DataBinder.java:1511) >> at org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.loadAllNodes(DataBinder.java:1439) >> at org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.doLoad(DataBinder.java:1428) >> at org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.onEvent(DataBinder.java:1405) >> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2742) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2713) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2654) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) >> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1717) >> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1502) >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1212) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:600) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:482) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:491) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >> at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:180) >> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >> at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) >> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >> at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) >> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) >> at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) >> at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) >> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) >> at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) >> at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) >> at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) >> at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) >> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) >> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) >> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) >> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) >> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936) >> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) >> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) >> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004) >> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) >> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) >> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) >> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) >> at java.lang.Thread.run(Thread.java:724) {code} test.zul : {code} <?page title="new page title" contentType="text/html;charset=UTF-8"?> <?meta http-equiv="X-UA-Compatible" content="chrome=1"?> <zk> <window id="test" apply="nc.mairie.temp.TestModel"> <div id="windowListWord"> <listbox id="listBoxWord" model="@{test.listWord}" selectedItem="@{test.currentWord}" width="500px"> <listhead> <listheader label="word" /> <listheader label="lang" /> <listheader label="fullName" /> </listhead> <listitem self="@{each=word}"> <listcell label="@{word.word}" /> <listcell label="@{word.lang.language}" /> <listcell label="@{word.fullName}" /> </listitem> </listbox> </div> <div id="detailWord" visible="@{test.visible}"> <grid width="400px"> <rows> <row> First Name: <textbox id="firstName" value="@{test.currentWord.word, save-when='btnOk.onClick'}" /> </row> <row> Lang: <combobox mold="rounded" model="@{test.listLang}" selectedItem="@{test.currentWord.lang, save-when='btnOk.onClick'}"> <comboitem self="@{each=lang}" label="@{lang.language}" /> </combobox> </row> <row> Full Name: <label id="fullName" value="@{test.currentWord.fullName}" /> </row> <row> <button id="btnOk" label="Ok" /> </row> </rows> </grid> </div> </window> </zk> {code} TestModel.jave: {code} /** * */ package nc.mairie.temp; import java.util.ArrayList; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.select.SelectorComposer; import org.zkoss.zk.ui.select.annotation.Listen; import org.zkoss.zk.ui.select.annotation.Wire; import org.zkoss.zkplus.databind.AnnotateDataBinder; import org.zkoss.zul.Div; import org.zkoss.zul.Window; /** * @author boulu72 * */ public class TestModel extends SelectorComposer<Component> { /** * */ private static final long serialVersionUID = -8608406922690897596L; AnnotateDataBinder binder; ArrayList<Word> listWord; public ArrayList<Word> getListWord() { return listWord; } ArrayList <Lang> listLang = new ArrayList<Lang>(); public ArrayList<Lang> getListLang () { return listLang; } public static class Lang { String name; String language; Lang(String name, String language) { this.name = name; this.language = language; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getLanguage() { return language; } public void setLanguage(String language) { this.language = language; } } Word currentWord; public static class Word { String word; Lang lang; Word(String word, Lang lang) { this.word = word; this.lang = lang; } public String getWord() { return word; } public void setWord(String word) { this.word = word; } public Lang getLang() { return lang; } public void setLang(Lang lang) { this.lang=lang; } public String getFullName () { return getWord() + " "+ getLang().getLanguage(); } } boolean visible = false; public Word getCurrentWord(){ return currentWord; } public void setCurrentWord(Word word){ this.currentWord= word; } public boolean isVisible() { return visible; } @Wire Div detailWord; @Wire Window test; @Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); Lang l1 = new Lang("eng","ENGLISH"); Lang l2 = new Lang("fr","FRANCAIS"); listLang.add(l1); listLang.add(l2); Word p1 = new Word("Hello", listLang.get(0)); Word p2 = new Word("Coucou", listLang.get(1)); listWord = new ArrayList<Word>(); listWord.add(p1); listWord.add(p2); comp.setAttribute(comp.getId(), this, true); binder = new AnnotateDataBinder(comp); System.out.println(binder.isLoadOnSave()); //OBLIGE DE METTRE à FALSE pour ne pas avoir le bug de save-whn... pas terrible //binder.setLoadOnSave(false); binder.loadAll(); } @Listen("onClick = #listBoxWord;") public void onClick$listBoxWord() { visible = true; binder.loadComponent(detailWord); } @Listen("onClick = #btnOk;") public void onClick$btnOk() { //visible = false; //OBLIGE DE raffraichir TOUTE la fenêtre car loadOnSave est à faux :( binder.loadComponent(test); //binder.loadComponent(detailWord); } } {code}

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

    <tabbox sclass="yw-editor-area-properties-tab" selectedIndex="@bind(model.selectedTab)" > <tabs children="@load(model.tabs)"> <template name="children" var="tab"> <tab label="@load(tab.name)" sclass="yw-editor-area-properties-tab"/> </template> </tabs> <tabpanels children="@load(model.tabs) @template(each.wigetTab?'widget':'tab')"> <template name="widget" var="tab"> <tabpanel> <widgetslot slotID="${tab.slotId}" height="100%"/> </tabpanel> </template> <template name="tab" var="tab"> <tabpanel children="@load(tab.sections) @template('children')" sclass="yw-editor-area-properties-tab-content"> <template name="children" var="section"> <vlayout> <groupbox open="@bind(section.opened)"> <caption sclass="@load(section.opened ? 'yw-editor-area-section-open' : 'yw-editor-area-section-closed')"> <label value="@load(section.name)" sclass="yw-editor-area-section-label"/> </caption> <div children="@load(section.fields) @template('children')"> <template name="children" var="field"> <hlayout sclass="@load(field.changed?'yw-attribute-container-valchanged' : 'yw-attribute-container')" > <label value="@load(field.name)" sclass="yw-attribute-label"/> <editor property="${field.property}" onValueChanged="@command('valChanged', fieldName=field.qualifier)"/> </hlayout> </template> </div> </groupbox> </vlayout> </template> </tabpanel> </template> </tabpanels> </tabbox> I recive SEVERE: >>org.zkoss.zel.ELException: Error writing 'selectedIndex' on type org.zkoss.zul.Tabbox >>java.lang.IndexOutOfBoundsException: Index: 1, Size: 0 >> at org.zkoss.zk.ui.AbstractComponent$ChildIter.<init>(AbstractComponent.java:2842) >> at org.zkoss.zk.ui.AbstractComponent$ChildIter.<init>(AbstractComponent.java:2834) >> at org.zkoss.zk.ui.AbstractComponent$Children.listIterator(AbstractComponent.java:185) >> at java.util.AbstractSequentialList.get(Unknown Source) >> at org.zkoss.zul.Tabbox.setSelectedIndex(Tabbox.java:163) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >> at java.lang.reflect.Method.invoke(Unknown Source) >> at org.zkoss.zel.BeanELResolver.setValue(BeanELResolver.java:139) >> at org.zkoss.zel.CompositeELResolver.setValue(CompositeELResolver.java:83) >> at org.zkoss.zel.CompositeELResolver.setValue(CompositeELResolver.java:83) >> at org.zkoss.xel.zel.XelELResolver.setValue(XelELResolver.java:114) >> at org.zkoss.bind.xel.zel.BindELResolver.setValue(BindELResolver.java:102) >> at org.zkoss.zel.impl.parser.AstValue.setValue(AstValue.java:215) >> at org.zkoss.zel.impl.ValueExpressionImpl.setValue(ValueExpressionImpl.java:256) >> at org.zkoss.xel.zel.ELXelExpression.setValue(ELXelExpression.java:50) >> at org.zkoss.bind.impl.BindEvaluatorXImpl.setValue(BindEvaluatorXImpl.java:50) >> at org.zkoss.bind.impl.LoadPropertyBindingImpl.load(LoadPropertyBindingImpl.java:81) >> at org.zkoss.bind.impl.PropertyBindingHandler.doLoadBinding(PropertyBindingHandler.java:171) >> at org.zkoss.bind.impl.PropertyBindingHandler.doLoad(PropertyBindingHandler.java:372) >> at org.zkoss.bind.impl.BinderImpl.loadComponentProperties(BinderImpl.java:1865) >> at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1847) >> at org.zkoss.bind.tracker.impl.BindUiLifeCycle$1.onEvent(BindUiLifeCycle.java:63) >> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2736) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2685) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2648) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) >> at org.zkoss.zk.ui.event.Events.sendEvent(Events.java:308) >> at org.zkoss.zk.ui.event.Events.sendEvent(Events.java:331) >> at org.zkoss.bind.impl.BindChildRenderer.render(BindChildRenderer.java:98) >> at org.zkoss.bind.impl.LoadChildrenBindingImpl.load(LoadChildrenBindingImpl.java:89) >> at org.zkoss.bind.impl.BinderImpl.loadOnPropertyChange(BinderImpl.java:382) >> at org.zkoss.bind.impl.BinderImpl.access$100(BinderImpl.java:94) >> at org.zkoss.bind.impl.BinderImpl$QueueListener.onEvent(BinderImpl.java:236) >> at org.zkoss.zk.ui.event.impl.DesktopEventQueue$QueueListener.onEvent(DesktopEventQueue.java:145) >> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2736) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2707) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2648) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) >> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1702) >> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1487) >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1204) >> 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:637) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:167) >> at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) >> at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83) >> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> at de.hybris.platform.servicelayer.web.PlatformFilterChain$InternalFilterChain.doFilter(PlatformFilterChain.java:203) >> at de.hybris.platform.servicelayer.web.DynamicCatalogVersionActivationFilter.doFilter(DynamicCatalogVersionActivationFilter.java:93) >> at de.hybris.platform.servicelayer.web.DynamicCatalogVersionActivationFilter$$FastClassByCGLIB$$2d468805.invoke(<generated>) >> at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) >> at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) >> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) >> at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) >> at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) >> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) >> at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) >> at de.hybris.platform.servicelayer.web.DynamicCatalogVersionActivationFilter$$EnhancerByCGLIB$$2fd96096.doFilter(<generated>) >> at de.hybris.platform.servicelayer.web.PlatformFilterChain$InternalFilterChain.doFilter(PlatformFilterChain.java:175) >> at de.hybris.platform.servicelayer.web.DataSourceSwitchingFilter.doFilter(DataSourceSwitchingFilter.java:73) >> at de.hybris.platform.servicelayer.web.PlatformFilterChain$InternalFilterChain.doFilter(PlatformFilterChain.java:175) >> at de.hybris.platform.servicelayer.web.SessionFilter.doFilter(SessionFilter.java:80) >> at de.hybris.platform.servicelayer.web.SessionFilter$$FastClassByCGLIB$$bb4593c7.invoke(<generated>) >> at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) >> at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) >> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) >> at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) >> at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) >> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) >> at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) >> at de.hybris.platform.servicelayer.web.SessionFilter$$EnhancerByCGLIB$$f1ba89d8.doFilter(<generated>) >> at de.hybris.platform.servicelayer.web.PlatformFilterChain$InternalFilterChain.doFilter(PlatformFilterChain.java:175) >> at de.hybris.platform.servicelayer.web.RedirectWhenSystemIsNotInitializedFilter.doFilter(RedirectWhenSystemIsNotInitializedFilter.java:85) >> at de.hybris.platform.servicelayer.web.PlatformFilterChain$InternalFilterChain.doFilter(PlatformFilterChain.java:175) >> at de.hybris.platform.servicelayer.web.DynamicTenantSwitchingFilter.doFilterInternal(DynamicTenantSwitchingFilter.java:68) >> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) >> at de.hybris.platform.servicelayer.web.PlatformFilterChain$InternalFilterChain.doFilter(PlatformFilterChain.java:175) >> at de.hybris.platform.servicelayer.web.Log4JFilter.doFilter(Log4JFilter.java:47) >> at de.hybris.platform.servicelayer.web.PlatformFilterChain$InternalFilterChain.doFilter(PlatformFilterChain.java:175) >> at de.hybris.platform.servicelayer.web.PlatformFilterChain.doFilterInternal(PlatformFilterChain.java:134) >> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) >> at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) >> at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) >> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) >> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) >> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) >> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) >> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615) >> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) >> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) >> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) >> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:396) >> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) >> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) >> at java.lang.Thread.run(Unknown Source)

    ZK-Tracker | 5 years ago | abalwierz
    java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    <tabbox sclass="yw-editor-area-properties-tab" selectedIndex="@bind(model.selectedTab)" > <tabs children="@load(model.tabs)"> <template name="children" var="tab"> <tab label="@load(tab.name)" sclass="yw-editor-area-properties-tab"/> </template> </tabs> <tabpanels children="@load(model.tabs) @template(each.wigetTab?'widget':'tab')"> <template name="widget" var="tab"> <tabpanel> <widgetslot slotID="${tab.slotId}" height="100%"/> </tabpanel> </template> <template name="tab" var="tab"> <tabpanel children="@load(tab.sections) @template('children')" sclass="yw-editor-area-properties-tab-content"> <template name="children" var="section"> <vlayout> <groupbox open="@bind(section.opened)"> <caption sclass="@load(section.opened ? 'yw-editor-area-section-open' : 'yw-editor-area-section-closed')"> <label value="@load(section.name)" sclass="yw-editor-area-section-label"/> </caption> <div children="@load(section.fields) @template('children')"> <template name="children" var="field"> <hlayout sclass="@load(field.changed?'yw-attribute-container-valchanged' : 'yw-attribute-container')" > <label value="@load(field.name)" sclass="yw-attribute-label"/> <editor property="${field.property}" onValueChanged="@command('valChanged', fieldName=field.qualifier)"/> </hlayout> </template> </div> </groupbox> </vlayout> </template> </tabpanel> </template> </tabpanels> </tabbox> I recive SEVERE: >>org.zkoss.zel.ELException: Error writing 'selectedIndex' on type org.zkoss.zul.Tabbox >>java.lang.IndexOutOfBoundsException: Index: 1, Size: 0 >> at org.zkoss.zk.ui.AbstractComponent$ChildIter.<init>(AbstractComponent.java:2842) >> at org.zkoss.zk.ui.AbstractComponent$ChildIter.<init>(AbstractComponent.java:2834) >> at org.zkoss.zk.ui.AbstractComponent$Children.listIterator(AbstractComponent.java:185) >> at java.util.AbstractSequentialList.get(Unknown Source) >> at org.zkoss.zul.Tabbox.setSelectedIndex(Tabbox.java:163) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >> at java.lang.reflect.Method.invoke(Unknown Source) >> at org.zkoss.zel.BeanELResolver.setValue(BeanELResolver.java:139) >> at org.zkoss.zel.CompositeELResolver.setValue(CompositeELResolver.java:83) >> at org.zkoss.zel.CompositeELResolver.setValue(CompositeELResolver.java:83) >> at org.zkoss.xel.zel.XelELResolver.setValue(XelELResolver.java:114) >> at org.zkoss.bind.xel.zel.BindELResolver.setValue(BindELResolver.java:102) >> at org.zkoss.zel.impl.parser.AstValue.setValue(AstValue.java:215) >> at org.zkoss.zel.impl.ValueExpressionImpl.setValue(ValueExpressionImpl.java:256) >> at org.zkoss.xel.zel.ELXelExpression.setValue(ELXelExpression.java:50) >> at org.zkoss.bind.impl.BindEvaluatorXImpl.setValue(BindEvaluatorXImpl.java:50) >> at org.zkoss.bind.impl.LoadPropertyBindingImpl.load(LoadPropertyBindingImpl.java:81) >> at org.zkoss.bind.impl.PropertyBindingHandler.doLoadBinding(PropertyBindingHandler.java:171) >> at org.zkoss.bind.impl.PropertyBindingHandler.doLoad(PropertyBindingHandler.java:372) >> at org.zkoss.bind.impl.BinderImpl.loadComponentProperties(BinderImpl.java:1865) >> at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1847) >> at org.zkoss.bind.tracker.impl.BindUiLifeCycle$1.onEvent(BindUiLifeCycle.java:63) >> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2736) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2685) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2648) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) >> at org.zkoss.zk.ui.event.Events.sendEvent(Events.java:308) >> at org.zkoss.zk.ui.event.Events.sendEvent(Events.java:331) >> at org.zkoss.bind.impl.BindChildRenderer.render(BindChildRenderer.java:98) >> at org.zkoss.bind.impl.LoadChildrenBindingImpl.load(LoadChildrenBindingImpl.java:89) >> at org.zkoss.bind.impl.BinderImpl.loadOnPropertyChange(BinderImpl.java:382) >> at org.zkoss.bind.impl.BinderImpl.access$100(BinderImpl.java:94) >> at org.zkoss.bind.impl.BinderImpl$QueueListener.onEvent(BinderImpl.java:236) >> at org.zkoss.zk.ui.event.impl.DesktopEventQueue$QueueListener.onEvent(DesktopEventQueue.java:145) >> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2736) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2707) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2648) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) >> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1702) >> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1487) >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1204) >> 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:637) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:167) >> at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) >> at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83) >> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> at de.hybris.platform.servicelayer.web.PlatformFilterChain$InternalFilterChain.doFilter(PlatformFilterChain.java:203) >> at de.hybris.platform.servicelayer.web.DynamicCatalogVersionActivationFilter.doFilter(DynamicCatalogVersionActivationFilter.java:93) >> at de.hybris.platform.servicelayer.web.DynamicCatalogVersionActivationFilter$$FastClassByCGLIB$$2d468805.invoke(<generated>) >> at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) >> at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) >> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) >> at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) >> at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) >> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) >> at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) >> at de.hybris.platform.servicelayer.web.DynamicCatalogVersionActivationFilter$$EnhancerByCGLIB$$2fd96096.doFilter(<generated>) >> at de.hybris.platform.servicelayer.web.PlatformFilterChain$InternalFilterChain.doFilter(PlatformFilterChain.java:175) >> at de.hybris.platform.servicelayer.web.DataSourceSwitchingFilter.doFilter(DataSourceSwitchingFilter.java:73) >> at de.hybris.platform.servicelayer.web.PlatformFilterChain$InternalFilterChain.doFilter(PlatformFilterChain.java:175) >> at de.hybris.platform.servicelayer.web.SessionFilter.doFilter(SessionFilter.java:80) >> at de.hybris.platform.servicelayer.web.SessionFilter$$FastClassByCGLIB$$bb4593c7.invoke(<generated>) >> at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) >> at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) >> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) >> at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) >> at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) >> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) >> at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) >> at de.hybris.platform.servicelayer.web.SessionFilter$$EnhancerByCGLIB$$f1ba89d8.doFilter(<generated>) >> at de.hybris.platform.servicelayer.web.PlatformFilterChain$InternalFilterChain.doFilter(PlatformFilterChain.java:175) >> at de.hybris.platform.servicelayer.web.RedirectWhenSystemIsNotInitializedFilter.doFilter(RedirectWhenSystemIsNotInitializedFilter.java:85) >> at de.hybris.platform.servicelayer.web.PlatformFilterChain$InternalFilterChain.doFilter(PlatformFilterChain.java:175) >> at de.hybris.platform.servicelayer.web.DynamicTenantSwitchingFilter.doFilterInternal(DynamicTenantSwitchingFilter.java:68) >> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) >> at de.hybris.platform.servicelayer.web.PlatformFilterChain$InternalFilterChain.doFilter(PlatformFilterChain.java:175) >> at de.hybris.platform.servicelayer.web.Log4JFilter.doFilter(Log4JFilter.java:47) >> at de.hybris.platform.servicelayer.web.PlatformFilterChain$InternalFilterChain.doFilter(PlatformFilterChain.java:175) >> at de.hybris.platform.servicelayer.web.PlatformFilterChain.doFilterInternal(PlatformFilterChain.java:134) >> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) >> at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) >> at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) >> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) >> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) >> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) >> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) >> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615) >> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) >> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) >> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) >> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:396) >> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) >> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) >> at java.lang.Thread.run(Unknown Source)

    ZK-Tracker | 5 years ago | abalwierz
    java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
  6. 0

    "Mcconvert experience" generates an out of bounds exception

    GitHub | 1 year ago | BornToDoStuff
    java.lang.IndexOutOfBoundsException: Index: 0 04.03 20:52:58 [Server] WARN [mcMMO] Task #447 for mcMMO v1.5.04-SNAPSHOT-b92 generated an exception **command used:** /mcconvert experience exponential The variable Exp_Modifier was set to 2.875 ingame there is a message given: Starting conversion from UNKNOWN to EXPONENTIAL converting to LINEAR was also tried but it appears that it is unable to determine what type it is starting from in the first place. **Full Error Log:**

    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: 0

      at org.zkoss.zk.ui.AbstractComponent$ChildIter.<init>()
    2. ZK Kernel
      AbstractComponent$Children.listIterator
      1. org.zkoss.zk.ui.AbstractComponent$ChildIter.<init>(AbstractComponent.java:2848)
      2. org.zkoss.zk.ui.AbstractComponent$ChildIter.<init>(AbstractComponent.java:2840)
      3. org.zkoss.zk.ui.AbstractComponent$Children.listIterator(AbstractComponent.java:185)
      3 frames
    3. Java RT
      AbstractSequentialList.get
      1. java.util.AbstractSequentialList.get(AbstractSequentialList.java:88)
      1 frame
    4. ZK XUL Components
      Combobox.getItemAtIndex
      1. org.zkoss.zul.Combobox.getItemAtIndex(Combobox.java:614)
      1 frame
    5. org.zkoss.zkplus
      DataBinder$LoadOnSaveEventListener.onEvent
      1. org.zkoss.zkplus.databind.ComboitemCollectionItem.getComponentAtIndexByOwner(ComboitemCollectionItem.java:56)
      2. org.zkoss.zkplus.databind.DataBinder.getCollectionItems(DataBinder.java:810)
      3. org.zkoss.zkplus.databind.DataBinder.access$200(DataBinder.java:66)
      4. org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.loadAllBindings(DataBinder.java:1557)
      5. org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.myLoadAllNodes(DataBinder.java:1481)
      6. org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.myLoadAllNodes(DataBinder.java:1511)
      7. org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.loadAllNodes(DataBinder.java:1439)
      8. org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.doLoad(DataBinder.java:1428)
      9. org.zkoss.zkplus.databind.DataBinder$LoadOnSaveEventListener.onEvent(DataBinder.java:1405)
      9 frames
    6. ZK Kernel
      DHtmlUpdateServlet.doPost
      1. org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2742)
      2. org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2713)
      3. org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2654)
      4. org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
      5. org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1717)
      6. org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1502)
      7. org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1212)
      8. org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:600)
      9. org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:482)
      10. org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:491)
      10 frames
    7. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      2 frames
    8. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    9. Spring ORM
      OpenEntityManagerInViewFilter.doFilterInternal
      1. org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:180)
      1 frame
    10. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      1 frame
    11. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    12. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2 frames
    13. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    14. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2 frames
    15. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    16. Spring Security
      FilterChainProxy.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
      2. org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
      3. org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
      4. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      5. org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
      6. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      7. org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
      8. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      9. org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
      10. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      11. org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
      12. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      13. org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
      14. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      15. org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
      16. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      17. org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
      18. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      19. org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
      20. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      21. org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
      22. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      23. org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
      24. org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
      24 frames
    17. Spring
      DelegatingFilterProxy.doFilter
      1. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
      2. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
      2 frames
    18. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      10 frames
    19. Grizzly HTTP
      JIoEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
      3 frames
    20. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      3. java.lang.Thread.run(Thread.java:724)
      3 frames