Axon 4 org.axonframework.queryhandling.NoHandlerForQueryException: No handler for query

Hi,

all runs fine with my queries, but as far as I debug one time my query code, the following Exceptions occurs for ALL queries after that:
org.axonframework.queryhandling.NoHandlerForQueryException: No handler for query: com.***.FindMeQuery

“FindMeQuery” changes depending on the query.

Only a restart of my backend solves this behavior. So, untill now I thought this is only a development machine problem, But today I saw this message on the testserver. How can I solve this behavior?

Best Regards
Denis

Hi Denis,

I’m having the same problem, after some time all queries start to return that exception.

The only way to fix this behavior now is restarting applications.

I tried to configure a heartbeat between axon server and applications, but the problem persists.

Which version of AxonFramework and AxonServer to you use?

Last DockerHub Version of axoniq/axonserver and following entries in pom.xml:

  <dependency>
    <artifactId>axon-spring-boot-starter</artifactId>
    <groupId>org.axonframework</groupId>
    <version>4.3.1</version>
  </dependency>
  <dependency>
    <groupId>org.axonframework.extensions.mongo</groupId>
    <artifactId>axon-mongo</artifactId>
    <version>4.3</version>
  </dependency>
</dependencies>

Thx for your answer, Allard. To reproduce simply put a breakpoint in a QueryHandler, wait a minute within this breakpoint and all request after that will fail. I don’t know if this is the same reason on server side, but the error message and behavior is the same … Maybe the trigger is a slow QueryHandler?

I have to correct myself: I use “latest” of axoniq/axonserver but the container is 3 month old.

Hi,

there is a related fix in 4.3.2. Since 4.3.3 is also out, I recommend updating to that one straight away.

The issue solved in 4.3.2 is related to the QueryBus not reconnecting properly. This is generally triggered by a connection failure. Waiting on a breakpoint usually blocks the entire JVM, which causes the networks to miss heartbeats. This issue causes the client to poorly recover from the disconnections.

Please let me know if you see improvements in the 4.3.3 version.

Cheers,

Yes, you’re right … the new version fixed this problem on my development machine. Thank you very much, Allard.

The new version fixed my problem too, I was using 4.3.1.

Thanks!