Consider defining a bean of type 'graphql.kickstart.autoconfigure.tools.SchemaStringProvider' in your configuration.
cruzeMc opened this issue · 1 comments
2022-01-06 13:13:20.735 INFO [middleware,,] 25572 --- [ restartedMain] com.jncb.middleware.Application : Starting Application using Java 1.8.0_262 on MBZYK5H2 with PID 25572 (C:\Users\middleware\target\classes started by mcfarlanecm in C:\Users\middleware)
2022-01-06 13:13:20.737 DEBUG [middleware,,] 25572 --- [ restartedMain] com.jncb.middleware.Application : Running with Spring Boot v2.6.2, Spring v5.3.14
2022-01-06 13:13:20.737 INFO [middleware,,] 25572 --- [ restartedMain] com.jncb.middleware.Application : No active profile set, falling back to default profiles: default
2022-01-06 13:13:20.854 INFO [middleware,,] 25572 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2022-01-06 13:13:25.299 INFO [middleware,,] 25572 --- [ restartedMain] o.s.cloud.context.scope.GenericScope : BeanFactory id=7e46b1a7-3086-330e-9373-0d9cf6380b92
2022-01-06 13:13:30.255 INFO [middleware,,] 25572 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-01-06 13:13:30.275 INFO [middleware,,] 25572 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-01-06 13:13:30.276 INFO [middleware,,] 25572 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.56]
2022-01-06 13:13:30.971 INFO [middleware,,] 25572 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-01-06 13:13:30.971 INFO [middleware,,] 25572 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 10116 ms
2022-01-06 13:13:31.056 ERROR [middleware,,] 25572 --- [ restartedMain] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'graphQLServletRegistrationBean' defined in class path resource [graphql/kickstart/autoconfigure/web/servlet/GraphQLWebAutoConfiguration.class]: Unsatisfied dependency expressed through method 'graphQLServletRegistrationBean' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'graphQLHttpServlet' defined in class path resource [graphql/kickstart/autoconfigure/web/servlet/GraphQLWebAutoConfiguration.class]: Unsatisfied dependency expressed through method 'graphQLHttpServlet' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'graphQLServletConfiguration' defined in class path resource [graphql/kickstart/autoconfigure/web/servlet/GraphQLWebAutoConfiguration.class]: Unsatisfied dependency expressed through method 'graphQLServletConfiguration' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'invocationInputFactory' defined in class path resource [graphql/kickstart/autoconfigure/web/servlet/GraphQLWebAutoConfiguration.class]: Unsatisfied dependency expressed through method 'invocationInputFactory' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'graphQLSchemaProvider' defined in class path resource [graphql/kickstart/autoconfigure/web/servlet/GraphQLWebAutoConfiguration.class]: Unsatisfied dependency expressed through method 'graphQLSchemaProvider' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'graphQLSchema' defined in class path resource [graphql/kickstart/autoconfigure/tools/GraphQLJavaToolsAutoConfiguration.class]: Unsatisfied dependency expressed through method 'graphQLSchema' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'schemaParser' defined in class path resource [graphql/kickstart/autoconfigure/tools/GraphQLJavaToolsAutoConfiguration.class]: Unsatisfied dependency expressed through method 'schemaParser' parameter 1; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'graphql.kickstart.autoconfigure.tools.SchemaStringProvider' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2022-01-06 13:13:31.101 INFO [middleware,,] 25572 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2022-01-06 13:13:31.114 WARN [middleware,,] 25572 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
2022-01-06 13:13:31.160 INFO [middleware,,] 25572 --- [ restartedMain] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-01-06 13:13:31.244 ERROR [middleware,,] 25572 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
APPLICATION FAILED TO START
Description:
Parameter 1 of method schemaParser in graphql.kickstart.autoconfigure.tools.GraphQLJavaToolsAutoConfiguration required a bean of type 'graphql.kickstart.autoconfigure.tools.SchemaStringProvider' that could not be found.
Action:
Consider defining a bean of type 'graphql.kickstart.autoconfigure.tools.SchemaStringProvider' in your configuration.
Disconnected from the target VM, address: '127.0.0.1:54595', transport: 'socket'
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="Sun Microsystems Inc."
Process finished with exit code 0
For those also stumbling upon this, I got the same when upgrading from 11.0.0 to 14.0.0. Checking the dependency tree I found out that I had to update also the dependency https://github.com/tailrocks/graphql-java-datetime cause it was pulling v.11.0.0 and thus you'll end up with two auto configurer beans.