You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried using the new -Djarmode=tools mode with Spring Boot 3.3.0 on my application and the extraction failed (stack trace below). It turns out to be because my application has a META-INF directory with a service configuration. If I remove my src/main/resources/META-INF directory and build the fat jar again, the extraction succeeds.
./gradlew bootJar
cd build/libs
java -Djarmode=tools -jar terraware-server-*.jar extract
Stack trace:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91)
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53)
at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:58)
Caused by: java.lang.IllegalStateException: java.io.UncheckedIOException: java.util.zip.ZipException: duplicate entry: META-INF/services/
at org.springframework.boot.jarmode.tools.ToolsJarMode.run(ToolsJarMode.java:56)
at org.springframework.boot.loader.launch.JarModeRunner.main(JarModeRunner.java:43)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 4 more
Caused by: java.io.UncheckedIOException: java.util.zip.ZipException: duplicate entry: META-INF/services/
at org.springframework.boot.jarmode.tools.ExtractCommand.run(ExtractCommand.java:118)
at org.springframework.boot.jarmode.tools.Command.run(Command.java:112)
at org.springframework.boot.jarmode.tools.Runner.runCommand(Runner.java:68)
at org.springframework.boot.jarmode.tools.Runner.run(Runner.java:55)
at org.springframework.boot.jarmode.tools.Runner.run(Runner.java:47)
at org.springframework.boot.jarmode.tools.ToolsJarMode.run(ToolsJarMode.java:53)
... 6 more
Caused by: java.util.zip.ZipException: duplicate entry: META-INF/services/
at java.base/java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:259)
at java.base/java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:115)
at org.springframework.boot.jarmode.tools.ExtractCommand.lambda$createApplication$3(ExtractCommand.java:258)
at org.springframework.boot.jarmode.tools.ExtractCommand.withJarEntries(ExtractCommand.java:333)
at org.springframework.boot.jarmode.tools.ExtractCommand.createApplication(ExtractCommand.java:254)
at org.springframework.boot.jarmode.tools.ExtractCommand.run(ExtractCommand.java:114)
... 11 more
Relevant contents of jarfile (unzip -l terraware-server-*.jar | grep META-INF):
Tried using the new
-Djarmode=tools
mode with Spring Boot 3.3.0 on my application and the extraction failed (stack trace below). It turns out to be because my application has aMETA-INF
directory with a service configuration. If I remove mysrc/main/resources/META-INF
directory and build the fat jar again, the extraction succeeds.Repo: https://github.com/terraware/terraware-server
What I ran:
Stack trace:
Relevant contents of jarfile (
unzip -l terraware-server-*.jar | grep META-INF
):The text was updated successfully, but these errors were encountered: