Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get an error of not support async for "ConfiguredGraphQLHttpServlet" #576

Open
willgss opened this issue Aug 5, 2024 · 0 comments
Open
Labels

Comments

@willgss
Copy link

willgss commented Aug 5, 2024

I go the following error when integrate graphql in to springboot with "graphql-spring-boot-starter".

Unable to start async because the following classes in the processing chain do not support async [graphql.kickstart.servlet.ConfiguredGraphQLHttpServlet]

java.lang.IllegalStateException: A filter or servlet of the current chain does not support asynchronous operations.

at org.apache.catalina.connector.Request.startAsync(Request.java:1509)

at org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:720)

at jakarta.servlet.ServletRequestWrapper.startAsync(ServletRequestWrapper.java:358)

at jakarta.servlet.ServletRequestWrapper.startAsync(ServletRequestWrapper.java:358)

at jakarta.servlet.ServletRequestWrapper.startAsync(ServletRequestWrapper.java:358)

at org.springframework.security.web.servletapi.HttpServlet3RequestFactory$Servlet3SecurityContextHolderAwareRequestWrapper.startAsync(HttpServlet3RequestFactory.java:213)

at graphql.kickstart.servlet.SingleAsynchronousQueryResponseWriter.write(SingleAsynchronousQueryResponseWriter.java:32)

at graphql.kickstart.servlet.HttpRequestInvokerImpl.writeResultResponse(HttpRequestInvokerImpl.java:152)

at graphql.kickstart.servlet.HttpRequestInvokerImpl.lambda$handleInternal$3(HttpRequestInvokerImpl.java:135)
....

the following is my pom dependencies:

    <dependency>
        <groupId>com.graphql-java-kickstart</groupId>
        <artifactId>graphql-spring-boot-starter</artifactId>
        <version>15.1.0</version>
        <exclusions>
            <exclusion>
                <groupId>com.graphql-java</groupId>
                <artifactId>graphql-java</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <!--the version 22.0 included by graphql-spring-boot-starter will cause server start failure,
     so we use this a lower version instead-->
    <dependency>
        <groupId>com.graphql-java</groupId>
        <artifactId>graphql-java</artifactId>
        <version>21.5</version>
    </dependency>

    <dependency>
        <groupId>com.graphql-java-kickstart</groupId>
        <artifactId>graphql-spring-boot-starter-test</artifactId>
        <version>15.1.0</version>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>com.graphql-java</groupId>
                <artifactId>graphql-java</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

Any idea about this issue? Thank you!

@willgss willgss added the bug label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant