Hi,

This has been discussed in a Debian bug report here:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=912333

The bug is not in Debian but is due to the latest release of OpenJDK 8 which improved validation of the class-path in JAR files:

| Improved Validation of Class-Path Attribute in JAR File Manifest (core-libs)
|
| The JAR file specification states that URLs in the Class-Path manifest attribute must be relative, | though this has not been enforced. To better conform to the JAR specification, absolute URLs | (those that include a scheme) are now ignored. For JAR files not loaded from the file system, | Class-Path entries navigating to a parent directory (using "../") are also ignored.
|
| Applications depending on a JAR file loaded from an absolute URL element specified in | Class-Path attribute may encounter a ClassNotFoundException. The historical behavior can be | restored by setting a new system property, jdk.net.URLClassPath.disableClassPathURLCheck | to true. Debugging info for Class-Path entries that are ignored can be printed to stderr by
| setting -Djdk.net.URLClassPath.disableClassPathURLCheck=debug.


Any Jar file that uses non-relative URLs in the manifest will suffer from ClassNotFoundException.

This affects the maven-surefire-plugin and under the latest OpenJDK 8 no tests can be run. This is at least true for JUnit 5 tests.

One solution as posted is to ignore the system class loader:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=912333#63

Note however that later in the thread this is stated that it breaks some Spring Boot integration tests. So there may not be a one size fits solution. Either try modifying the configuration to disable the system class loader, or downgrade Open JDK 8 until the surefire plugin is fixed.

Regards,

Alex


On 02/11/2018 12:34, Bernd Eckenfels wrote:
Hello,

Do you mean 8u191 introduced a problem? What error do you get in which project?

Gruss
Bernd

Gruss
Bernd
--
http://bernd.eckenfels.net

________________________________
Von: Aleksander Ściborek <aleksanderscibo...@gmail.com>
Gesendet: Freitag, November 2, 2018 12:35 PM
An: Commons Developers List
Betreff: [all] maven surefire plugin crashes after JDK updated - solution

Hi,
after I had installed the update of JDK8 i found that the maven surefire
plugin doesn't work correctly.
The resolution is to add following lines in plugins section:

<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>


Aleksander


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to