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

ZK-Tracker | henrichen | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    h3. Steps to reproduce # run the project https://github.com/hawkchen/zssperformance with zss 3.5.0 (so you have to change the zss-version in pom.xml accordingly) # use Jmeter 2.10 to open test plan *CollaborationEditing.jmx* (the file is under [PROJECT-BASE]\TestPlan)(original test plan https://docs.google.com/a/potix.com/document/d/1pK-mi4hO14mKkmlf1qZLwi-wp3uU04wcMVzHk6MuS5I/edit#heading=h.i48nii91fa3p) # set number of thread to 50 in "Thread Group" and run the test plan h4. Expected Shows no error on server console. h4. What I actually see SEVERE: Index: 0, Size: 0 when eval (Input!$J$15,Input!$J$21,Input!$J$22) java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 {quote} SEVERE: Index: 0, Size: 0 when eval (Input!$J$15,Input!$J$21,Input!$J$22) java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at org.zkoss.zss.model.impl.sys.formula.ParsingBook.getAnyExternalSheet(ParsingBook.java:183) at org.zkoss.zss.model.impl.sys.formula.ParsingBook.getExternalSheet(ParsingBook.java:189) at org.zkoss.zss.model.impl.sys.formula.EvalBook.getExternalSheet(EvalBook.java:134) at org.zkoss.poi.ss.formula.OperationEvaluationContext.createExternSheetRefEvaluator(OperationEvaluationContext.java:81) at org.zkoss.poi.ss.formula.OperationEvaluationContext.getRef3DEval(OperationEvaluationContext.java:266) at org.zkoss.poi.ss.formula.WorkbookEvaluator.getEvalForPtg(WorkbookEvaluator.java:716) at org.zkoss.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:581) at org.zkoss.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:941) at org.zkoss.poi.ss.formula.WorkbookEvaluator.evaluate(WorkbookEvaluator.java:862) at org.zkoss.zss.model.impl.sys.formula.FormulaEngineImpl.evaluateFormula(FormulaEngineImpl.java:389) at org.zkoss.zss.model.impl.sys.formula.FormulaEngineImpl.evaluate(FormulaEngineImpl.java:349) at org.zkoss.zss.model.impl.chart.SeriesImpl.evalFormula(SeriesImpl.java:78) at org.zkoss.zss.model.impl.chart.SeriesImpl.getNumOfValue(SeriesImpl.java:125) at org.zkoss.zssex.util.ChartHelper.preparePieModel(ChartHelper.java:379) at org.zkoss.zssex.util.ChartHelper.drawChart(ChartHelper.java:142) at org.zkoss.zssex.ui.widget.ChartWidget.initChart(ChartWidget.java:121) at org.zkoss.zssex.ui.widget.ChartWidget.<init>(ChartWidget.java:46) at org.zkoss.zssex.ui.widget.DefaultBookWidgetLoader.newChartWidget(DefaultBookWidgetLoader.java:411) at org.zkoss.zssex.ui.widget.DefaultBookWidgetLoader.newChartWidgetGroup(DefaultBookWidgetLoader.java:404) at org.zkoss.zssex.ui.widget.DefaultBookWidgetLoader.prepareChartWidgets(DefaultBookWidgetLoader.java:172) at org.zkoss.zssex.ui.widget.DefaultBookWidgetLoader.onSheetSelected(DefaultBookWidgetLoader.java:82) at org.zkoss.zss.ui.Spreadsheet.afterSheetSelected(Spreadsheet.java:4269) at org.zkoss.zss.ui.Spreadsheet.getSelectedSSheet(Spreadsheet.java:809) at org.zkoss.zss.ui.Spreadsheet.doInvalidate(Spreadsheet.java:4400) at org.zkoss.zss.ui.Spreadsheet.invalidate(Spreadsheet.java:3774) at org.zkoss.zss.ui.Spreadsheet.setSBook(Spreadsheet.java:634) at org.zkoss.zss.ui.Spreadsheet.setBook(Spreadsheet.java:5100) at org.zkoss.zss.benchmark.SharedBookComposer.doAfterCompose(SharedBookComposer.java:26) at org.zkoss.zk.ui.impl.UiEngineImpl.doAfterCompose(UiEngineImpl.java:578) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:880) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:735) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:797) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:757) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:699) at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:442) at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:356) at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:215) at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:136) ... {quote}

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

    h3. Steps to reproduce # run the project https://github.com/hawkchen/zssperformance with zss 3.5.0 (so you have to change the zss-version in pom.xml accordingly) # use Jmeter 2.10 to open test plan *CollaborationEditing.jmx* (the file is under [PROJECT-BASE]\TestPlan)(original test plan https://docs.google.com/a/potix.com/document/d/1pK-mi4hO14mKkmlf1qZLwi-wp3uU04wcMVzHk6MuS5I/edit#heading=h.i48nii91fa3p) # set number of thread to 50 in "Thread Group" and run the test plan h4. Expected Shows no error on server console. h4. What I actually see SEVERE: Index: 0, Size: 0 when eval (Input!$J$15,Input!$J$21,Input!$J$22) java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 {quote} SEVERE: Index: 0, Size: 0 when eval (Input!$J$15,Input!$J$21,Input!$J$22) java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at org.zkoss.zss.model.impl.sys.formula.ParsingBook.getAnyExternalSheet(ParsingBook.java:183) at org.zkoss.zss.model.impl.sys.formula.ParsingBook.getExternalSheet(ParsingBook.java:189) at org.zkoss.zss.model.impl.sys.formula.EvalBook.getExternalSheet(EvalBook.java:134) at org.zkoss.poi.ss.formula.OperationEvaluationContext.createExternSheetRefEvaluator(OperationEvaluationContext.java:81) at org.zkoss.poi.ss.formula.OperationEvaluationContext.getRef3DEval(OperationEvaluationContext.java:266) at org.zkoss.poi.ss.formula.WorkbookEvaluator.getEvalForPtg(WorkbookEvaluator.java:716) at org.zkoss.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:581) at org.zkoss.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:941) at org.zkoss.poi.ss.formula.WorkbookEvaluator.evaluate(WorkbookEvaluator.java:862) at org.zkoss.zss.model.impl.sys.formula.FormulaEngineImpl.evaluateFormula(FormulaEngineImpl.java:389) at org.zkoss.zss.model.impl.sys.formula.FormulaEngineImpl.evaluate(FormulaEngineImpl.java:349) at org.zkoss.zss.model.impl.chart.SeriesImpl.evalFormula(SeriesImpl.java:78) at org.zkoss.zss.model.impl.chart.SeriesImpl.getNumOfValue(SeriesImpl.java:125) at org.zkoss.zssex.util.ChartHelper.preparePieModel(ChartHelper.java:379) at org.zkoss.zssex.util.ChartHelper.drawChart(ChartHelper.java:142) at org.zkoss.zssex.ui.widget.ChartWidget.initChart(ChartWidget.java:121) at org.zkoss.zssex.ui.widget.ChartWidget.<init>(ChartWidget.java:46) at org.zkoss.zssex.ui.widget.DefaultBookWidgetLoader.newChartWidget(DefaultBookWidgetLoader.java:411) at org.zkoss.zssex.ui.widget.DefaultBookWidgetLoader.newChartWidgetGroup(DefaultBookWidgetLoader.java:404) at org.zkoss.zssex.ui.widget.DefaultBookWidgetLoader.prepareChartWidgets(DefaultBookWidgetLoader.java:172) at org.zkoss.zssex.ui.widget.DefaultBookWidgetLoader.onSheetSelected(DefaultBookWidgetLoader.java:82) at org.zkoss.zss.ui.Spreadsheet.afterSheetSelected(Spreadsheet.java:4269) at org.zkoss.zss.ui.Spreadsheet.getSelectedSSheet(Spreadsheet.java:809) at org.zkoss.zss.ui.Spreadsheet.doInvalidate(Spreadsheet.java:4400) at org.zkoss.zss.ui.Spreadsheet.invalidate(Spreadsheet.java:3774) at org.zkoss.zss.ui.Spreadsheet.setSBook(Spreadsheet.java:634) at org.zkoss.zss.ui.Spreadsheet.setBook(Spreadsheet.java:5100) at org.zkoss.zss.benchmark.SharedBookComposer.doAfterCompose(SharedBookComposer.java:26) at org.zkoss.zk.ui.impl.UiEngineImpl.doAfterCompose(UiEngineImpl.java:578) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:880) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:735) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:797) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:757) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:699) at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:442) at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:356) at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:215) at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:136) ... {quote}

    ZK-Tracker | 3 years ago | henrichen
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

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

    at java.util.ArrayList.rangeCheck()
  2. Java RT
    ArrayList.get
    1. java.util.ArrayList.rangeCheck(Unknown Source)
    2. java.util.ArrayList.get(Unknown Source)
    2 frames
  3. org.zkoss.zss
    EvalBook.getExternalSheet
    1. org.zkoss.zss.model.impl.sys.formula.ParsingBook.getAnyExternalSheet(ParsingBook.java:183)
    2. org.zkoss.zss.model.impl.sys.formula.ParsingBook.getExternalSheet(ParsingBook.java:189)
    3. org.zkoss.zss.model.impl.sys.formula.EvalBook.getExternalSheet(EvalBook.java:134)
    3 frames
  4. org.zkoss.poi
    WorkbookEvaluator.evaluate
    1. org.zkoss.poi.ss.formula.OperationEvaluationContext.createExternSheetRefEvaluator(OperationEvaluationContext.java:81)
    2. org.zkoss.poi.ss.formula.OperationEvaluationContext.getRef3DEval(OperationEvaluationContext.java:266)
    3. org.zkoss.poi.ss.formula.WorkbookEvaluator.getEvalForPtg(WorkbookEvaluator.java:716)
    4. org.zkoss.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:581)
    5. org.zkoss.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:941)
    6. org.zkoss.poi.ss.formula.WorkbookEvaluator.evaluate(WorkbookEvaluator.java:862)
    6 frames
  5. org.zkoss.zss
    SeriesImpl.getNumOfValue
    1. org.zkoss.zss.model.impl.sys.formula.FormulaEngineImpl.evaluateFormula(FormulaEngineImpl.java:389)
    2. org.zkoss.zss.model.impl.sys.formula.FormulaEngineImpl.evaluate(FormulaEngineImpl.java:349)
    3. org.zkoss.zss.model.impl.chart.SeriesImpl.evalFormula(SeriesImpl.java:78)
    4. org.zkoss.zss.model.impl.chart.SeriesImpl.getNumOfValue(SeriesImpl.java:125)
    4 frames
  6. org.zkoss.zssex
    DefaultBookWidgetLoader.onSheetSelected
    1. org.zkoss.zssex.util.ChartHelper.preparePieModel(ChartHelper.java:379)
    2. org.zkoss.zssex.util.ChartHelper.drawChart(ChartHelper.java:142)
    3. org.zkoss.zssex.ui.widget.ChartWidget.initChart(ChartWidget.java:121)
    4. org.zkoss.zssex.ui.widget.ChartWidget.<init>(ChartWidget.java:46)
    5. org.zkoss.zssex.ui.widget.DefaultBookWidgetLoader.newChartWidget(DefaultBookWidgetLoader.java:411)
    6. org.zkoss.zssex.ui.widget.DefaultBookWidgetLoader.newChartWidgetGroup(DefaultBookWidgetLoader.java:404)
    7. org.zkoss.zssex.ui.widget.DefaultBookWidgetLoader.prepareChartWidgets(DefaultBookWidgetLoader.java:172)
    8. org.zkoss.zssex.ui.widget.DefaultBookWidgetLoader.onSheetSelected(DefaultBookWidgetLoader.java:82)
    8 frames
  7. org.zkoss.zss
    SharedBookComposer.doAfterCompose
    1. org.zkoss.zss.ui.Spreadsheet.afterSheetSelected(Spreadsheet.java:4269)
    2. org.zkoss.zss.ui.Spreadsheet.getSelectedSSheet(Spreadsheet.java:809)
    3. org.zkoss.zss.ui.Spreadsheet.doInvalidate(Spreadsheet.java:4400)
    4. org.zkoss.zss.ui.Spreadsheet.invalidate(Spreadsheet.java:3774)
    5. org.zkoss.zss.ui.Spreadsheet.setSBook(Spreadsheet.java:634)
    6. org.zkoss.zss.ui.Spreadsheet.setBook(Spreadsheet.java:5100)
    7. org.zkoss.zss.benchmark.SharedBookComposer.doAfterCompose(SharedBookComposer.java:26)
    7 frames
  8. ZK Kernel
    DHtmlLayoutServlet.doGet
    1. org.zkoss.zk.ui.impl.UiEngineImpl.doAfterCompose(UiEngineImpl.java:578)
    2. org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:880)
    3. org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826)
    4. org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:735)
    5. org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:797)
    6. org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:757)
    7. org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:699)
    8. org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:442)
    9. org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:356)
    10. org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:215)
    11. org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:136)
    11 frames