quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.74k stars 2.67k forks source link

GraphQL tests failing right after a `clean` #27094

Closed carueda closed 2 years ago

carueda commented 2 years ago

Describe the bug

Unexpectedly, under a small project using quarkus and graphql (reproducer below), the following fails to complete fine:

./mvnw clean quarkus:test

Of course, the tests themselves are well formed and expected to pass (via workaround, see below).

Expected behavior

./mvnw clean quarkus:test

completes OK.

Actual behavior

Probably some incomplete instrumentation, but in any case, something is preventing the tests from proceeding/completing due to unexpected:

[error]: Build step io.quarkus.smallrye.graphql.deployment.SmallRyeGraphQLProcessor#buildExecutionService
 threw an exception: java.lang.NullPointerException:
 Cannot invoke "String.equals(Object)" because the return value of 
    "org.jboss.jandex.MethodParameterInfo.name()" is null

(full stacktrace below)

How to Reproduce?

Small reproducer at: https://github.com/carueda/quarkus-gql-issue

Clone and just run:

./mvnw clean quarkus:test

and the following happens:

➜  quarkus-gql-issue git:(main) ./mvnw clean quarkus:test
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< org.example:quarkus-gql-issue >--------------------
[INFO] Building quarkus-gql-issue 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ quarkus-gql-issue ---
[INFO] Deleting /Users/carueda/github/mbari-org/quarkus-gql-issue/target
[INFO]
[INFO] --- quarkus-maven-plugin:2.11.1.Final:test (default-cli) @ quarkus-gql-issue ---
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:resources) @ quarkus-gql-issue
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.1:compile) @ quarkus-gql-issue
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 9 source files to /Users/carueda/github/mbari-org/quarkus-gql-issue/target/classes
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:testResources) @ quarkus-gql-issue
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/carueda/github/mbari-org/quarkus-gql-issue/src/test/resources
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile) @ quarkus-gql-issue
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /Users/carueda/github/mbari-org/quarkus-gql-issue/target/test-classes
Listening for transport dt_socket at address: 5005

__  ____  __  _____   ___  __ ____  ______
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2022-08-02 13:42:33,167 INFO  [io.qua.test] (main) Quarkus continuous testing mode started

