Null pointer exception in Birt Viewer when displaying html5 charts & meters
<p>I am prototyping some reports with BIRT to see if it is suitable for our reporting needs. I recently downloaded the Birt Eclipse bundle and the ActuateBirtViewer and everything went quite smoothly. I am now trying the BIRT Designer Pro version for comparison purposes (evaluation license) and am now experiencing problems with the BIRT viewer.</p><p> </p><p>My simple reports run and visualise ok within the eclipse environment using the[font="'courier new', courier, monospace;"] Run -> View Report -> In Web Viewer[/font] option. However, when I drop the report in a standalone instance of the BIRT Report Viewer (commercial-grade version) running on Tomcat 7 I am getting some errors and the report is not displayed. This only occurs when I specify 'html5' as the chart format, or if I use a meter (guages). Reports developed in the open source report designer (4.3.2) seem to run ok.</p><p> </p><p>The following errors were reported in the tomcat log file:</p><p> </p><p>[font="'courier new', courier, monospace;"]ay 9, 2014 4:45:10 PM org.eclipse.birt.chart.reportitem.ChartReportItemImpl deserialize[/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Exception[/font]</p><p>[font="'courier new', courier, monospace;"]org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with uri 'null' not found. (file:///Users/john/Software/apache-tomcat-7.0.39/webapps/BIRTViewer/WEB-INF/test.chart, 1, 31)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:77)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:185)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:240)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1505)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.birt.chart.model.impl.SerializerImpl.fromXml(SerializerImpl.java:465)[/font]</p><p>[font="'courier new', courier, monospace;"]...[/font]</p><p>[font="'courier new', courier, monospace;"]Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'null' not found. (file:///Users/john/Software/apache-tomcat-7.0.39/webapps/BIRTViewer/WEB-INF/test.chart, 1, 31)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1302)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1463)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1014)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:996)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:707)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)[/font]</p><p>[font="'courier new', courier, monospace;"]...[/font]</p><p>[font="'courier new', courier, monospace;"] ... 81 more[/font]</p><p>[font="'courier new', courier, monospace;"]May 9, 2014 4:45:10 PM org.eclipse.birt.chart.reportitem.ChartReportItemImpl serialize[/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Exception[/font]</p><p>[font="'courier new', courier, monospace;"]java.lang.NullPointerException[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.birt.chart.model.impl.SerializerImpl.asXml(SerializerImpl.java:186)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.birt.chart.reportitem.ChartReportItemImpl.serialize(ChartReportItemImpl.java:269)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.birt.report.model.extension.PeerExtensibilityProvider.getReportItemExtensionProperty(PeerExtensibilityProvider.java:316)[/font]</p><p>[font="'courier new', courier, monospace;"]...[/font]</p><p>[font="'courier new', courier, monospace;"]May 9, 2014 4:45:10 PM org.eclipse.birt.chart.reportitem.ChartReportItemImpl deserialize[/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Exception[/font]</p><p>[font="'courier new', courier, monospace;"]org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Premature end of file.[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:195)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:240)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1505)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.birt.chart.model.impl.SerializerImpl.fromXml(SerializerImpl.java:465)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.birt.chart.reportitem.ChartReportItemImpl.deserialize(ChartReportItemImpl.java:295)[/font]</p><p>[font="'courier new', courier, monospace;"]...[/font]</p><p>[font="'courier new', courier, monospace;"]Caused by: org.xml.sax.SAXParseException: Premature end of file.[/font]</p><p>[font="'courier new', courier, monospace;"] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)[/font]</p><p>[font="'courier new', courier, monospace;"]...[/font]</p><p>[font="'courier new', courier, monospace;"] ... 29 more[/font]</p><p>[font="'courier new', courier, monospace;"]May 9, 2014 4:45:10 PM org.eclipse.birt.chart.reportitem.ChartReportItemImpl serialize[/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Exception[/font]</p><p>[font="'courier new', courier, monospace;"]java.lang.NullPointerException[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.birt.chart.model.impl.SerializerImpl.asXml(SerializerImpl.java:186)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.birt.chart.reportitem.ChartReportItemImpl.serialize(ChartReportItemImpl.java:269)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.birt.report.model.extension.PeerExtensibilityProvider.hasLocalPropertyValuesOnOwnModel(PeerExtensibilityProvider.java:850)[/font]</p><p>[font="'courier new', courier, monospace;"]...[/font]</p><p>[font="'courier new', courier, monospace;"]May 9, 2014 4:45:10 PM org.eclipse.birt.chart.reportitem.ChartReportItemImpl serialize[/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Exception[/font]</p><p>[font="'courier new', courier, monospace;"]java.lang.NullPointerException[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.birt.chart.model.impl.SerializerImpl.asXml(SerializerImpl.java:186)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.birt.chart.reportitem.ChartReportItemImpl.serialize(ChartReportItemImpl.java:269)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.birt.report.model.extension.PeerExtensibilityProvider.getReportItemExtensionProperty(PeerExtensibilityProvider.java:316)[/font]</p><p>[font="'courier new', courier, monospace;"]...[/font]</p><p>[font="'courier new', courier, monospace;"] at java.lang.Thread.run(Thread.java:695)[/font]</p><p>[font="'courier new', courier, monospace;"]May 9, 2014 4:45:10 PM org.eclipse.birt.chart.reportitem.ChartReportItemImpl serialize[/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Exception[/font]</p><p>[font="'courier new', courier, monospace;"]java.lang.NullPointerException[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.birt.chart.model.impl.SerializerImpl.asXml(SerializerImpl.java:186)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.birt.chart.reportitem.ChartReportItemImpl.serialize(ChartReportItemImpl.java:269)[/font]</p><p>[font="'courier new', courier, monospace;"] at org.eclipse.birt.report.model.extension.PeerExtensibilityProvider.hasLocalPropertyValuesOnOwnModel(PeerExtensibilityProvider.java:850)[/font]</p><p>[font="'courier new', courier, monospace;"]...[/font]</p><p> </p><p> </p><p>Does anyone know what is causing this issue?</p><p> </p><p>I don't think this this is related, but the viewer also seems to be missing some tag library description files, as can be seen from the following messages (also from the tomcat logs):</p><p> </p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/partitions] and URI [/WEB-INF/partitions.tld][/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/system] and URI [/WEB-INF/system.tld][/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/volume] and URI [/WEB-INF/volume.tld][/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/filetypes] and URI [/WEB-INF/filetypes.tld][/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/jobs] and URI [/WEB-INF/jobs.tld][/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/filesfolders] and URI [/WEB-INF/filesfolders.tld][/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/script] and URI [/WEB-INF/script.tld][/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/commoncontrols] and URI [/WEB-INF/commoncontrols.tld][/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/servers] and URI [/WEB-INF/servers.tld][/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/groups] and URI [/WEB-INF/groups.tld][/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/viewer] and URI [/WEB-INF/viewer.tld][/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/systemvolumes] and URI [/WEB-INF/systemvolumes.tld][/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/channels] and URI [/WEB-INF/channels.tld][/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/roles] and URI [/WEB-INF/roles.tld][/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/users] and URI [/WEB-INF/users.tld][/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/login] and URI [/WEB-INF/login.tld][/font]</p><p>[font="'courier new', courier, monospace;"]WARNING: Failed to process TLD with path [/printers] and URI [/WEB-INF/printers.tld][/font]</p><p> </p><p>And the following mesages are also reported:</p><p> </p><p>[font="'courier new', courier, monospace;"]original url: __report=simple-html5.rptdesign[/font]</p><p>[font="'courier new', courier, monospace;"]final converted url: /executereport.do?__requesttype=immediate&__osViewer=&__newWindow=false&__executablename=%2Fsimple-html5.rptdesign&repositoryType=Workgroup[/font]</p><p>[font="'courier new', courier, monospace;"]- Property 'charAt' has no read method. SKIPPED[/font]</p><p>[font="'courier new', courier, monospace;"]- Property 'length' has no read method. SKIPPED[/font]</p><p> </p><p>I am a BIRT newbie so please forgive if this is posted in the wrong forum - not quite sure where to post.</p><p> </p><p>Thanks in advance,</p><p> </p><p>John</p>