当我将tess4j添加到依赖项时,它会抛出以下错误:
Error occurred during initialization of boot layer
java.lang.module.ResolutionException: Modules slf4j.simple and logback.classic export package org.slf4j.impl to module xmlgraphics.commons
我知道,有一些依赖关系使用与tess4j相同的“org.slf4j.impl”。我的依赖项如下:
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>14</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>14</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-swing</artifactId>
<version>14</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.11</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.20</version>
</dependency>
<dependency>
<groupId>com.company.sap</groupId>
<artifactId>com.sap.conn.jco.sapjco</artifactId>
<version>3.1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/technology.tabula/tabula -->
<dependency>
<groupId>technology.tabula</groupId>
<artifactId>tabula</artifactId>
<version>1.0.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.7</version>
</dependency>
<dependency>
<groupId>com.onepassion</groupId>
<artifactId>SDScomXML</artifactId>
<version>1.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans -->
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>3.1.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>29.0-jre</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.sourceforge.tess4j/tess4j -->
<dependency>
<groupId>net.sourceforge.tess4j</groupId>
<artifactId>tess4j</artifactId>
<version>4.5.2</version>
</dependency>
</dependencies>
我怎么知道哪个包裹是“有问题”的?我该如何修复它以不导出errortext中指定的包?
1条答案
按热度按时间2cmtqfgy1#
多亏了这个堆垛机,我解决了这个问题。似乎logback classic和slf4j两个模块都来自tess4j。我只是给他们增加了这样的例外:
现在它似乎开始正常,没有任何错误。也许日志不再工作了,但这对我来说没关系。