2022-08-02 13:42:33,442 INFO  [io.qua.test] (Test runner thread) Running 1/2. Running: #JUnit Jupiter
2022-08-02 13:42:33,461 INFO  [io.qua.test] (Test runner thread) Running 1/2. Running: org.example.graphql.EndpointTest#EndpointTest
2022-08-02 13:42:33,812 INFO  [org.jbo.threads] (Test runner thread) JBoss Threads version 3.4.2.Final
2022-08-02 13:42:34,592 INFO  [io.qua.test] (Test runner thread) Running 1/2. Running: org.example.graphql.EndpointTest#allProviders()
2022-08-02 13:42:34,598 INFO  [io.qua.test] (Test runner thread) Running 2/2. 1 failure so far. Running: org.example.graphql.EndpointTest#getProvider()
2022-08-02 13:42:34,607 ERROR [io.qua.test] (Test runner thread) ==================== TEST REPORT #1 ====================
2022-08-02 13:42:34,608 ERROR [io.qua.test] (Test runner thread) Test EndpointTest#allProviders() failed
: java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
    [error]: Build step io.quarkus.smallrye.graphql.deployment.SmallRyeGraphQLProcessor#buildExecutionService threw an exception: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "org.jboss.jandex.MethodParameterInfo.name()" is null
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$7.compare(OverridableIndex.java:160)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$7.compare(OverridableIndex.java:155)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$8.compare(OverridableIndex.java:199)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$8.compare(OverridableIndex.java:168)
    at java.base/java.util.TreeMap.compare(TreeMap.java:1570)
    at java.base/java.util.TreeMap.addEntryToEmptyMap(TreeMap.java:776)
    at java.base/java.util.TreeMap.put(TreeMap.java:785)
    at java.base/java.util.TreeMap.put(TreeMap.java:534)
    at java.base/java.util.TreeSet.add(TreeSet.java:255)
    at java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:336)
    at java.base/java.util.TreeSet.addAll(TreeSet.java:309)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex.overrideCollection(OverridableIndex.java:239)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex.getAnnotations(OverridableIndex.java:69)
    at io.smallrye.graphql.schema.helper.SourceOperationHelper.scanAllSourceAnnotations(SourceOperationHelper.java:51)
    at io.smallrye.graphql.schema.helper.SourceOperationHelper.<init>(SourceOperationHelper.java:30)
    at io.smallrye.graphql.schema.creator.type.AbstractCreator.addOperations(AbstractCreator.java:107)
    at io.smallrye.graphql.schema.creator.type.AbstractCreator.create(AbstractCreator.java:74)
    at io.smallrye.graphql.schema.creator.type.TypeCreator.create(TypeCreator.java:33)
    at io.smallrye.graphql.schema.creator.type.AbstractCreator.create(AbstractCreator.java:30)
    at io.smallrye.graphql.schema.SchemaBuilder.createAndAddToSchema(SchemaBuilder.java:255)
    at io.smallrye.graphql.schema.SchemaBuilder.addTypesToSchema(SchemaBuilder.java:160)
    at io.smallrye.graphql.schema.SchemaBuilder.generateSchema(SchemaBuilder.java:122)
    at io.smallrye.graphql.schema.SchemaBuilder.build(SchemaBuilder.java:87)
    at io.quarkus.smallrye.graphql.deployment.SmallRyeGraphQLProcessor.buildExecutionService(SmallRyeGraphQLProcessor.java:253)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:977)
    at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
    at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
    at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
    at java.base/java.lang.Thread.run(Thread.java:833)
    at org.jboss.threads.JBossThread.run(JBossThread.java:501)

    at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:634)
    at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:705)
    at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
    at org.junit.jupiter.api.extension.InvocationInterceptor.interceptTestClassConstructor(InvocationInterceptor.java:73)
    at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
    at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
    at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:77)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestClassConstructor(ClassBasedTestDescriptor.java:355)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateTestClass(ClassBasedTestDescriptor.java:302)
    at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateTestClass(ClassTestDescriptor.java:79)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:280)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:272)
    at java.base/java.util.Optional.orElseGet(Optional.java:364)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:271)
    at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:102)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:101)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:66)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    at org.junit.platform.engine.support.hical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:95)
    at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:91)
    at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:60)
    at io.quarkus.deployment.dev.testing.JunitTestRunner$2.run(JunitTestRunner.java:228)
    at io.quarkus.deployment.dev.testing.ModuleTestRunner$2.run(ModuleTestRunner.java:92)
    at io.quarkus.deployment.dev.testing.TestSupport.runInternal(TestSupport.java:390)
    at io.quarkus.deployment.dev.testing.TestSupport$2.run(TestSupport.java:310)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
    [error]: Build step io.quarkus.smallrye.graphql.deployment.SmallRyeGraphQLProcessor#buildExecutionService threw an exception: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "org.jboss.jandex.MethodParameterInfo.name()" is null
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$7.compare(OverridableIndex.java:160)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$7.compare(OverridableIndex.java:155)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$8.compare(OverridableIndex.java:199)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$8.compare(OverridableIndex.java:168)
    at java.base/java.util.TreeMap.compare(TreeMap.java:1570)
    at java.base/java.util.TreeMap.addEntryToEmptyMap(TreeMap.java:776)
    at java.base/java.util.TreeMap.put(TreeMap.java:785)
    at java.base/java.util.TreeMap.put(TreeMap.java:534)
    at java.base/java.util.TreeSet.add(TreeSet.java:255)
    at java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:336)
    at java.base/java.util.TreeSet.addAll(TreeSet.java:309)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex.overrideCollection(OverridableIndex.java:239)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex.getAnnotations(OverridableIndex.java:69)
    at io.smallrye.graphql.schema.helper.SourceOperationHelper.scanAllSourceAnnotations(SourceOperationHelper.java:51)
    at io.smallrye.graphql.schema.helper.SourceOperationHelper.<init>(SourceOperationHelper.java:30)
    at io.smallrye.graphql.schema.creator.type.AbstractCreator.addOperations(AbstractCreator.java:107)
    at io.smallrye.graphql.schema.creator.type.AbstractCreator.create(AbstractCreator.java:74)
    at io.smallrye.graphql.schema.creator.type.TypeCreator.create(TypeCreator.java:33)
    at io.smallrye.graphql.schema.creator.type.AbstractCreator.create(AbstractCreator.java:30)
    at io.smallrye.graphql.schema.SchemaBuilder.createAndAddToSchema(SchemaBuilder.java:255)
    at io.smallrye.graphql.schema.SchemaBuilder.addTypesToSchema(SchemaBuilder.java:160)
    at io.smallrye.graphql.schema.SchemaBuilder.generateSchema(SchemaBuilder.java:122)
    at io.smallrye.graphql.schema.SchemaBuilder.build(SchemaBuilder.java:87)
    at io.quarkus.smallrye.graphql.deployment.SmallRyeGraphQLProcessor.buildExecutionService(SmallRyeGraphQLProcessor.java:253)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:977)
    at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
    at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
    at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
    at java.base/java.lang.Thread.run(Thread.java:833)
    at org.jboss.threads.JBossThread.run(JBossThread.java:501)

    at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:330)
    at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:252)
    at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:60)
    at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:227)
    at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:611)
    at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:649)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$10(ClassBasedTestDescriptor.java:381)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:381)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:205)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:80)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148)
    ... 34 more
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
    [error]: Build step io.quarkus.smallrye.graphql.deployment.SmallRyeGraphQLProcessor#buildExecutionService threw an exception: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "org.jboss.jandex.MethodParameterInfo.name()" is null
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$7.compare(OverridableIndex.java:160)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$7.compare(OverridableIndex.java:155)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$8.compare(OverridableIndex.java:199)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$8.compare(OverridableIndex.java:168)
    at java.base/java.util.TreeMap.compare(TreeMap.java:1570)
    at java.base/java.util.TreeMap.addEntryToEmptyMap(TreeMap.java:776)
    at java.base/java.util.TreeMap.put(TreeMap.java:785)
    at java.base/java.util.TreeMap.put(TreeMap.java:534)
    at java.base/java.util.TreeSet.add(TreeSet.java:255)
    at java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:336)
    at java.base/java.util.TreeSet.addAll(Treva:309)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex.overrideCollection(OverridableIndex.java:239)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex.getAnnotations(OverridableIndex.java:69)
    at io.smallrye.graphql.schema.helper.SourceOperationHelper.scanAllSourceAnnotations(SourceOperationHelper.java:51)
    at io.smallrye.graphql.schema.helper.SourceOperationHelper.<init>(SourceOperationHelper.java:30)
    at io.smallrye.graphql.schema.creator.type.AbstractCreator.addOperations(AbstractCreator.java:107)
    at io.smallrye.graphql.schema.creator.type.AbstractCreator.create(AbstractCreator.java:74)
    at io.smallrye.graphql.schema.creator.type.TypeCreator.create(TypeCreator.java:33)
    at io.smallrye.graphql.schema.creator.type.AbstractCreator.create(AbstractCreator.java:30)
    at io.smallrye.graphql.schema.SchemaBuilder.createAndAddToSchema(SchemaBuilder.java:255)
    at io.smallrye.graphql.schema.SchemaBuilder.addTypesToSchema(SchemaBuilder.java:160)
    at io.smallrye.graphql.schema.SchemaBuilder.generateSchema(SchemaBuilder.java:122)
    at io.smallrye.graphql.schema.SchemaBuilder.build(SchemaBuilder.java:87)
    at io.quarkus.smallrye.graphql.deployment.SmallRyeGraphQLProcessor.buildExecutionService(SmallRyeGraphQLProcessor.java:253)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:977)
    at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
    at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
    at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
    at java.base/java.lang.Thread.run(Thread.java:833)
    at org.jboss.threads.JBossThread.run(JBossThread.java:501)

    at io.quarkus.builder.Execution.run(Execution.java:123)
    at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
    at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:158)
    at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:328)
    ... 45 more
