georg.schmiditdesign.de Posted February 11, 2015 Posted February 11, 2015 With Jaspersoft Studio 6.0.1, I get a NullPointerException when compiling a report containing only a Gantt chart widget. This is the stack trace: net.sf.jasperreports.engine.JRException: java.lang.NullPointerException at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:467) at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$18(ReportControler.java:442) at com.jaspersoft.studio.editor.preview.view.control.ReportControler$4.run(ReportControler.java:334) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: java.lang.NullPointerException at java.util.Calendar.setTime(Unknown Source) at java.text.SimpleDateFormat.format(Unknown Source) at java.text.SimpleDateFormat.format(Unknown Source) at java.text.DateFormat.format(Unknown Source) at com.jaspersoft.jasperreports.fusion.widgets.DefaultWidgetDataXmlGenerator.writeGanttTask(DefaultWidgetDataXmlGenerator.java:506) at com.jaspersoft.jasperreports.fusion.widgets.DefaultWidgetDataXmlGenerator.generateXml(DefaultWidgetDataXmlGenerator.java:372) at com.jaspersoft.jasperreports.fusion.widgets.gantt.GanttFillChart.getDataXML(GanttFillChart.java:257) at com.jaspersoft.jasperreports.fusion.widgets.AbstractWidgetFillComponent.copyWidgetData(AbstractWidgetFillComponent.java:96) at com.jaspersoft.jasperreports.fusion.widgets.AbstractWidgetFillComponent.fill(AbstractWidgetFillComponent.java:160) at net.sf.jasperreports.engine.fill.JRFillComponentElement.fill(JRFillComponentElement.java:194) at net.sf.jasperreports.engine.fill.JRFillElementContainer.fillElements(JRFillElementContainer.java:583) at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:396) at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:358) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummaryNoLastFooterSamePage(JRVerticalFiller.java:1072) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummary(JRVerticalFiller.java:1031) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportEnd(JRVerticalFiller.java:295) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:131) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:540) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:120) at java.lang.Thread.run(Unknown Source) This is the JRXML-Tag: <componentElement><reportElement x="0" y="0" width="802" height="336" uuid="6f88b495-a76f-4aaa-bee1-e0f1b596fa29"/><fw:ganttChart xmlns:fw="http://jaspersoft.com/fusion" xsi:schemaLocation="http://jaspersoft.com/fusion http://jaspersoft.com/schema/fusion.xsd" useTime="true"><fw:widgetProperty name="caption"><fw:propertyExpression><![CDATA["Mein Titel"]]></fw:propertyExpression></fw:widgetProperty><fw:widgetProperty name="subCaption"><fw:propertyExpression><![CDATA["Mein Untertitel"]]></fw:propertyExpression></fw:widgetProperty><fw:widgetProperty name="ganttLineAlpha"><fw:propertyExpression><![CDATA[new Integer(44)]]></fw:propertyExpression></fw:widgetProperty><fw:categorySet><fw:category><fw:startExpression><![CDATA[new SimpleDateFormat("yyyy-MM-dd").parse("2009-07-27")]]></fw:startExpression><fw:endExpression><![CDATA[new SimpleDateFormat("yyyy-MM-dd").parse("2009-08-27")]]></fw:endExpression><fw:labelExpression><![CDATA["Sample Category"]]></fw:labelExpression></fw:category></fw:categorySet><fw:processes><dataset/><fw:process><fw:idExpression><![CDATA[$F{ID}]]></fw:idExpression><fw:labelExpression><![CDATA[$F{NAME}]]></fw:labelExpression></fw:process></fw:processes><fw:tasks><fw:tasksProperty name="showlabels"><fw:propertyExpression><![CDATA[boolean.TRUE]]></fw:propertyExpression></fw:tasksProperty><fw:tasksProperty name="showstartdate"><fw:propertyExpression><![CDATA[boolean.TRUE]]></fw:propertyExpression></fw:tasksProperty><fw:tasksProperty name="showenddate"><fw:propertyExpression><![CDATA[boolean.TRUE]]></fw:propertyExpression></fw:tasksProperty><dataset/><fw:task><fw:taskProperty name="showLabels"><fw:propertyExpression><![CDATA[boolean.TRUE]]></fw:propertyExpression></fw:taskProperty><fw:idExpression><![CDATA[$F{PRID}]]></fw:idExpression><fw:processIdExpression><![CDATA[$F{ID}]]></fw:processIdExpression><fw:startExpression><![CDATA[$F{PRSTART}]]></fw:startExpression><fw:endExpression><![CDATA[$F{PRFINISH}]]></fw:endExpression><fw:labelExpression><![CDATA[$F{PRNAME}]]></fw:labelExpression></fw:task></fw:tasks></fw:ganttChart></componentElement>[/code] Any hint on what I could try to change would be great!
H Mendoza Posted February 11, 2015 Posted February 11, 2015 Maybe move the chart to the Summary band and test from there. I assume that you have a query, etc.
georg.schmiditdesign.de Posted February 12, 2015 Author Posted February 12, 2015 As you can see from the stack trace, the chart is in the summary band.This is the result from my query, without any NULL values:5001082 MyProcess 01.09.14 01.09.14 Initiation Phase 50011385001082 MyProcess 01.09.14 01.09.14 Initiating Process Complete 50011395001082 MyProcess 02.09.14 10.11.14 Planning Phase 50011405001082 MyProcess 23.10.14 24.10.14 Define Scope Change and Control Process 50011415001082 MyProcess 02.09.14 16.10.14 Travel Expense 50011425001082 MyProcess 05.09.14 10.11.14 Define Resource Plan 50011435001082 MyProcess 19.09.14 26.09.14 Risk Response and Mitigation Plan 50011445001082 MyProcess 29.09.14 10.10.14 Identify Storage Requirements 50011455001082 MyProcess 13.10.14 24.10.14 Identify Infrastructure Requirements 50011465001082 MyProcess 27.10.14 07.11.14 Complete Project Plan 50011475001082 MyProcess 09.11.14 09.11.14 Planning Phase Gate Complete 50011485001082 MyProcess 09.11.14 01.01.15 Design Phase 50011495001082 MyProcess 10.11.14 15.12.14 Requirements Definition 50011505001082 MyProcess 18.12.14 01.01.15 Functional and Technical Design 50011515001082 MyProcess 18.12.14 18.12.14 Hardware Acquisition 50011525001082 MyProcess 18.12.14 18.12.14 Design Phase Gate Complete 50011535001082 MyProcess 04.01.15 24.02.15 Construction Phase 50011545001082 MyProcess 05.01.15 15.01.15 Database Development 50011555001082 MyProcess 19.01.15 22.01.15 User Interface Development 50011565001082 MyProcess 26.01.15 24.02.15 Unit and Performance Testing 50011575001082 MyProcess 24.02.15 24.02.15 Construction Phase Gate Complete 50011585001082 MyProcess 24.02.15 04.04.15 Deployment and Quality Phase 50011595001082 MyProcess 24.02.15 06.03.15 Functional and System Testing 50011605001082 MyProcess 09.03.15 13.03.15 Usability and User Acceptance Testing 50011615001082 MyProcess 16.03.15 20.03.15 User Training Plan 50011625001082 MyProcess 23.03.15 27.03.15 Train the Trainer Classes 50011635001082 MyProcess 30.03.15 03.04.15 Trainer Certification and User Validation 50011645001082 MyProcess 04.04.15 04.04.15 Deployment Phase Gate Complete 50011655001082 MyProcess 04.04.15 11.04.15 Closing Phase 50011665001082 MyProcess 06.04.15 10.04.15 Lessons Learned 50011675001082 MyProcess 11.04.15 11.04.15 Closing Phase Gate Complete 5001168
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now