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

I can't get it started #10

Open
ugdpy opened this issue Aug 8, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@ugdpy
Copy link

commented Aug 8, 2018

Hello

I can't start the demo, the application just throw this stacktrace. I'm really struggling right now in my application trying to create mutations, the queries works just fine. But since I started the mutation, I can't implement a mutation that handle complex shema and I get the same error...


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'graphQLSchema' defined in class path resource [io/leangen/graphql/spqr/spring/autoconfigure/SpqrAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [graphql.schema.GraphQLSchema]: Factory method 'graphQLSchema' threw exception; nested exception is io.leangen.graphql.metadata.exceptions.TypeMappingException: Parameter "tags" of method "createProject" is missing generic type parameters and can not be mapped. For details and possible solutions see https://github.com/leangen/graphql-spqr/wiki/Errors#ambiguous-method-parameter-type
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:587) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1250) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:541) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$102/1985836631.getObject(Unknown Source) ~[na:na]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
	at io.leangen.graphql.samples.StarterDemoApplication.main(StarterDemoApplication.java:10) [classes/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [graphql.schema.GraphQLSchema]: Factory method 'graphQLSchema' threw exception; nested exception is io.leangen.graphql.metadata.exceptions.TypeMappingException: Parameter "tags" of method "createProject" is missing generic type parameters and can not be mapped. For details and possible solutions see https://github.com/leangen/graphql-spqr/wiki/Errors#ambiguous-method-parameter-type
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:579) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	... 19 common frames omitted
Caused by: io.leangen.graphql.metadata.exceptions.TypeMappingException: Parameter "tags" of method "createProject" is missing generic type parameters and can not be mapped. For details and possible solutions see https://github.com/leangen/graphql-spqr/wiki/Errors#ambiguous-method-parameter-type
	at io.leangen.graphql.metadata.strategy.query.AnnotatedArgumentBuilder.buildResolverArguments(AnnotatedArgumentBuilder.java:40) ~[spqr-0.9.7.jar:na]
	at io.leangen.graphql.metadata.strategy.query.AnnotatedResolverBuilder.lambda$buildResolvers$3(AnnotatedResolverBuilder.java:84) ~[spqr-0.9.7.jar:na]
	at io.leangen.graphql.metadata.strategy.query.AnnotatedResolverBuilder$$Lambda$469/1465179762.apply(Unknown Source) ~[na:na]
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_11]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_11]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_11]
	at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1540) ~[na:1.8.0_11]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512) ~[na:1.8.0_11]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502) ~[na:1.8.0_11]
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_11]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_11]
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[na:1.8.0_11]
	at io.leangen.graphql.metadata.strategy.query.AnnotatedResolverBuilder.buildResolvers(AnnotatedResolverBuilder.java:86) ~[spqr-0.9.7.jar:na]
	at io.leangen.graphql.metadata.strategy.query.AnnotatedResolverBuilder.buildMutationResolvers(AnnotatedResolverBuilder.java:60) ~[spqr-0.9.7.jar:na]
	at io.leangen.graphql.generator.OperationRepository.lambda$buildMutationResolvers$17(OperationRepository.java:154) ~[spqr-0.9.7.jar:na]
	at io.leangen.graphql.generator.OperationRepository$$Lambda$490/164757726.apply(Unknown Source) ~[na:na]
	at io.leangen.graphql.generator.OperationRepository.lambda$null$19(OperationRepository.java:168) ~[spqr-0.9.7.jar:na]
	at io.leangen.graphql.generator.OperationRepository$$Lambda$464/1445999733.apply(Unknown Source) ~[na:na]
	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267) ~[na:1.8.0_11]
	at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[na:1.8.0_11]
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[na:1.8.0_11]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512) ~[na:1.8.0_11]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502) ~[na:1.8.0_11]
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[na:1.8.0_11]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[na:1.8.0_11]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_11]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[na:1.8.0_11]
	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:270) ~[na:1.8.0_11]
	at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1540) ~[na:1.8.0_11]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512) ~[na:1.8.0_11]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502) ~[na:1.8.0_11]
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_11]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_11]
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[na:1.8.0_11]
	at io.leangen.graphql.generator.OperationRepository.buildResolvers(OperationRepository.java:170) ~[spqr-0.9.7.jar:na]
	at io.leangen.graphql.generator.OperationRepository.buildMutationResolvers(OperationRepository.java:153) ~[spqr-0.9.7.jar:na]
	at io.leangen.graphql.generator.OperationRepository.<init>(OperationRepository.java:45) ~[spqr-0.9.7.jar:na]
	at io.leangen.graphql.GraphQLSchemaGenerator.generate(GraphQLSchemaGenerator.java:888) ~[spqr-0.9.7.jar:na]
	at io.leangen.graphql.spqr.spring.autoconfigure.SpqrAutoConfiguration.graphQLSchema(SpqrAutoConfiguration.java:178) ~[graphql-spqr-spring-boot-autoconfigure-0.0.1.jar:na]
	at io.leangen.graphql.spqr.spring.autoconfigure.SpqrAutoConfiguration$$EnhancerBySpringCGLIB$$8c9e12b0.CGLIB$graphQLSchema$0(<generated>) ~[graphql-spqr-spring-boot-autoconfigure-0.0.1.jar:na]
	at io.leangen.graphql.spqr.spring.autoconfigure.SpqrAutoConfiguration$$EnhancerBySpringCGLIB$$8c9e12b0$$FastClassBySpringCGLIB$$9f7a986f.invoke(<generated>) ~[graphql-spqr-spring-boot-autoconfigure-0.0.1.jar:na]
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	at io.leangen.graphql.spqr.spring.autoconfigure.SpqrAutoConfiguration$$EnhancerBySpringCGLIB$$8c9e12b0.graphQLSchema(<generated>) ~[graphql-spqr-spring-boot-autoconfigure-0.0.1.jar:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_11]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_11]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_11]
	at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_11]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
	... 20 common frames omitted