Caused by: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "org.jboss.jandex.MethodParameterInfo.name()" is null
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$7.compare(OverridableIndex.java:160)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$7.compare(OverridableIndex.java:155)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$8.compare(OverridableIndex.java:199)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$8.compare(OverridableIndex.java:168)
    at java.base/java.util.TreeMap.compare(TreeMap.java:1570)
    at java.base/java.util.TreeMap.addEntryToEmptyMap(TreeMap.java:776)
    at java.base/java.util.TreeMap.put(TreeMap.java:785)
    at java.base/java.util.TreeMap.put(TreeMap.java:534)
    at java.base/java.util.TreeSet.add(TreeSet.java:255)
    at java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:336)
    at java.base/java.util.TreeSet.addAll(TreeSet.java:309)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex.overrideCollection(OverridableIndex.java:239)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex.getAnnotations(OverridableIndex.java:69)
    at io.smallrye.graphql.schema.helper.SourceOperationHelper.scanAllSourceAnnotations(SourceOperationHelper.java:51)
    at io.smallrye.graphql.schema.helper.SourceOperationHelper.<init>(SourceOperationHelper.java:30)
    at io.smallrye.graphql.schema.creator.type.AbstractCreator.addOperations(AbstractCreator.java:107)
    at io.smallrye.graphql.schema.creator.type.AbstractCreator.create(AbstractCreator.java:74)
    at io.smallrye.graphql.schema.creator.type.TypeCreator.create(TypeCreator.java:33)
    at io.smallrye.graphql.schema.creator.type.AbstractCreator.create(AbstractCreator.java:30)
    at io.smallrye.graphql.schema.SchemaBuilder.createAndAddToSchema(SchemaBuilder.java:255)
    at io.smallrye.graphql.schema.SchemaBuilder.addTypesToSchema(SchemaBuilder.java:160)
    at io.smallrye.graphql.schema.SchemaBuilder.generateSchema(SchemaBuilder.java:122)
    at io.smallrye.graphql.schema.SchemaBuilder.build(SchemaBuilder.java:87)
    at io.quarkus.smallrye.graphql.deployment.SmallRyeGraphQLProcessor.buildExecutionService(SmallRyeGraphQLProcessor.java:253)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:977)
    at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
    at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
    at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
    at java.base/java.lang.Thread.run(Thread.java:833)
    at org.jboss.threads.JBossThread.run(JBossThread.java:501)

