Closed bbortt closed 1 month ago
There is a problem also in Linux hosts with version 4.3.1. With 4.2.1 works ok. Could there be another bug? @christophd @bbortt
Failed to create File system from jar 'jar:nested:/app/application.jar/!BOOT-INF/lib/citrus-api-4.3.1.jar!/'
java.nio.file.NoSuchFileException: ested:/app/application.jar/!BOOT-INF/lib/citrus-api-4.3.1.jar!
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:166)
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getZipFileSystem(ZipFileSystemProvider.java:125)
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:120)
at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:528)
at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:475)
at org.citrusframework.spi.ResourcePathTypeResolver.<clinit>(ResourcePathTypeResolver.java:122)
at org.citrusframework.endpoint.EndpointBuilder.<clinit>(EndpointBuilder.java:52)
at org.citrusframework.http.endpoint.builder.HttpEndpoints.<init>(HttpEndpoints.java:31)
at org.citrusframework.http.endpoint.builder.HttpEndpoints.http(HttpEndpoints.java:39)
oh damn.. that's a bug introduced in bd7ebff8c34909b0d17c399e7c8b9349c2562d0a and released in 4.3.0
.
the "fix" commit 3ddf451bf699a81e155b4adfb1ca5401e16a0fe2 and and #1200 have nothing to do with this bug, because that would fail on windows likewise. the code just furiously sub-strings on file:
. even if citrus-api
is in a nested jar.
I've opened #1204.
oh and thanks for reporting it @jurgis-sipols 😉
Citrus Version
Release 4.3.0.
Expected behavior
Citrus-Simulator (or tests, but I didn't test that) starts on Windows hosts.
Actual behavior
It does not, because https://github.com/citrusframework/citrus/commit/bd7ebff8c34909b0d17c399e7c8b9349c2562d0a introduces a bug:
Path#of
throws on Windows, because the:
is an illegal character:new File(ROOT.toString().substring("file:".length())).toPath()
should be used instead.