java.lang.ArrayIndexOutOfBoundsException:0 at net.sf.jasperreports.engine.util.ParagraphUtil.getFirstTabStop(ParagraphUtil.java:208)

时间:2014-01-14 12:23:52

标签: java jasper-reports

当我尝试生成JasperReports时,发生了此错误。 有谁知道这是什么样的错误?

java.lang.ArrayIndexOutOfBoundsException: 0
    at net.sf.jasperreports.engine.util.ParagraphUtil.getFirstTabStop(ParagraphUtil.java:208)
    at net.sf.jasperreports.engine.fill.TextMeasurer.renderNextLine(TextMeasurer.java:1023)
    at net.sf.jasperreports.engine.fill.TextMeasurer.renderParagraph(TextMeasurer.java:717)
    at net.sf.jasperreports.engine.fill.TextMeasurer.measure(TextMeasurer.java:416)
    at net.sf.jasperreports.engine.fill.JRFillTextElement.chopTextElement(JRFillTextElement.java:504)
    at net.sf.jasperreports.engine.fill.JRFillStaticText.prepare(JRFillStaticText.java:183)
    at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:328)
    at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:377)
    at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:351)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2039)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupHeader(JRVerticalFiller.java:632)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupHeaders(JRVerticalFiller.java:554)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:279)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:144)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:909)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:841)
    at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:88)
    at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:653)
    at net.sf.jasperreports.engine.JasperRunManager.runToPdf(JasperRunManager.java:485)
    at net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:888)

2 个答案:

答案 0 :(得分:0)

  

ArrayIndexOutOfBoundsException异常

当您尝试访问一个空的索引或超过数组的最大或mnmum允许索引时,在示例中尝试访问仅包含4个元素的数组的第5个元素时。

documentation说明了这一点:

  

<强> ArrayIndexOutOfBoundsException异常

     

抛出表示已使用非法访问数组   指数。该指数为负数或大于或等于   数组的大小。

答案 1 :(得分:0)

此问题已在6.2.1中修复。在这里https://community.jaspersoft.com/jasperreports-library/issues/2999-0

进行检查