2022-08-02 13:42:34,617 ERROR [io.qua.test] (Test runner thread) >>>>>>>>>>>>>>>>>>>> Summary: <<<<<<<<<<<<<<<<<<<<
EndpointTest#allProviders() java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
    [error]: Build step io.quarkus.smallrye.graphql.deployment.SmallRyeGraphQLProcessor#buildExecutionService threw an exception: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "org.jboss.jandex.MethodParameterInfo.name()" is null
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$7.compare(OverridableIndex.java:160)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$7.compare(OverridableIndex.java:155)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$8.compare(OverridableIndex.java:199)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex$8.compare(OverridableIndex.java:168)
    at java.base/java.util.TreeMap.compare(TreeMap.java:1570)
    at java.base/java.util.TreeMap.addEntryToEmptyMap(TreeMap.java:776)
    at java.base/java.util.TreeMap.put(TreeMap.java:785)
    at java.base/java.util.TreeMap.put(TreeMap.java:534)
    at java.base/java.util.TreeSet.add(TreeSet.java:255)
    at java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:336)
    at java.base/java.util.TreeSet.addAll(TreeSet.java:309)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex.overrideCollection(OverridableIndex.java:239)
    at io.quarkus.smallrye.graphql.deployment.OverridableIndex.getAnnotations(OverridableIndex.java:69)
    at io.smallrye.graphql.schema.helper.SourceOperationHelper.scanAllSourceAnnotations(SourceOperationHelper.java:51)
    at io.smallrye.graphql.schema.helper.SourceOperationHelper.<init>(SourceOperationHelper.java:30)
    at io.smallrye.graphql.schema.creator.type.AbstractCreator.addOperations(AbstractCreator.java:107)
    at io.smallrye.graphql.schema.creator.type.AbstractCreator.create(AbstractCreator.java:74)
    at io.smallrye.graphql.schema.creator.type.TypeCreator.create(TypeCreator.java:33)
    at io.smallrye.graphql.schema.creator.type.AbstractCreator.create(AbstractCreator.java:30)
    at io.smallrye.graphql.schema.SchemaBuilder.createAndAddToSchema(SchemaBuilder.java:255)
    at io.smallrye.graphql.schema.SchemaBuilder.addTypesToSchema(SchemaBuilder.java:160)
    at io.smallrye.graphql.schema.SchemaBuilder.generateSchema(SchemaBuilder.java:122)
    at io.smallrye.graphql.schema.SchemaBuilder.build(SchemaBuilder.java:87)
    at io.quarkus.smallrye.graphql.deployment.SmallRyeGraphQLProcessor.buildExecutionService(SmallRyeGraphQLProcessor.java:253)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:977)
    at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
    at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
    at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
    at java.base/java.lang.Thread.run(Thread.java:833)
    at org.jboss.threads.JBossThread.run(JBossThread.java:501)

