Hi, I was playing with http4k 5.2 TraceBullet and ...
# http4k
Hi, I was playing with http4k 5.2 TraceBullet and got this error when trying to start a test: "Failed to register extension via @RegisterExtension field [private final org.http4k.tracing.junit.TracerBulletEvents it.multidialogo.bankmavserviceproxy.MainStressTest.events]: field must not be private."
the code is simply a copy and paste from an example:
Copy code
class MainStressTest {
    val actor = ActorResolver {
        Actor(it.metadata["service"].toString(), ActorType.System)

    // this events implementation will automatically capture the HTTP traffic
    val events = TracerBulletEvents(
        listOf(HttpTracer(actor)), // A tracer to capture HTTP calls
        listOf(PumlSequenceDiagram), // Render the HTTP traffic as a PUML diagram
        TraceRenderPersistence.FileSystem(File(".")) // Store the result
For some reason it is trying to access the JVM field instead of the getter. Try adding the @JvmField annotation?
(to events)
with that annotation it works
i am using jdk 17 don't know if can be the cause
it might be - I've seen that before but never asked enough to find out why! ­čÖé
thanks a lot!
but could be a problem running an http4k 5.2 app with jdk 17?
the last version in aws codebuild is still 17 I see
we're running on 17 at one of my clients - should be fine