Apache POI从3.17更新到4.1.1

时间:2019-12-30 17:41:15

标签: java apache-poi

我使用POI 3.17,并将XWPFChart更新为4.1.1。

首先,我在测试中遇到了这个问题:

NoClassDefFound Could not initialize class ...

通过添加1个依赖项并将其替换为最后一个位置 ooxml-schemas

解决了此问题
         <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>4.1.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml-schemas</artifactId>
            <version>4.1.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>4.1.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.xmlbeans</groupId>
            <artifactId>xmlbeans</artifactId>
            <version>3.1.0</version>
        </dependency>

      <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>ooxml-schemas</artifactId>
        <version>1.3</version>
      </dependency>

现在我有一个错误:

  

valueLogger.error(/ document / html3,{})   org.apache.commons.jxpath.JXPathNotFoundException:xpath没有值:/ document / html3

在下面的代码中:

 public void error(String xpath, Throwable throwable) {
            LOGGER.info("valueLogger.error({},{})", xpath, throwable);
        }

但是我没有改变!

0 个答案:

没有答案