graphql-java-kickstart / graphql-spring-boot

GraphQL and GraphiQL Spring Framework Boot Starters - Forked from oembedler/graphql-spring-boot due to inactivity.
https://www.graphql-java-kickstart.com/spring-boot/
MIT License
1.5k stars 325 forks source link

Graphql V13.0.0 issue - Failed to introspect Class [graphql.kickstart.autoconfigure.editor.graphiql.GraphiQLAutoConfiguration] #856

Closed kumaritian closed 2 years ago

kumaritian commented 2 years ago

After upgrading to V13.0.0 from V12.0.0, I am getting below error during application start up but with V12.0.0 there is no issue as application is started successfully.

          <dependency>
        <groupId>com.graphql-java-kickstart</groupId>
        <artifactId>graphql-spring-boot-starter</artifactId>
        <version>13.0.0</version>
    </dependency>
    <dependency>
        <groupId>com.graphql-java-kickstart</groupId>
        <artifactId>graphql-java-tools</artifactId>
        <version>13.0.0</version>
    </dependency>

Note:

  1. With <version>12.0.0</version> the application is started successfully.
  2. Spring boot version 2.7.2
  3. Already reported this issue [in[ ava.lang.IllegalStateException: Failed to introspect Class [graphql.kickstart.autoconfigure.editor.graphiql.GraphiQLAutoConfiguration]](https://github.com/graphql-java-kickstart/graphql-spring-boot/issues/763)](https://github.com/graphql-java-kickstart/graphql-spring-boot/issues/763)

Error java.lang.IllegalStateException: Failed to introspect Class [graphql.kickstart.autoconfigure.editor.graphiql.GraphiQLAutoConfiguration] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@22d8cfe0] at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:485) ~[spring-core-5.3.22.jar:5.3.22] ..... .... .... at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.2.jar:2.7.2] at com.mt.amp.pot.service.aggregator.ServiceAggregatorApplication.main(ServiceAggregatorApplication.java:22) ~[classes/:na] Caused by: java.lang.NoClassDefFoundError: org/springframework/web/reactive/function/server/RouterFunction at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na] at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[na:na] at java.base/java.lang.Class.getDeclaredMethods(Class.java:2504) ~[na:na] at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:467) ~[spring-core-5.3.22.jar:5.3.22] ... 21 common frames omitted Caused by: java.lang.ClassNotFoundException: org.springframework.web.reactive.function.server.RouterFunction at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na] ... 25 common frames omitted

Dependencies

dependencies_in_pom xml