Skip to content

[error]: Build step io.quarkus.deployment.steps.ReflectiveHierarchyStep#build threw an exception: java.lang.NullPointerException #12985

Open

Description

I think the exception in Quarkus can be improved. I added a bunch of classes (migrating an existing app) immediately after generating boilerplate, and here's what I get when I ./mvnw clean compile quarkus:dev:

    Listening for transport dt_socket at address: 5005
    2020-10-28 01:27:38,218 INFO  [org.jbo.threads] (main) JBoss Threads version 3.1.1.Final
    2020-10-28 01:27:39,097 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
            [error]: Build step io.quarkus.deployment.steps.ReflectiveHierarchyStep#build threw an exception: java.lang.NullPointerException
            at java.base/java.util.Objects.requireNonNull(Objects.java:221)
            at java.base/java.util.Optional.<init>(Optional.java:107)
            at java.base/java.util.Optional.of(Optional.java:120)
            at io.quarkus.arc.processor.BeanArchives$IndexWrapper.computeAdditional(BeanArchives.java:242)
            at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
            at io.quarkus.arc.processor.BeanArchives$IndexWrapper.getClassByName(BeanArchives.java:111)
            at io.quarkus.deployment.steps.ReflectiveHierarchyStep.addClassTypeHierarchy(ReflectiveHierarchyStep.java:176)
            at io.quarkus.deployment.steps.ReflectiveHierarchyStep.addReflectiveHierarchy(ReflectiveHierarchyStep.java:148)
            ...
            at io.quarkus.deployment.steps.ReflectiveHierarchyStep.addReflectiveHierarchy(ReflectiveHierarchyStep.java:153)
            at io.quarkus.deployment.steps.ReflectiveHierarchyStep.build(ReflectiveHierarchyStep.java:63)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:566)
            at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:936)
            at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
            at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
            at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
            at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
            at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
            at java.base/java.lang.Thread.run(Thread.java:834)
            at org.jboss.threads.JBossThread.run(JBossThread.java:479)

            at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:252)
            at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:134)
            at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:54)
            at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:74)
            at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:348)
            at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:51)
            at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:129)
            at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:82)
            at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:144)
            at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:63)
    Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
            [error]: Build step io.quarkus.deployment.steps.ReflectiveHierarchyStep#build threw an exception: java.lang.NullPointerException
            at java.base/java.util.Objects.requireNonNull(Objects.java:221)
            at java.base/java.util.Optional.<init>(Optional.java:107)
            at java.base/java.util.Optional.of(Optional.java:120)
            at io.quarkus.arc.processor.BeanArchives$IndexWrapper.computeAdditional(BeanArchives.java:242)
            at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
            at io.quarkus.arc.processor.BeanArchives$IndexWrapper.getClassByName(BeanArchives.java:111)
            at io.quarkus.deployment.steps.ReflectiveHierarchyStep.addClassTypeHierarchy(ReflectiveHierarchyStep.java:176)
            at io.quarkus.deployment.steps.ReflectiveHierarchyStep.addReflectiveHierarchy(ReflectiveHierarchyStep.java:148)
            ...
            at io.quarkus.deployment.steps.ReflectiveHierarchyStep.addReflectiveHierarchy(ReflectiveHierarchyStep.java:153)
            at io.quarkus.deployment.steps.ReflectiveHierarchyStep.build(ReflectiveHierarchyStep.java:63)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:566)
            at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:936)
            at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
            at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
            at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
            at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
            at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
            at java.base/java.lang.Thread.run(Thread.java:834)
            at org.jboss.threads.JBossThread.run(JBossThread.java:479)

            at io.quarkus.builder.Execution.run(Execution.java:116)
            at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
            at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:149)
            at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:250)
            ... 9 more
    Caused by: java.lang.NullPointerException
            at java.base/java.util.Objects.requireNonNull(Objects.java:221)
            at java.base/java.util.Optional.<init>(Optional.java:107)
            at java.base/java.util.Optional.of(Optional.java:120)
            at io.quarkus.arc.processor.BeanArchives$IndexWrapper.computeAdditional(BeanArchives.java:242)
            at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
            at io.quarkus.arc.processor.BeanArchives$IndexWrapper.getClassByName(BeanArchives.java:111)
            at io.quarkus.deployment.steps.ReflectiveHierarchyStep.addClassTypeHierarchy(ReflectiveHierarchyStep.java:176)
            at io.quarkus.deployment.steps.ReflectiveHierarchyStep.addReflectiveHierarchy(ReflectiveHierarchyStep.java:148)
            ...
            at io.quarkus.deployment.steps.ReflectiveHierarchyStep.addReflectiveHierarchy(ReflectiveHierarchyStep.java:153)
            at io.quarkus.deployment.steps.ReflectiveHierarchyStep.build(ReflectiveHierarchyStep.java:63)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:566)
            at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:936)
            at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
            at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
            at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
            at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
            at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
            at java.base/java.lang.Thread.run(Thread.java:834)
            at org.jboss.threads.JBossThread.run(JBossThread.java:479)

Any command line switch to make it show something more actionable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions