我试图包含引用库中所需的所有 jar。这个论坛上有类似的问题,我已经解决了所有问题,但无法解决问题。
我的代码片段:
Workbook workbook = new XSSFWorkbook();
CreationHelper createHelper = workbook.getCreationHelper();
Sheet sheet = workbook.createSheet("Gene");
Font headerFont = workbook.createFont();
我使用的所有罐子
我收到以下错误:
异常堆栈跟踪:
org.apache.poi.ooxml.POIXMLException: org.apache.poi.ooxml.POIXMLException: java.lang.reflect.InvocationTargetException
at org.apache.poi.ooxml.POIXMLDocumentPart.createRelationship(POIXMLDocumentPart.java:602)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.createSheet(XSSFWorkbook.java:896)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.createSheet(XSSFWorkbook.java:807)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.createSheet(XSSFWorkbook.java:122)
at DomParser.main(DomParser.java:18)
Caused by: org.apache.poi.ooxml.POIXMLException: java.lang.reflect.InvocationTargetException
at org.apache.poi.ooxml.POIXMLFactory.newDocumentPart(POIXMLFactory.java:111)
at org.apache.poi.ooxml.POIXMLDocumentPart.createRelationship(POIXMLDocumentPart.java:587)
... 4 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:56)
at org.apache.poi.ooxml.POIXMLFactory.newDocumentPart(POIXMLFactory.java:109)
... 5 more
慕妹3242003
相关分类