Uploaded image for project: 'Keikai'
  1. Keikai
  2. KEIKAI-403

the importer can accept an empty print options

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Normal Normal
    • 5.6.0
    • 5.5.0
    • None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      1. import https://drive.google.com/file/d/1BQJCHDVCXmBK9qBlAEF3VPuZ6dBDQqXO/view?usp=sharing

      Current Result

      io.keikai.importer.ImportException: Fail to import print area in sheet Sheet1 from book Security_Patch.xlsx
      at io.keikai.importer.XlsxImporter.imports(XlsxImporter.java:319)
      at io.keikai.range.impl.imexp.ExcelImportAdapter.imports(ExcelImportAdapter.java:48)
      at io.keikai.range.impl.imexp.AbstractImporter.imports(AbstractImporter.java:57)
      at io.keikai.ui.Spreadsheet.getSBook(Spreadsheet.java:675)
      at io.keikai.ui.Spreadsheet.getSelectedSSheet(Spreadsheet.java:854)
      at io.keikai.ui.Spreadsheet.doInvalidate(Spreadsheet.java:2591)
      at io.keikai.ui.Spreadsheet.invalidate(Spreadsheet.java:2448)
      at io.keikai.ui.Spreadsheet.setSrc(Spreadsheet.java:903)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at org.zkoss.zk.ui.metainfo.Property.assign0(Property.java:332)
      at org.zkoss.zk.ui.metainfo.Property.assign(Property.java:174)
      at org.zkoss.zk.ui.metainfo.ComponentInfo.applyProperties(ComponentInfo.java:742)
      at org.zkoss.zk.ui.impl.AbstractUiFactory.newComponent(AbstractUiFactory.java:150)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:927)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:897)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:784)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:844)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:802)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:748)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:469)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:377)
      at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:220)
      at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:146)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1386)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)
      at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:590)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1300)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1215)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      at org.eclipse.jetty.server.Server.handle(Server.java:500)
      at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
      at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
      at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
      at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
      at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
      at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
      at java.base/java.lang.Thread.run(Thread.java:844)
      Caused by: java.lang.NullPointerException
      at io.keikai.util.XlsxJsonHelper.toBool(XlsxJsonHelper.java:62)
      at io.keikai.importer.XlsxExtractor$XlsxPrintOptionsExtractor.isHorizontalCentered(XlsxExtractor.java:4646)
      at io.keikai.importer.XlsxImporter.importPrintArea(XlsxImporter.java:432)
      at io.keikai.importer.XlsxImporter.imports(XlsxImporter.java:316)

      Expected Result

      no error

      Debug Information

      • printOptions != null but its jsonMap is null

      Workaround

      open the file in Excel and save it again

            henrichen henrichen
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: