question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.NoClassDefFoundError: graphql/schema/DataFetcher

See original GitHub issue

I follow https://www.graphql-java.com/documentation/master/getting-started/ and bump into this error:

Error: Unable to initialize main class com.mycompany.app.App Caused by: java.lang.NoClassDefFoundError: graphql/schema/DataFetcher

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
bbakermancommented, Nov 7, 2018

Sorry but we cant really help you write a java program via issues on the graphql-java project. Its just too wide a field to say “how do I write a Java program”

I recommend you get yourself a copy of a great IDE like Intellij IDEA or Eclipse and read a bunch of beginner tutorials.

0reactions
bhaskeycommented, May 16, 2022

I started reading the graphql-java tutorial and faced the same error. I haven’t found it out where, but it seems this is because it is SL4J is required somewhere graphql-java, and it has to be in the classpath.

Please feel free to correct me if I am wrong!

Adding sl4j in classpath, solved this for me.

dependencies {
    implementation 'org.slf4j:slf4j-simple:2.0.0-alpha7'
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.NoClassDefFoundError: graphql/execution ...
The short answer is to upgrade the version of graphql-spring-boot-starter and graphql-java-tools such that they use the same version of graphql- ...
Read more >
graphql-java-kickstart/Lobby - Gitter
I am still getting this error Caused by: java.lang.ClassNotFoundException: kotlin.coroutines.ContinuationInterceptor. Please help if you have any solution.
Read more >
Execution - GraphQL Java
schema.PropertyDataFetcher to examine Java POJO objects to provide field values from them. If your don't specify a data fetcher on a field, this...
Read more >
Spring for GraphQL Documentation
A GraphQL Java application can register a DataFetcherExceptionHandler to decide how to represent exceptions from the data layer in the ...
Read more >
Schema parser options - GraphQL Java Kickstart
Options: contextClass : If you use a custom context object to execute your queries, let the parser know about it so that it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found