birt chart not displaying Caused by: java.lang.NullPointerException

BirtRepUser
edited February 11, 2022 in Analytics #1

Feb 20, 2020 12:05:46 PM org.eclipse.birt.report.engine.presentation.LocalizedContentVisitor processExtendedContent
SEVERE: null
org.eclipse.birt.chart.exception.ChartException
at org.eclipse.birt.chart.reportitem.ChartReportItemPresentationBase.onRowSets(ChartReportItemPresentationBase.java:952)
at org.eclipse.birt.chart.reportitem.ChartReportItemPresentationProxy.onRowSets(ChartReportItemPresentationProxy.java:108)
at org.eclipse.birt.report.engine.presentation.LocalizedContentVisitor.processExtendedContent(LocalizedContentVisitor.java:1074)
at org.eclipse.birt.report.engine.presentation.LocalizedContentVisitor.localizeForeign(LocalizedContentVisitor.java:591)
at org.eclipse.birt.report.engine.presentation.LocalizedContentVisitor.localize(LocalizedContentVisitor.java:176)
at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:37)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLRepeatHeaderLM.layoutChildren(HTMLRepeatHeaderLM.java:46)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
at org.eclipse.birt.report.engine.api.impl.RenderTask$PageRangeRender.render(RenderTask.java:717)
at org.eclipse.birt.report.engine.api.impl.RenderTask.render(RenderTask.java:321)
at com.deltacontrols.web.Report.render(Report.java:955)
at com.deltacontrols.web.Report.runAndRender(Report.java:1516)
at com.deltacontrols.web.BIRTRunner.run(BIRTRunner.java:952)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at org.eclipse.birt.chart.extension.datafeed.DataSetProcessorImpl.getMinimum(DataSetProcessorImpl.java:277)
at org.eclipse.birt.chart.util.ChartUtil.adjustDataSets(ChartUtil.java:2349)
at org.eclipse.birt.chart.util.ChartUtil.adjustDataSets(ChartUtil.java:2305)
at org.eclipse.birt.chart.util.ChartUtil.adjustBigNumberWithinDataSets(ChartUtil.java:2268)
at org.eclipse.birt.chart.internal.datafeed.DataProcessor.generateRuntimeSeries(DataProcessor.java:1514)
at org.eclipse.birt.chart.internal.datafeed.DataProcessor.generateRuntimeSeries(DataProcessor.java:522)
at org.eclipse.birt.chart.factory.Generator.bindData(Generator.java:719)
at org.eclipse.birt.chart.reportitem.ChartReportItemPresentationBase.bindData(ChartReportItemPresentationBase.java:761)
at org.eclipse.birt.chart.reportitem.ChartReportItemPresentationBase.onRowSets(ChartReportItemPresentationBase.java:891)
... 25 more

Comments

  • Hello and thank you for your post to the Core Signature Forum. I believe that you want this directed to another Forum (perhaps our AI and Analytics - formerly the Actuate line of products). I will look into the appropriate forum and re-post your note there. I will have this done by later this morning ET.

    Jay Weir

    Jay Weir
    Sr. Communications Specialist
    OpenText

  • Warning No formatter is installed for the format ipb
  • When I write the following code on fetch for dataset

    var tmpArray = reportContext.getPersistentGlobalVariable("timeValues");
    if (tmpArray.contains(row.Timeslice) == false && row.Timeslice != null)
    {
    tmpArray.add(row.Timeslice + '-'+row.GroupNo + '-'+ row.Type + '-'+ row.Value);
    }

    reportContext.setPersistentGlobalVariable("timeValues", tmpArray);

    How to remove

  • jfranken
    edited February 24, 2020 #5

    I am not sure how you are using the array. Typically, if you want to concatenate several columns of data into one value, I recommend creating another String column in the data set instead of using an array. Set the column value using the same concatenation code that you are using for the array.

    If for some reason you must use an array, try creating the array in the data set open event like:

    timeValues = [];

    It will be in scope in the fetch loop. Both of these options eliminate the need for persistent global variables.

    Regarding eliminating null values, if you add a column to the data set, you can create a data set filter to filter out the null values. For the array solution, try changing the "if" statement to something like:

    if (timeValues.contains(row.Timeslice) == false && row.Timeslice && row.Type && row.Value)

    When the value is null, undefined, or empty, it evaluates to false in the "if" statement.

    Warning No formatter is installed for the format ipb
  • Thanks for replying .My problem is I want to delete those null values from dataset . I dont know how to do that , to check if there are null values I wrote above code using global variable.

    Here is the chart error I get when one group does not have data .

    Please find attached sample for the issue I am trying to solve.

  • jfranken
    edited February 25, 2020 #7

    Thanks for the additional information. I'm still unclear on why you can't just filter the data set. The onFetch code will slow down the report execution. You shouldn't need the code to eliminate nulls from the data set.

    Also, it is difficult to tell from the stack trace whether eliminating nulls will fix the error. I suggest adding error handling code to the chart onRender script. Before using a variable like xAxis, yAxis, data, xSeriesDef, etc., check that it is not null.

    Warning No formatter is installed for the format ipb