Jump to content
We've recently updated our Privacy Statement, available here ×

Gantt chart widget: NullPointerException


georg.schmiditdesign.de

Recommended Posts

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!

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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 5001138
5001082 MyProcess 01.09.14 01.09.14 Initiating Process Complete 5001139
5001082 MyProcess 02.09.14 10.11.14 Planning Phase 5001140
5001082 MyProcess 23.10.14 24.10.14 Define Scope Change and Control Process 5001141
5001082 MyProcess 02.09.14 16.10.14 Travel Expense 5001142
5001082 MyProcess 05.09.14 10.11.14 Define Resource Plan 5001143
5001082 MyProcess 19.09.14 26.09.14 Risk Response and Mitigation Plan 5001144
5001082 MyProcess 29.09.14 10.10.14 Identify Storage Requirements 5001145
5001082 MyProcess 13.10.14 24.10.14 Identify Infrastructure Requirements 5001146
5001082 MyProcess 27.10.14 07.11.14 Complete Project Plan 5001147
5001082 MyProcess 09.11.14 09.11.14 Planning Phase Gate Complete 5001148
5001082 MyProcess 09.11.14 01.01.15 Design Phase 5001149
5001082 MyProcess 10.11.14 15.12.14 Requirements Definition 5001150
5001082 MyProcess 18.12.14 01.01.15 Functional and Technical Design 5001151
5001082 MyProcess 18.12.14 18.12.14 Hardware Acquisition 5001152
5001082 MyProcess 18.12.14 18.12.14 Design Phase Gate Complete 5001153
5001082 MyProcess 04.01.15 24.02.15 Construction Phase 5001154
5001082 MyProcess 05.01.15 15.01.15 Database Development 5001155
5001082 MyProcess 19.01.15 22.01.15 User Interface Development 5001156
5001082 MyProcess 26.01.15 24.02.15 Unit and Performance Testing 5001157
5001082 MyProcess 24.02.15 24.02.15 Construction Phase Gate Complete 5001158
5001082 MyProcess 24.02.15 04.04.15 Deployment and Quality Phase 5001159
5001082 MyProcess 24.02.15 06.03.15 Functional and System Testing 5001160
5001082 MyProcess 09.03.15 13.03.15 Usability and User Acceptance Testing 5001161
5001082 MyProcess 16.03.15 20.03.15 User Training Plan 5001162
5001082 MyProcess 23.03.15 27.03.15 Train the Trainer Classes 5001163
5001082 MyProcess 30.03.15 03.04.15 Trainer Certification and User Validation 5001164
5001082 MyProcess 04.04.15 04.04.15 Deployment Phase Gate Complete 5001165
5001082 MyProcess 04.04.15 11.04.15 Closing Phase 5001166
5001082 MyProcess 06.04.15 10.04.15 Lessons Learned 5001167
5001082 MyProcess 11.04.15 11.04.15 Closing Phase Gate Complete 5001168
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...