jin.ye 发表于 2022-11-30 22:29:33

v5.2.5 无法打开文件(DOCXLS-7171)

本帖最后由 Richard.Ma 于 2022-12-1 12:14 编辑

无法打开文件



public static void main(String[] args) {
      String path = "L:\\下载文件\\资产减值损失.xlsx";
      FileInputStream fis = null;
      try {
            fis = new FileInputStream(path);
            Workbook wk = GcExcelWorkBookUtils.newWorkBook();
            wk.open(fis);
      } catch (Exception e) {
            ThrowExceptionUtils.doThrow(e);
      } finally {
            BaseCommonUtils.closeDgWorkpaperStream(fis, null, null);
      }
    }



D:\environment\jdk1.8.0_131\bin\java.exe -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:52077,suspend=y,server=n -javaagent:C:\Users\zhu.qiangfei\AppData\Local\JetBrains\IntelliJIdea2021.2\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath C:\Users\zhu.qiangfei\AppData\Local\Temp\classpath338939634.jar cn.com.bdo.dgCenter.service.GcExcelService
Connected to the target VM, address: '127.0.0.1:52077', transport: 'socket'
Exception in thread "main" 发生异常了。
类名:cn.com.bdo.base.exception.BaseException
错误信息:java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: java.lang.NullPointerException
详细信息:java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: java.lang.NullPointerException
      at cn.com.bdo.base.utils.ThrowExceptionUtils.doThrow(ThrowExceptionUtils.java:23)
      at cn.com.bdo.dgCenter.service.GcExcelService.main(GcExcelService.java:1644)
Caused by: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: java.lang.NullPointerException
      at com.grapecity.documents.excel.o.c.J.a(Unknown Source)
      at com.grapecity.documents.excel.Workbook.a(Unknown Source)
      at com.grapecity.documents.excel.Workbook.open(Unknown Source)
      at com.grapecity.documents.excel.Workbook.open(Unknown Source)
      at cn.com.bdo.dgCenter.service.GcExcelService.main(GcExcelService.java:1642)
Caused by: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: java.lang.NullPointerException
      at com.grapecity.documents.excel.o.c.J.a(Unknown Source)
      ... 5 more
Caused by: java.lang.IllegalArgumentException: java.lang.NullPointerException
      at com.grapecity.documents.excel.o.c.ax.a(Unknown Source)
      at com.grapecity.documents.excel.o.c.au.a(Unknown Source)
      at com.grapecity.documents.excel.o.c.au.a(Unknown Source)
      at com.grapecity.documents.excel.o.c.J.a(Unknown Source)
      ... 6 more
Caused by: java.lang.NullPointerException
      at com.grapecity.documents.excel.o.c.ax.a(Unknown Source)
      ... 10 more
Disconnected from the target VM, address: '127.0.0.1:52077', transport: 'socket'

Process finished with exit code 1


Lynn.Dou 发表于 2022-11-30 22:29:34

该问题计划在V6.0.1修复,您可以待发布后升级测试下,

Richard.Ma 发表于 2022-12-1 12:03:06

问题可以重现,需要发给研发调研一下原因,帖子暂时保留处理

Richard.Ma 发表于 2023-1-11 11:08:59

gcexcel6.0.2版本已经发布,请升级版即可解决问题
页: [1]
查看完整版本: v5.2.5 无法打开文件(DOCXLS-7171)