Just upgraded spring boot to version 3.2.1 (Using Jetty) and started getting below error. Any idea how to resolve this? Or graphql-spqr-spring-boot-starter:1.0.0 is only compatible with older version of spring boot?
2024-01-04T17:31:09,780 WARN qtp666678445-176 org.eclipse.jetty.ee10.servlet.ServletChannel - /graphql
jakarta.servlet.ServletException: Request processing failed: java.lang.IllegalStateException: Cannot resolve parameter names for constructor public io.leangen.graphql.spqr.spring.web.dto.GraphQLRequest(java.lang.String,java.lang.String,java.lang.String,java.util.Map)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1022) ~[spring-webmvc-6.1.2.jar:6.1.2]
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914) ~[spring-webmvc-6.1.2.jar:6.1.2]
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:547) ~[jakarta.servlet-api-6.0.0.jar:6.0.0]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) ~[spring-webmvc-6.1.2.jar:6.1.2]
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614) ~[jakarta.servlet-api-6.0.0.jar:6.0.0]
at org.eclipse.jetty.ee10.servlet.ServletHolder.handle(ServletHolder.java:736) ~[jetty-ee10-servlet-12.0.5.jar:12.0.5]
at org.eclipse.jetty.ee10.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1614) ~[jetty-ee10-servlet-12.0.5.jar:12.0.5]
at org.eclipse.jetty.ee10.websocket.servlet.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:195) ~[jetty-ee10-websocket-servlet-12.0.5.jar:12.0.5]
at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205) ~[jetty-ee10-servlet-12.0.5.jar:12.0.5]
at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586) ~[jetty-ee10-servlet-12.0.5.jar:12.0.5]
at org.springframework.web.filter.ServerHttpObservationFilter.doFilterInternal(ServerHttpObservationFilter.java:109) ~[spring-web-6.1.2.jar:6.1.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.1.2.jar:6.1.2]
at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205) ~[jetty-ee10-servlet-12.0.5.jar:12.0.5]
at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586) ~[jetty-ee10-servlet-12.0.5.jar:12.0.5]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-6.1.2.jar:6.1.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.1.2.jar:6.1.2]
at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205) ~[jetty-ee10-servlet-12.0.5.jar:12.0.5]
at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586) ~[jetty-ee10-servlet-12.0.5.jar:12.0.5]
at org.eclipse.jetty.ee10.servlet.ServletHandler$MappedServlet.handle(ServletHandler.java:1547) ~[jetty-ee10-servlet-12.0.5.jar:12.0.5]
at org.eclipse.jetty.ee10.servlet.ServletChannel.dispatch(ServletChannel.java:797) [jetty-ee10-servlet-12.0.5.jar:12.0.5]
at org.eclipse.jetty.ee10.servlet.ServletChannel.handle(ServletChannel.java:428) [jetty-ee10-servlet-12.0.5.jar:12.0.5]
at org.eclipse.jetty.ee10.servlet.ServletHandler.handle(ServletHandler.java:464) [jetty-ee10-servlet-12.0.5.jar:12.0.5]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:571) [jetty-security-12.0.5.jar:12.0.5]
at org.eclipse.jetty.ee10.servlet.SessionHandler.handle(SessionHandler.java:703) [jetty-ee10-servlet-12.0.5.jar:12.0.5]
at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:761) [jetty-server-12.0.5.jar:12.0.5]
at org.eclipse.jetty.server.Server.handle(Server.java:179) [jetty-server-12.0.5.jar:12.0.5]
at org.eclipse.jetty.server.internal.HttpChannelState$HandlerInvoker.run(HttpChannelState.java:594) [jetty-server-12.0.5.jar:12.0.5]
at org.eclipse.jetty.server.internal.HttpConnection.onFillable(HttpConnection.java:424) [jetty-server-12.0.5.jar:12.0.5]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322) [jetty-io-12.0.5.jar:12.0.5]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99) [jetty-io-12.0.5.jar:12.0.5]
at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) [jetty-io-12.0.5.jar:12.0.5]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:971) [jetty-util-12.0.5.jar:12.0.5]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1201) [jetty-util-12.0.5.jar:12.0.5]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1156) [jetty-util-12.0.5.jar:12.0.5]
at java.base/java.lang.Thread.run(Thread.java:833) [?:?]
Ok, after further investigation issue gets resolved once I re compiled graphql-spqr-spring-boot-starter project with compilerArgs -parameters.
tested by adding below under maven-compiler-plugin section into file https://github.com/leangen/graphql-spqr-spring-boot-starter/blob/master/pom.xml
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
Is it possible to have a minor fix/release ? or avoid introspection?
Refer below link for more details on Spring 6 and Parameter Name Retention issues/resolution. https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x
The latest version of GraphQL SPQR Spring Boot starter (v1.0.1) fixes this.
Btw, the next release will be v2.0.0 and will be based on Spring GraphQL, and won't have any custom HTTP/WebSocket level code.