2022-08-02 13:42:34,621 ERROR [io.qua.test] (Test runner thread) >>>>>>>>>>>>>>>>>>>> 1 TEST FAILED <<<<<<<<<<<<<<<<<<<<

--
1 test failed (0 passing, 1 skipped), 1 test was run in 1452ms. Tests completed at 13:42:34.
Press [r] to re-run, [:] for the terminal, [h] for more options>

Output of uname -a or ver

Darwin bochica.local 19.6.0 Darwin Kernel Version 19.6.0: Tue Jan 12 22:13:05 PST 2021; root:xnu-6153.141.16~1/RELEASE_X86_64 x86_64

Output of java -version

openjdk version "17.0.3" 2022-04-19 OpenJDK Runtime Environment GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06) OpenJDK 64-Bit Server VM GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.11.1.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: /Users/carueda/.m2/wrapper/dists/apache-maven-3.8.6-bin/67568434/apache-maven-3.8.6 Java version: 17.0.3, vendor: GraalVM Community, runtime: /Users/carueda/.sdkman/candidates/java/22.1.0.r17-grl Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.15.7", arch: "x86_64", family: "mac"

Additional information

Similar misbehavior if starting from:

./mvnw clean quarkus:dev

that is, going to dev mode and then pressing r to run the tests. However, interestingly, GraphQl queries via the UI complete fine.

quarkus-bot[bot] commented 2 years ago

/cc @jmartisk, @phillip-kruger

carueda commented 2 years ago

I also note that ./mvnw clean test completes OK.

...
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.33 s - in org.example.graphql.EndpointTest
2022-08-02 14:17:24,815 INFO  [io.quarkus] (main) quarkus-gql-issue stopped in 0.025s
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  9.949 s
[INFO] Finished at: 2022-08-02T14:17:24-07:00
[INFO] ------------------------------------------------------------------------
carueda commented 2 years ago

Apologies for the noise, closing this as invalid. My project was lacking the required maven-compiler-plugin (not sure how it came to be like that) and I got confused due to "everything" seemingly working fine until I started adding graphql tests (even the subsequent workaround made me think something was actually amiss in quarkus).