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

failed to export a Book whose name has a space

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 6.0.0
    • 6.0.0.FL
    • None
    • Security Level: Jimmy
    • None
    • None

      Steps to Reproduce

      1. import a blank file like
        Book book = importer.imports(getFile("blank.xlsx"), "book name has space");
      2. export the book to xlsx file

      Current Result

      io.keikai.range.impl.imexp.ExportException: Fail to export xlsx from book book name has space
      at io.keikai.range.impl.imexp.AbstractExcelExporter.export(AbstractExcelExporter.java:338) ~[keikai-model-6.0.0.FL.20231124-Eval.jar:?]
      at io.keikai.api.impl.ExporterImpl.export(ExporterImpl.java:52) ~[keikai-6.0.0.FL.20231124-Eval.jar:?]
      at io.keikai.devref.model.ExportComposer.doExport(ExportComposer.java:37) ~[classes/:?]
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
      at org.zkoss.zk.ui.select.Selectors$ComposerEventListener.onEvent(Selectors.java:673) ~[zk-10.0.0-Beta-Eval.jar:10.0.0-Beta]
      at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:3216) ~[zk-10.0.0-Beta-Eval.jar:10.0.0-Beta]
      at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3186) ~[zk-10.0.0-Beta-Eval.jar:10.0.0-Beta]
      at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3128) ~[zk-10.0.0-Beta-Eval.jar:10.0.0-Beta]
      at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138) ~[zk-10.0.0-Beta-Eval.jar:10.0.0-Beta]
      at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1893) ~[zk-10.0.0-Beta-Eval.jar:10.0.0-Beta]
      at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1665) ~[zk-10.0.0-Beta-Eval.jar:10.0.0-Beta]
      at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1328) ~[zk-10.0.0-Beta-Eval.jar:10.0.0-Beta]
      at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:532) ~[zk-10.0.0-Beta-Eval.jar:10.0.0-Beta]
      at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:408) ~[zk-10.0.0-Beta-Eval.jar:10.0.0-Beta]
      at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:416) ~[zk-10.0.0-Beta-Eval.jar:10.0.0-Beta]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) ~[javax.servlet-api-3.1.0.jar:3.1.0]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api-3.1.0.jar:3.1.0]
      at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1386) ~[jetty-servlet-9.4.27.v20200227.jar:9.4.27.v20200227]
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755) ~[jetty-servlet-9.4.27.v20200227.jar:9.4.27.v20200227]
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617) ~[?:?]
      at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226) ~[websocket-server-9.4.27.v20200227.jar:9.4.27.v20200227]
      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.lang.Thread.run(Thread.java:829) ~[?:?]
      Caused by: java.lang.IllegalArgumentException: Invalid target - java.net.URISyntaxException: Illegal character in path at index 4: book name has space
      at org.apache.poi.openxml4j.opc.PackagePart.addExternalRelationship(PackagePart.java:196) ~[poi-ooxml-5.2.4.jar:5.2.4]
      at org.apache.poi.openxml4j.opc.PackagePart.addExternalRelationship(PackagePart.java:158) ~[poi-ooxml-5.2.4.jar:5.2.4]
      at org.apache.poi.xssf.model.ExternalLinksTable.setLinkedFileName(ExternalLinksTable.java:131) ~[poi-ooxml-5.2.4.jar:5.2.4]
      at org.apache.poi.xssf.usermodel.XSSFWorkbook.linkExternalWorkbook(XSSFWorkbook.java:2081) ~[poi-ooxml-5.2.4.jar:5.2.4]
      at io.keikai.range.impl.imexp.AbstractExcelExporter.lambda$export$0(AbstractExcelExporter.java:203) ~[keikai-model-6.0.0.FL.20231124-Eval.jar:?]
      at java.util.ArrayList.forEach(ArrayList.java:1541) ~[?:?]
      at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1085) ~[?:?]
      at io.keikai.range.impl.imexp.AbstractExcelExporter.export(AbstractExcelExporter.java:203) ~[keikai-model-6.0.0.FL.20231124-Eval.jar:?]
      ... 57 more

      Expected Result

      successfully exported a book without an error

      Debug Information

      • it doesn't happen on 5.12.2

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

              Created:
              Updated:
              Resolved: