java.lang.IllegalArgumentException: Sheet index (-1) is out of range (0..-1)

ZK-Tracker | hawk | 3 years ago
  1. 0

    h3. Reproducing Steps: # open {{zss.test/issue3/493-deleteLastSheet.zul}} # click the button to delete all sheets # When you delete the last sheet *Expected:* A message dialog shown it's forbidden. *Actual:* A message dialog shown and an exception occurs: {quote} 2013/10/28 下午 03:22:03 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1362 嚴重的: >>java.lang.IllegalArgumentException: Sheet index (-1) is out of range (0..-1) >> at org.zkoss.poi.xssf.usermodel.XSSFWorkbook.validateSheetIndex(XSSFWorkbook.java:1143) >> at org.zkoss.poi.xssf.usermodel.XSSFWorkbook.getSheetAt(XSSFWorkbook.java:934) >> at org.zkoss.zss.model.sys.impl.XSSFBookImpl.getWorksheetAt(XSSFBookImpl.java:412) >> at org.zkoss.zss.model.sys.impl.XRangeImpl.initCellRef(XRangeImpl.java:101) >> at org.zkoss.zss.model.sys.impl.XRangeImpl.<init>(XRangeImpl.java:91) >> at org.zkoss.zss.model.sys.XRanges.newRange(XRanges.java:245) >> at org.zkoss.zss.model.sys.XRanges.range(XRanges.java:200) >> at org.zkoss.zssex.ui.ValidationHelper.validate(ValidationHelper.java:43) >> at org.zkoss.zssex.ui.impl.DataValidationHandlerImpl.validate(DataValidationHandlerImpl.java:105) >> at org.zkoss.zss.ui.Spreadsheet.processStopEditing0(Spreadsheet.java:4527) >> at org.zkoss.zss.ui.Spreadsheet.processStopEditing(Spreadsheet.java:4504) >> at org.zkoss.zss.ui.Spreadsheet.access$47(Spreadsheet.java:4502) >> at org.zkoss.zss.ui.Spreadsheet$2.onEvent(Spreadsheet.java:353) >> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2743) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2714) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2655) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) >> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1720) >> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1505) >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1215) >> 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:727) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) >> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) >> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) >> at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) >> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) >> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) >> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) >> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) >> at org.mortbay.jetty.Server.handle(Server.java:326) >> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) >> at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) >> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) >> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) >> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) >> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) >> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) {quote} Then any characters you type, the same exception is thrown.

    ZK-Tracker | 3 years ago | hawk
    java.lang.IllegalArgumentException: Sheet index (-1) is out of range (0..-1)
  2. 0

    h3. Reproducing Steps: # open {{zss.test/issue3/493-deleteLastSheet.zul}} # click the button to delete all sheets # When you delete the last sheet *Expected:* A message dialog shown it's forbidden. *Actual:* A message dialog shown and an exception occurs: {quote} 2013/10/28 下午 03:22:03 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1362 嚴重的: >>java.lang.IllegalArgumentException: Sheet index (-1) is out of range (0..-1) >> at org.zkoss.poi.xssf.usermodel.XSSFWorkbook.validateSheetIndex(XSSFWorkbook.java:1143) >> at org.zkoss.poi.xssf.usermodel.XSSFWorkbook.getSheetAt(XSSFWorkbook.java:934) >> at org.zkoss.zss.model.sys.impl.XSSFBookImpl.getWorksheetAt(XSSFBookImpl.java:412) >> at org.zkoss.zss.model.sys.impl.XRangeImpl.initCellRef(XRangeImpl.java:101) >> at org.zkoss.zss.model.sys.impl.XRangeImpl.<init>(XRangeImpl.java:91) >> at org.zkoss.zss.model.sys.XRanges.newRange(XRanges.java:245) >> at org.zkoss.zss.model.sys.XRanges.range(XRanges.java:200) >> at org.zkoss.zssex.ui.ValidationHelper.validate(ValidationHelper.java:43) >> at org.zkoss.zssex.ui.impl.DataValidationHandlerImpl.validate(DataValidationHandlerImpl.java:105) >> at org.zkoss.zss.ui.Spreadsheet.processStopEditing0(Spreadsheet.java:4527) >> at org.zkoss.zss.ui.Spreadsheet.processStopEditing(Spreadsheet.java:4504) >> at org.zkoss.zss.ui.Spreadsheet.access$47(Spreadsheet.java:4502) >> at org.zkoss.zss.ui.Spreadsheet$2.onEvent(Spreadsheet.java:353) >> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2743) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2714) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2655) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) >> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1720) >> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1505) >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1215) >> 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:727) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) >> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) >> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) >> at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) >> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) >> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) >> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) >> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) >> at org.mortbay.jetty.Server.handle(Server.java:326) >> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) >> at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) >> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) >> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) >> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) >> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) >> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) {quote} Then any characters you type, the same exception is thrown.

    ZK-Tracker | 3 years ago | hawk
    java.lang.IllegalArgumentException: Sheet index (-1) is out of range (0..-1)
  3. 0

    Read from excel cell Eclipse

    Stack Overflow | 2 years ago | Pepiii
    java.lang.IllegalArgumentException: Sheet index (1) is out of range (0..-1)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Java Prgoram : Reading Excel File 2003

    Stack Overflow | 1 year ago | user5568398
    java.lang.IllegalArgumentException: Sheet index (0) is out of range (0..-1)
  6. 0

    What is the Index range of an Excel data sheets... How to use index range in Java?

    Stack Overflow | 3 years ago | user3628259
    java.lang.IllegalArgumentException: Sheet index (0) is out of range (0..-1)

    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.IllegalArgumentException

      Sheet index (-1) is out of range (0..-1)

      at org.zkoss.poi.xssf.usermodel.XSSFWorkbook.validateSheetIndex()
    2. org.zkoss.poi
      XSSFWorkbook.getSheetAt
      1. org.zkoss.poi.xssf.usermodel.XSSFWorkbook.validateSheetIndex(XSSFWorkbook.java:1143)
      2. org.zkoss.poi.xssf.usermodel.XSSFWorkbook.getSheetAt(XSSFWorkbook.java:934)
      2 frames
    3. org.zkoss.zss
      XRanges.range
      1. org.zkoss.zss.model.sys.impl.XSSFBookImpl.getWorksheetAt(XSSFBookImpl.java:412)
      2. org.zkoss.zss.model.sys.impl.XRangeImpl.initCellRef(XRangeImpl.java:101)
      3. org.zkoss.zss.model.sys.impl.XRangeImpl.<init>(XRangeImpl.java:91)
      4. org.zkoss.zss.model.sys.XRanges.newRange(XRanges.java:245)
      5. org.zkoss.zss.model.sys.XRanges.range(XRanges.java:200)
      5 frames
    4. org.zkoss.zssex
      DataValidationHandlerImpl.validate
      1. org.zkoss.zssex.ui.ValidationHelper.validate(ValidationHelper.java:43)
      2. org.zkoss.zssex.ui.impl.DataValidationHandlerImpl.validate(DataValidationHandlerImpl.java:105)
      2 frames
    5. org.zkoss.zss
      Spreadsheet$2.onEvent
      1. org.zkoss.zss.ui.Spreadsheet.processStopEditing0(Spreadsheet.java:4527)
      2. org.zkoss.zss.ui.Spreadsheet.processStopEditing(Spreadsheet.java:4504)
      3. org.zkoss.zss.ui.Spreadsheet.access$47(Spreadsheet.java:4502)
      4. org.zkoss.zss.ui.Spreadsheet$2.onEvent(Spreadsheet.java:353)
      4 frames
    6. ZK Kernel
      DHtmlUpdateServlet.doPost
      1. org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2743)
      2. org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2714)
      3. org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2655)
      4. org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
      5. org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1720)
      6. org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1505)
      7. org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1215)
      8. org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:601)
      9. org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:483)
      10. org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:492)
      10 frames
    7. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      2 frames
    8. Jetty Server
      SelectChannelEndPoint.run
      1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
      3. org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      4. org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      5. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
      6. org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
      7. org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      8. org.mortbay.jetty.Server.handle(Server.java:326)
      9. org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      10. org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
      11. org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
      12. org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
      13. org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      14. org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
      14 frames
    9. Jetty Util
      QueuedThreadPool$PoolThread.run
      1. org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      1 frame