Caused by: io.leangen.graphql.metadata.exceptions.TypeMappingException: Type java.util.List is unbounded or missing generic type parameters
	at io.leangen.graphql.util.ClassUtils.completeGenerics(ClassUtils.java:506) ~[spqr-0.9.7.jar:na]
	at io.leangen.graphql.metadata.strategy.type.DefaultTypeTransformer.transform(DefaultTypeTransformer.java:28) ~[spqr-0.9.7.jar:na]
	at io.leangen.graphql.metadata.strategy.query.AnnotatedArgumentBuilder.buildResolverArguments(AnnotatedArgumentBuilder.java:38) ~[spqr-0.9.7.jar:na]
	... 68 common frames omitted```

@DevJoseWeb

This comment has been minimized.

Copy link

commented Jan 11, 2019

update POM


4.0.0

<groupId>io.leangen.spqr.samples</groupId>
<artifactId>spring-boot-demo</artifactId>
<version>1.0.0</version>

<name>Spring Boot demo</name>
<description>Demo project for GraphQL SPQR</description>

<parent>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-parent</artifactId>
	<version>2.1.1.RELEASE</version>
	<relativePath/> <!-- lookup parent from repository -->
</parent>

<dependencies>

	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-web</artifactId>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-actuator</artifactId>
	</dependency>

	<!--SPQR-->
	<dependency>
		<groupId>io.leangen.graphql</groupId>
		<artifactId>spqr</artifactId>
		<version>RELEASE</version>
	</dependency>

	<dependency>
		<groupId>io.projectreactor</groupId>
		<artifactId>reactor-core</artifactId>
		<version>RELEASE</version>
	</dependency>

</dependencies>

<build>
	<finalName>spqr-demo</finalName>

	<plugins>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-compiler-plugin</artifactId>
			<version>3.8.0</version>
			<configuration>
				<source>1.8</source>
				<target>1.8</target>
				<compilerArgument>-parameters</compilerArgument>
				<testCompilerArgument>-parameters</testCompilerArgument>
			</configuration>
		</plugin>
		<plugin>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-maven-plugin</artifactId>
		</plugin>
	</plugins>

</build>
@gmkumar2005

This comment has been minimized.

Copy link

commented Feb 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.