Classpath issue on 2.1.0
elineback opened this issue · comments
When I tried running a copy locally with 2.1.0 I get the following error. But on 2.0.7 it works.
An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.apollographql.federation.graphqljava.Federation.addScalarsToRuntimeWiring(Federation.java:219)
The following method did not exist:
'graphql.schema.idl.RuntimeWiring$Builder graphql.schema.idl.RuntimeWiring.newRuntimeWiring(graphql.schema.idl.RuntimeWiring)'
The calling method's class, com.apollographql.federation.graphqljava.Federation, was loaded from the following location:
jar:file:/Users/eric.lineback/.gradle/caches/modules-2/files-2.1/com.apollographql.federation/federation-graphql-java-support/2.0.8/52fad3ee09e896a6cd13f816adcdc134e9ee4e8/federation-graphql-java-support-2.0.8.jar!/com/apollographql/federation/graphqljava/Federation.class
The called method's class, graphql.schema.idl.RuntimeWiring, is available from the following locations:
jar:file:/Users/eric.lineback/.gradle/caches/modules-2/files-2.1/com.graphql-java/graphql-java/18.3/d30b46b4db4818fc6547d233b7aef5af6dcfe715/graphql-java-18.3.jar!/graphql/schema/idl/RuntimeWiring.class
The called method's class hierarchy was loaded from the following locations:
graphql.schema.idl.RuntimeWiring: file:/Users/eric.lineback/.gradle/caches/modules-2/files-2.1/com.graphql-java/graphql-java/18.3/d30b46b4db4818fc6547d233b7aef5af6dcfe715/graphql-java-18.3.jar
Action:
Correct the classpath of your application so that it contains compatible versions of the classes com.apollographql.federation.graphqljava.Federation and graphql.schema.idl.RuntimeWiring
Hello 👋
Your issue seems to be caused by usage of old version of graphql-java
(v18.3). Latest versions of federation-jvm
use graphql-java
v19.2.
Try updating your project to use latest version of graphql-java
. If you are using spring-graphql
, its BOM it will try to pull in v18.3 and you have to explicitly override it.
thanks