Files
spring-modulith-demo/cqrs/output/03-missing-parameters-flag-failure.txt
asmhatre b4a623b889 Add cqrs module: CQRS in Spring Boot Without a Framework
Separate write/read DataSources, a JPA command side, and two interchangeable
projection listeners (sync and @Async) demonstrating the real latency-versus-
freshness trade-off CQRS forces. Includes a reflection-based proof that the
query side has no dependency on the write side, and a real failure/fix
transcript for the -parameters compiler flag this standalone reactor doesn't
inherit from spring-boot-starter-parent.
2026-10-03 20:59:55 +00:00

22 lines
1.9 KiB
Plaintext

Captured by temporarily building this module without the <parameters>true</parameters>
maven-compiler-plugin configuration (this module does not inherit spring-boot-starter-parent,
which is what normally adds that flag for free), then running the SyncProfileLatencyTest,
which calls GET /order-summaries/{orderId} over real HTTP. The real, unedited response and
server-side exception:
DEBUG raw body: {"timestamp":"2026-10-03T20:54:06.783Z","status":500,"error":"Internal Server Error","path":"/order-summaries/c6fc4ad0-f98e-4e05-92a8-8717e9bffced"}
2026-10-04T02:24:06.801+05:30 ERROR 16353 --- [cqrs] [o-auto-1-exec-3] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.IllegalArgumentException: Name for argument of type [java.lang.String] not specified, and parameter name information not available via reflection. Ensure that the compiler uses the '-parameters' flag.] with root cause
java.lang.IllegalArgumentException: Name for argument of type [java.lang.String] not specified, and parameter name information not available via reflection. Ensure that the compiler uses the '-parameters' flag.
Re-adding <parameters>true</parameters> to cqrs/pom.xml's maven-compiler-plugin configuration
and re-running the exact same test produces the green run captured in
00-sync-profile-latency.txt, with a 200 and a real body instead of this 500.
Worth noting on the way past: order-fulfillment's OrderController (post #31) has the exact
same unqualified @PathVariable Long id, in the exact same kind of standalone-reactor module
with no inherited parent -- it has just never been caught, because that module's own test
suite exercises its event-publication behaviour through Spring Modulith's
PublishedEventsExtension rather than through a real HTTP call to GET /orders/{id}. The bug is
latent there, not fixed; flagged separately rather than changed here.