Got "/ by zero" or "null pointer" exception, both with same data

0

Hello, I'm having a problem with one Jasper report. I got "/ by zero" and "null pointer" exceptions with same data. The report is quite simple and not division operations is made, just additions and multiplications. The problem is happening in Jasper Studio 6.3.1.final and also on Jasper server 7.1.0. The I have got this error with two differenct data objects and successful report with many data objects. All my data objects are following same layout. Could someone help with my problem?

Stack traces following

net.sf.jasperreports.engine.JRException: java.lang.ArithmeticException: / by zero
    at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:548)
    at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$20(ReportControler.java:523)
    at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:404)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.ArithmeticException: / by zero
    at net.sf.jasperreports.engine.util.ParagraphUtil.getTabStops(ParagraphUtil.java:72)
    at net.sf.jasperreports.engine.util.ParagraphUtil.getLastTabStop(ParagraphUtil.java:227)
    at net.sf.jasperreports.engine.fill.TextMeasurer.renderNextLine(TextMeasurer.java:881)
    at net.sf.jasperreports.engine.fill.TextMeasurer.renderParagraph(TextMeasurer.java:629)
    at net.sf.jasperreports.engine.fill.TextMeasurer.measure(TextMeasurer.java:554)
    at net.sf.jasperreports.engine.fill.JRFillTextElement.chopTextElement(JRFillTextElement.java:674)
    at net.sf.jasperreports.engine.fill.JRFillTextField.prepare(JRFillTextField.java:763)
    at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:536)
    at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:411)
    at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:386)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2024)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:748)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:255)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:115)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:582)
    at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:123)
    at java.lang.Thread.run(Thread.java:745)

and

net.sf.jasperreports.engine.JRException: java.lang.NullPointerException
    at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:548)
    at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$20(ReportControler.java:523)
    at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:404)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.NullPointerException
    at com.jaspersoft.webservice.data.query.WebServiceQueryExecuter.getInternalQE(WebServiceQueryExecuter.java:244)
    at com.jaspersoft.webservice.data.query.WebServiceQueryExecuter.close(WebServiceQueryExecuter.java:201)
    at net.sf.jasperreports.engine.fill.JRFillDataset.closeQueryExecuter(JRFillDataset.java:1322)
    at net.sf.jasperreports.engine.fill.JRFillDataset.closeDatasource(JRFillDataset.java:1303)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:608)
    at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:123)
    at java.lang.Thread.run(Thread.java:745)

seppo.koivisto's picture
Joined: Jun 12 2017 - 4:58am
Last seen: 2 weeks 1 day ago

I got the problem solved. There was a text field on the report which caused the problem. Solution in my case was that I removed the text field, created a band and created a new text field inside that band. Moving the text field to newly created band didn't help.

seppo.koivisto - 1 year 3 months ago

0 Answers:

No answers yet
Feedback
randomness