【发布时间】:2022-01-27 16:12:30
【问题描述】:
SpringBoot,试图生成一个包含枢轴的 xlsx 文件,但每次它都会因这个堆栈跟踪而崩溃。
使用 xmlbeans 5.0.3
XML-BEANS compiled schema: Could not locate compiled schema resource org/apache/poi/schemas/ooxml/system/ooxml/ctstring4cdatype.xsb (org.apache.poi.schemas.ooxml.system.ooxml.ctstring4cdatype)
代码行是e.addNewS();
XSSFPivotCacheDefinition a = pivotTable.getPivotCacheDefinition();
CTPivotCacheDefinition b = a.getCTPivotCacheDefinition();
CTCacheFields c = b.getCacheFields();
CTCacheField d = c.getCacheFieldArray(index);
CTSharedItems e = d.getSharedItems();
CTString f = e.addNewS();
f.setV(value);
我使用字符从 a 到 f 进行划分,因为我不知道是哪一行。
我注意到它正在尝试连接到这个 url http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument
我不知道该怎么办,我要疯了......
【问题讨论】:
-
“您是否尝试过将其关闭再打开?” POI / XmlBeans 的短语是:“您是否确认您正在使用正确的依赖项运行并且在类路径中没有重复项?” ...通常人们将旧的模式 jar 保存在依赖项中
标签: java spring spring-boot xlsx xmlbeans