AxonServerNonTransientRemoteQueryHandlingException

I have a deserializing error when i execute the below api

 @GetMapping("{type}")
 public List<Response> findConfigurationItems(@PathVariable("type") ConfigurationType configurationType) throws ExecutionException, InterruptedException {
    return queryGateway.query(new FindConfigItemsByTypeQuery(configurationType), ResponseTypes.multipleInstancesOf(Response.class)).get();
 }

data class FindConfigItemsByTypeQuery(val configurationType: ConfigurationType): Serializable

enum class ConfigurationType { BUSSINESOFFER, DIET }

data class Response(
        val externalId: String,
        val code: String,
        val label: String,
        val active: Boolean,
        val configurationType: ConfigurationType,
        val subConfigurationItems: Set<SubConfigurationItem>?
)

org.axonframework.axonserver.connector.query.AxonServerNonTransientRemoteQueryHandlingException: An exception was thrown by the remote message handling component: Error while deserializing object
Caused by Cannot construct instance of com.tt.views.api.FindConfigItemsByTypeQuery (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (byte)“{“configurationType”:“BUSSINESOFFER”}”; line: 1, column: 2]
at org.axonframework.axonserver.connector.ErrorCode.lambda$static$18(ErrorCode.java:127) ~[axon-server-connector-4.6.1.jar:4.6.1]
at org.axonframework.axonserver.connector.ErrorCode.convert(ErrorCode.java:201) ~[axon-server-connector-4.6.1.jar:4.6.1]
at org.axonframework.axonserver.connector.query.GrpcBackedResponseMessage.(GrpcBackedResponseMessage.java:65) ~[axon-server-connector-4.6.1.jar:4.6.1]
at org.axonframework.axonserver.connector.query.QuerySerializer.deserializeResponse(QuerySerializer.java:215) ~[axon-server-connector-4.6.1.jar:4.6.1]
at org.axonframework.axonserver.connector.query.AxonServerQueryBus$ResponseProcessingTask.run(AxonServerQueryBus.java:868) ~[axon-server-connector-4.6.1.jar:4.6.1]
at org.axonframework.tracing.Span.run(Span.java:72) ~[axon-messaging-4.6.1.jar:4.6.1]
at org.axonframework.tracing.Span.lambda$wrapRunnable$0(Span.java:90) ~[axon-messaging-4.6.1.jar:4.6.1]
at org.axonframework.axonserver.connector.PriorityRunnable.run(PriorityRunnable.java:58) ~[axon-server-connector-4.6.1.jar:4.6.1]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

What does the Response class look like?

I updated the question, i added the Response class.

Do you use the no-arg compiler plugin?

No i don’t use it
when i exlude the axon-server-connector, the error disappears

            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <sourceDirs>
                                <sourceDir>${project.basedir}/src/main/java</sourceDir>
                            </sourceDirs>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <jvmTarget>${java.version}</jvmTarget>
                    <javaParameters>true</javaParameters>
                    <args>
                        <arg>-Xjvm-default=all</arg>
                    </args>
                </configuration>
            </plugin>

It disappears because it doesn’t need to serialize and deserialize the Response anymore when you remove the connector, since it stays is the same JVM. If you use Kotlin data classes with Jackson serialization, which seems to be the case, you need the no-args plugin AFAIK.