Found interface org.apache.poi.util.POILogger, but class was expected

Found interface org.apache.poi.util.POILogger, but class was expected

Found interface org.apache.poi.util.POILogger, but class was expected_第1张图片

错误代码,没有任何地方报错,猜测应该是jar包问题

Found interface org.apache.poi.util.POILogger, but class was expected_第2张图片我们使用idea自带的pom依赖图来分析

在这里插入图片描述

这是原本的pom文件,我们分析一下冲突
Found interface org.apache.poi.util.POILogger, but class was expected_第3张图片

<dependencies>
    <dependency>
        <groupId>fr.opensagres.xdocreportgroupId>
        <artifactId>fr.opensagres.poi.xwpf.converter.xhtmlartifactId>
        <version>2.0.2version>
    dependency>
    <dependency>
        <groupId>org.apache.poigroupId>
        <artifactId>poiartifactId>
        <version>4.1.2version>
    dependency>
    <dependency>
        <groupId>org.apache.poigroupId>
        <artifactId>poi-scratchpadartifactId>
        <version>4.0.1version>
    dependency>
    <dependency>
        <groupId>cn.hutoolgroupId>
        <artifactId>hutool-allartifactId>
        <version>5.7.19version>
    dependency>
    <dependency>
        <groupId>org.jsoupgroupId>
        <artifactId>jsoupartifactId>
        <version>1.11.3version>
    dependency>
    <dependency>
        <groupId>org.springframeworkgroupId>
        <artifactId>spring-webartifactId>
        <version>5.3.9version>
    dependency>
dependencies>

我们把下面的删除在测试一下

  <dependencies>
        <dependency>
            <groupId>fr.opensagres.xdocreportgroupId>
            <artifactId>fr.opensagres.poi.xwpf.converter.xhtmlartifactId>
            <version>2.0.2version>
        dependency>





        <dependency>
            <groupId>org.apache.poigroupId>
            <artifactId>poi-scratchpadartifactId>
            <version>4.0.1version>
        dependency>
        <dependency>
            <groupId>cn.hutoolgroupId>
            <artifactId>hutool-allartifactId>
            <version>5.7.19version>
        dependency>
        <dependency>
            <groupId>org.jsoupgroupId>
            <artifactId>jsoupartifactId>
            <version>1.11.3version>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-webartifactId>
            <version>5.3.9version>
        dependency>
    dependencies>

Found interface org.apache.poi.util.POILogger, but class was expected_第4张图片

完成,运行正常

你可能感兴趣的:(踩坑,踩坑指南,bug,poi)