Commit 94d4175
authored
Require io.vertx.auth.common module (vert-x3#2716)
Currently, io.vertx.auth.common is required only for compilation.
However, it contains the io.vertx.ext.auth.audit.SecurityAudit class, that is used in io.vertx.ext.web.impl.RoutingContextImplBase.
Consequently, if users don't add the module requirement in their application, it fails when the first request is sent with:
Feb 07, 2025 10:54:29 AM io.vertx.core.impl.ContextImpl
SEVERE: Unhandled exception
java.lang.NoClassDefFoundError: Lio/vertx/ext/auth/audit/SecurityAudit;
at java.base/java.lang.Class.getDeclaredFields0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3061)
at java.base/java.lang.Class.getDeclaredField(Class.java:2409)
at java.base/java.util.concurrent.atomic.AtomicIntegerFieldUpdater$AtomicIntegerFieldUpdaterImpl$1.run(AtomicIntegerFieldUpdater.java:398)
at java.base/java.util.concurrent.atomic.AtomicIntegerFieldUpdater$AtomicIntegerFieldUpdaterImpl$1.run(AtomicIntegerFieldUpdater.java:396)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.atomic.AtomicIntegerFieldUpdater$AtomicIntegerFieldUpdaterImpl.<init>(AtomicIntegerFieldUpdater.java:395)
at java.base/java.util.concurrent.atomic.AtomicIntegerFieldUpdater.newUpdater(AtomicIntegerFieldUpdater.java:94)
at io.vertx.web@5.0.0.CR4/io.vertx.ext.web.impl.RoutingContextImplBase.<clinit>(RoutingContextImplBase.java:43)
So this is a buggy module declaration, because Auth Common is not only required by Vert.x Web during compilation, it's required at runtime.
Signed-off-by: Thomas Segismont <tsegismont@gmail.com>1 parent 2fe3a35 commit 94d4175
3 files changed
Lines changed: 3 additions & 3 deletions
File tree
- vertx-web-openapi-router/src
- main/java
- test/java
- vertx-web/src/main/java
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
0 commit comments