这个错误是由于缺少log4j-core库引起的。要解决这个问题,需要将log4j-core库添加到项目的classpath中。

如果你正在使用Maven构建项目,可以在pom.xml文件中添加以下依赖项:

<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-core</artifactId>
    <version>2.14.1</version>
</dependency>

如果你没有使用Maven,可以手动下载log4j-core库的jar文件,并将其添加到项目的classpath中。

另外,还需要确保你的项目中没有其他版本的poi和poi-ooxml库。如果有其他版本的库存在,可能会导致冲突。你可以通过删除冲突的库或者使用适当的版本来解决这个问题。

完成以上操作后,重新运行你的程序,应该就能够解决这个错误了。

ERROR StatusLogger Log4j2 could not find a logging implementation Please add log4j-core to the classpath Using SimpleLogger to log to the consoleException in thread main javalangNoSuchMethodError byte

原文地址: https://www.cveoy.top/t/topic/hALd 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录