我正在使用 eclipse 版本:2022-03 (4.23.0) Build id: 20220310-1457 和 Maven。如果我在沒有 Maven 的情況下構建 - 它可以作業。
在安裝了新插件“Windows Builder”之前,我的 Maven 構建也運行良好。從那時起,我收到以下錯誤訊息:
constituent[40]: file:/C:/eclipse/configuration/org.eclipse.osgi/1285/0/.cp/
constituent[41]: file:/C:/eclipse/configuration/org.eclipse.osgi/443/0/.cp/
constituent[42]: file:/C:/eclipse/configuration/org.eclipse.osgi/20/0/.cp/
---------------------------------------------------
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/util/concurrent/internal/InternalFutureFailureAccess
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
我包括了前 3 行,因為當我比較舊配置時,configuration/org.eclipse.osgi 中有很多新檔案夾 - 這三個檔案夾肯定不在舊配置中,這似乎是導致問題的原因. 如果我洗掉這些檔案夾,eclipse 就不再起作用了。
以防萬一,這是我的 pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Schulefant</groupId>
<artifactId>MavenMitarbeiterGUIAndCI</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><!-- Auf diese properties wird unten mit ${} zugegriffen -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<junit.jupiter.version>5.8.1</junit.jupiter.version>
<junit.platform.version>1.8.1</junit.platform.version>
</properties>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope><!-- wird nur bei mvn test durchgeführt, aber nicht bei mvn compile -->
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite</artifactId>
<version>${junit.platform.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<argLine>
--illegal-access=permit
</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<argLine>
--illegal-access=permit
</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<archive>
<!-- Configures the content of the created manifest -->
<manifest>
<!-- Adds the classpath to the created manifest -->
<addClasspath>true</addClasspath>
<!-- Specifies that all dependencies of our application are found -->
<!-- Configures the main class of the application -->
<mainClass>RunMitarbeiterverwaltung</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>
uj5u.com熱心網友回復:
我終于找到了問題的根源。管理員安裝了 WindowBuilder 的 Nightly Build。如果只是安裝了 1.9.8 版本,一切都會再次運行。

轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/520084.html
上一篇:例外描述:配置錯誤。找不到類[com.microsoft.jdbc.sqlserver.SQLServerDriver]
