I am kind of stuck on where to look. on startup of the application I receive the following error:
Could not resolve parameter [2] in public org.springframework.http.ResponseEntity<java.lang.String> com.vaadin.hilla.EndpointController.serveEndpoint(java.lang.String,java.lang.String,com.fasterxml.jackson.databind.node.ObjectNode,jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse): Content-Type 'text/plain;charset=UTF-8' is not supported
Also in the trace logging I cannot find what endpoint is causing this issue.
Has anybody got some hints for me on where to look further into this?
That error message is generated by Spring and seems to indicate that the body of your request is in text/plain format where a JSON body is expected to be assigned to an ObjectNode.
EndpointController is mapped to /connect by default, so unless you have changed the default mapping, it should not receive a call sent to /VAADIN. The two things should be unrelated.
The original error clearly mentions com.vaadin.hilla.EndpointController.serveEndpoint, which is mapped to /connect. As I wrote before, Vaadin push shouldn’t be the cause of that error.
Despite being near each other in the logs, they should be unrelated.
I suggest to inspect any request coming from the browser to the Hilla endpoint to find the one that gets the error returned.
If really the push call is going to the Hilla endpoint, the project is misconfigured. Do you have vaadin.endpoint.prefix in your application properties?
Hello Luciano, your last comment gave me a hint and it turned out the @EnableWebMvc was on which caused all this. so a custom WebMvc fixed the issue. Thankyou for the help