ADDITIONAL SYSTEM INFORMATION :
ubuntu + OpenJDK11.0.7
A DESCRIPTION OF THE PROBLEM :
In the project vertx-web-openapi there are this static statement:
```
static {
try {
openapiSchemaURI = OpenAPIHolderImpl.class.getResource("/openapi_3_schema.json").toURI();
openapiSchemaJson = new JsonObject(
String.join("",
Files.readAllLines(Paths.get(openapiSchemaURI)) < -- here where the problem occurs
)
);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
```
The exception is being thrown when calling Paths.of() with the URI given from the already found resource from Class.getResource().
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
The problem can be detected using the code from the vertx-web-openapi project here:
https://github.com/vert-x3/vertx-web/blob/5289b7669ecf589d95711d070f8b7c6870e52ce0/vertx-web-openapi/src/main/java/io/vertx/ext/web/openapi/impl/OpenAPIHolderImpl.java#L54
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The expected result is to return a valid path from the Class.getResource URI properly.
ACTUAL -
14:25:05|Launcher|INFO |b.c.c.m.b.m.a.exec.ServerLauncher|running on Java VM [version: 11.0.7, name: OpenJDK 64-Bit Server VM, vendor: Ubuntu, max memory: 3974MB, processors: 4]
14:25:11|Launcher|ERROR|b.c.c.m.b.m.a.exec.ServerLauncher|Error deploying HTTP API Server vertice|[vert.x-eventloop-thread-0:468]
java.lang.ExceptionInInitializerError: null
at io.vertx.ext.web.openapi.RouterFactory.create(RouterFactory.java:196)
at io.vertx.ext.web.openapi.RouterFactory.create(RouterFactory.java:181)
at br.com.c8tech.mmarket.backend.common.http.vertx.AbstractHttpApiVerticle.buildOpenApiRouterFactory(AbstractHttpApiVerticle.java:336)
at br.com.c8tech.mmarket.backend.common.http.vertx.AbstractHttpApiVerticle.buildRouter(AbstractHttpApiVerticle.java:378)
at io.vertx.core.Future.lambda$compose$2(Future.java:245)
at io.vertx.core.impl.FutureImpl.doDispatch(FutureImpl.java:127)
at io.vertx.core.impl.FutureImpl.dispatch(FutureImpl.java:119)
at io.vertx.core.impl.FutureImpl.onComplete(FutureImpl.java:97)
at io.vertx.core.Future.compose(Future.java:241)
at io.vertx.core.Future.compose(Future.java:200)
at br.com.c8tech.mmarket.backend.common.http.vertx.AbstractHttpApiVerticle.startInternal(AbstractHttpApiVerticle.java:677)
at br.com.c8tech.mmarket.backend.common.vertx.AbstractComponentVerticle.start(AbstractComponentVerticle.java:192)
at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$5(DeploymentManager.java:203)
at io.vertx.core.impl.AbstractContext.emit(AbstractContext.java:181)
at io.vertx.core.impl.EventLoopContext.lambda$execute$0(EventLoopContext.java:39)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: java.nio.file.FileSystemNotFoundException
at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.<clinit>(OpenAPIHolderImpl.java:58)
... 22 common frames omitted
Caused by: java.nio.file.FileSystemNotFoundException: null
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:169)
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:155)
at java.base/java.nio.file.Path.of(Path.java:208)
at java.base/java.nio.file.Paths.get(Paths.java:97)
at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.<clinit>(OpenAPIHolderImpl.java:54)
FREQUENCY : always
ubuntu + OpenJDK11.0.7
A DESCRIPTION OF THE PROBLEM :
In the project vertx-web-openapi there are this static statement:
```
static {
try {
openapiSchemaURI = OpenAPIHolderImpl.class.getResource("/openapi_3_schema.json").toURI();
openapiSchemaJson = new JsonObject(
String.join("",
Files.readAllLines(Paths.get(openapiSchemaURI)) < -- here where the problem occurs
)
);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
```
The exception is being thrown when calling Paths.of() with the URI given from the already found resource from Class.getResource().
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
The problem can be detected using the code from the vertx-web-openapi project here:
https://github.com/vert-x3/vertx-web/blob/5289b7669ecf589d95711d070f8b7c6870e52ce0/vertx-web-openapi/src/main/java/io/vertx/ext/web/openapi/impl/OpenAPIHolderImpl.java#L54
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The expected result is to return a valid path from the Class.getResource URI properly.
ACTUAL -
14:25:05|Launcher|INFO |b.c.c.m.b.m.a.exec.ServerLauncher|running on Java VM [version: 11.0.7, name: OpenJDK 64-Bit Server VM, vendor: Ubuntu, max memory: 3974MB, processors: 4]
14:25:11|Launcher|ERROR|b.c.c.m.b.m.a.exec.ServerLauncher|Error deploying HTTP API Server vertice|[vert.x-eventloop-thread-0:468]
java.lang.ExceptionInInitializerError: null
at io.vertx.ext.web.openapi.RouterFactory.create(RouterFactory.java:196)
at io.vertx.ext.web.openapi.RouterFactory.create(RouterFactory.java:181)
at br.com.c8tech.mmarket.backend.common.http.vertx.AbstractHttpApiVerticle.buildOpenApiRouterFactory(AbstractHttpApiVerticle.java:336)
at br.com.c8tech.mmarket.backend.common.http.vertx.AbstractHttpApiVerticle.buildRouter(AbstractHttpApiVerticle.java:378)
at io.vertx.core.Future.lambda$compose$2(Future.java:245)
at io.vertx.core.impl.FutureImpl.doDispatch(FutureImpl.java:127)
at io.vertx.core.impl.FutureImpl.dispatch(FutureImpl.java:119)
at io.vertx.core.impl.FutureImpl.onComplete(FutureImpl.java:97)
at io.vertx.core.Future.compose(Future.java:241)
at io.vertx.core.Future.compose(Future.java:200)
at br.com.c8tech.mmarket.backend.common.http.vertx.AbstractHttpApiVerticle.startInternal(AbstractHttpApiVerticle.java:677)
at br.com.c8tech.mmarket.backend.common.vertx.AbstractComponentVerticle.start(AbstractComponentVerticle.java:192)
at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$5(DeploymentManager.java:203)
at io.vertx.core.impl.AbstractContext.emit(AbstractContext.java:181)
at io.vertx.core.impl.EventLoopContext.lambda$execute$0(EventLoopContext.java:39)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: java.nio.file.FileSystemNotFoundException
at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.<clinit>(OpenAPIHolderImpl.java:58)
... 22 common frames omitted
Caused by: java.nio.file.FileSystemNotFoundException: null
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:169)
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:155)
at java.base/java.nio.file.Path.of(Path.java:208)
at java.base/java.nio.file.Paths.get(Paths.java:97)
at io.vertx.ext.web.openapi.impl.OpenAPIHolderImpl.<clinit>(OpenAPIHolderImpl.java:54)
FREQUENCY : always