As reported by 3.2.0 RC1 release notes, we had to add
<loaderImplementation>CLASSIC</loaderImplementation>
to our spring-boot-maven-plugin definition in order to keep the generated exec JAR working.
Without the additional configuration, running java -jar ... leads to error
java.lang.ClassNotFoundException: org.apache.syncope.sra.SyncopeSRAApplication
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.loadClass(JarUrlClassLoader.java:94)
at org.springframework.boot.loader.launch.LaunchedClassLoader.loadClass(LaunchedClassLoader.java:91)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:534)
at java.base/java.lang.Class.forName(Class.java:513)
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:88)
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53)
at org.springframework.boot.loader.launch.PropertiesLauncher.main(PropertiesLauncher.java:563)
The application itself is based on Spring Cloud Gateway 4.1.0-M2.
No issues until 3.2.0-M3.
The full plugin definition: https://github.com/apache/syncope/blob/master/sra/pom.xml#L180C1-L199C16
Comment From: wilkinsona
Thanks for trying the release candidate, @ilgrosso. You should be able to work around the problem and use the new loader implementation by adding src/main/resources/loader.properties to your application with the following contents:
loader.path=BOOT-INF/classes/,BOOT-INF/lib/*
Comment From: ilgrosso
Thank you, I'll try this out.
Comment From: ilgrosso
@wilkinsona I confirm the workaround is effective, though I had to merge it with the existing LOADER_PATH env variable.
Is any of the two workarounds needed anyway for final 3.2.0?