ZK Spreadsheet

throw exception when drawing unsupported chart in xls format

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Normal Normal
  • Resolution: Fixed
  • Affects Version/s: 2.6.0, 3.0.0 RC
  • Fix Version/s: 3.0.0
  • Component/s: ZSS Range & Model
  • Labels:
    None

Description

It will throw exception when drawing unsupported chart in xls format.
e.g. Radar char, Pie of Pie chart, Surface chart and etc.

But ZSS won't throw exception in xlsx format.

reproducing steps:

  1. load a xls file with unsupported chart
    • or directly use attached file radar.xls
  2. ZSS throw exception

stack trace:

2013-07-08 18:02:08.630:WARN::/radar.zul
java.lang.NullPointerException
	at org.zkoss.poi.hssf.usermodel.HSSFChart.getChartType(HSSFChart.java:1364)
	at org.zkoss.poi.hssf.usermodel.HSSFChart.<init>(HSSFChart.java:1381)
	at org.zkoss.zssex.model.impl.DrawingAggregateRecord.decodeChartStream0(DrawingAggregateRecord.java:436)
	at org.zkoss.zssex.model.impl.DrawingAggregateRecord.decodeChartStream(DrawingAggregateRecord.java:328)
	at org.zkoss.zssex.model.impl.DrawingAggregateRecord.createChart(DrawingAggregateRecord.java:316)
	at org.zkoss.zssex.model.impl.DrawingAggregateRecord.decodeEscherRecord(DrawingAggregateRecord.java:236)
	at org.zkoss.zssex.model.impl.DrawingAggregateRecord.decodeEscherRecord(DrawingAggregateRecord.java:248)
	at org.zkoss.zssex.model.impl.DrawingAggregateRecord.decodeEscherRecord(DrawingAggregateRecord.java:248)
	at org.zkoss.zssex.model.impl.DrawingAggregateRecord.decodeShape(DrawingAggregateRecord.java:152)
	at org.zkoss.zssex.model.impl.DrawingManagerImpl.initHSSFDrawings(DrawingManagerImpl.java:257)
	at org.zkoss.zssex.model.impl.DrawingManagerImpl.initDrawings(DrawingManagerImpl.java:138)
	at org.zkoss.zssex.model.impl.DrawingManagerImpl.getPictures(DrawingManagerImpl.java:106)
	at org.zkoss.zssex.ui.widget.DefaultBookWidgetLoader.preparePictureWidgets(DefaultBookWidgetLoader.java:99)
	at org.zkoss.zssex.ui.widget.DefaultBookWidgetLoader.onSheetSelected(DefaultBookWidgetLoader.java:90)
	at org.zkoss.zss.ui.Spreadsheet.afterSheetSelected(Spreadsheet.java:4031)
	at org.zkoss.zss.ui.Spreadsheet.getSelectedXSheet(Spreadsheet.java:653)
	at org.zkoss.zss.ui.Spreadsheet.doInvalidate(Spreadsheet.java:4135)
	at org.zkoss.zss.ui.Spreadsheet.invalidate(Spreadsheet.java:3534)
	at org.zkoss.zss.ui.Spreadsheet.setSrc(Spreadsheet.java:685)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.zkoss.zk.ui.metainfo.Property.assign0(Property.java:284)
	at org.zkoss.zk.ui.metainfo.Property.assign(Property.java:169)
	at org.zkoss.zk.ui.metainfo.ComponentInfo.applyProperties(ComponentInfo.java:729)
	at org.zkoss.zk.ui.impl.AbstractUiFactory.newComponent(AbstractUiFactory.java:106)
	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:809)
	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:778)
	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:687)
	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:651)
	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:824)
	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:778)
	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:687)
	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:749)
	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:709)
	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:651)
	at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:401)
	at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:316)
	at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:215)
	at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:136)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

Activity

Hide
dennis added a comment - 09/Sep/13 7:38 AM

it throws exception in 2003 and show a empty chart block in 2007

Show
dennis added a comment - 09/Sep/13 7:38 AM it throws exception in 2003 and show a empty chart block in 2007
Hide
dennis added a comment - 11/Sep/13 4:34 AM

fixed since 2013/9/11 , it currently displays a empty block if the chart is not supported.

Show
dennis added a comment - 11/Sep/13 4:34 AM fixed since 2013/9/11 , it currently displays a empty block if the chart is not supported.

People

Vote (0)
Watch (0)

Dates

  • Created:
    08/Jul/13 10:08 AM
    Updated:
    18/Sep/13 1:51 AM
    Resolved:
    11/Sep/13 4:34 AM