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

Intermittent build error ClassPathElement.getResource(String) is null #28461

Closed
kdubb opened this issue Oct 9, 2022 · 23 comments
Closed

Intermittent build error ClassPathElement.getResource(String) is null #28461

kdubb opened this issue Oct 9, 2022 · 23 comments
Labels
area/arc Issue related to ARC (dependency injection) area/gradle Gradle area/testing kind/bug Something isn't working triage/out-of-date This issue/PR is no longer valid or relevant

Comments

@kdubb
Copy link
Contributor

kdubb commented Oct 9, 2022

Describe the bug

I am intermittently receiving a build error during @QuarkusTest runs in Gradle.

Noticeably they don't appear to be random but intermittent with certain tests; although I'm not sure exactly what that means. Considering the stack trace I can't imagine this is related to our code.

The issue is similar/same as #14611 but that issue is targeting a much older version and was marked invalid.

Here is the complete logged exception:

  java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.classloading.ClassPathResource.getUrl()" because the return value of "io.quarkus.bootstrap.classloading.ClassPathElement.getResource(String)" is null
        at io.quarkus.bootstrap.classloading.QuarkusClassLoader.getResource(QuarkusClassLoader.java:354)
        at io.quarkus.test.common.PathTestHelper.isTestClass(PathTestHelper.java:257)
        at io.quarkus.test.junit.QuarkusTestExtension$TestBuildChainFunction$1$1$1.test(QuarkusTestExtension.java:1374)
        at io.quarkus.test.junit.QuarkusTestExtension$TestBuildChainFunction$1$1$1.test(QuarkusTestExtension.java:1371)
        at io.quarkus.arc.deployment.ArcProcessor$6.test(ArcProcessor.java:350)
        at io.quarkus.arc.deployment.ArcProcessor$6.test(ArcProcessor.java:347)
        at io.quarkus.arc.processor.UnusedBeans.findRemovableBeans(UnusedBeans.java:54)
        at io.quarkus.arc.processor.BeanDeployment.removeUnusedBeans(BeanDeployment.java:434)
        at io.quarkus.arc.processor.BeanDeployment.removeUnusedComponents(BeanDeployment.java:349)
        at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:295)
        at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:140)
        at io.quarkus.arc.deployment.ArcProcessor.validate(ArcProcessor.java:517)
        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:909)
        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)

  Caused by: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.classloading.ClassPathResource.getUrl()" because the return value of "io.quarkus.bootstrap.classloading.ClassPathElement.getResource(String)" is null
        at io.quarkus.bootstrap.classloading.QuarkusClassLoader.getResource(QuarkusClassLoader.java:354)
        at io.quarkus.test.common.PathTestHelper.isTestClass(PathTestHelper.java:257)
        at io.quarkus.test.junit.QuarkusTestExtension$TestBuildChainFunction$1$1$1.test(QuarkusTestExtension.java:1374)
        at io.quarkus.test.junit.QuarkusTestExtension$TestBuildChainFunction$1$1$1.test(QuarkusTestExtension.java:1371)
        at io.quarkus.arc.deployment.ArcProcessor$6.test(ArcProcessor.java:350)
        at io.quarkus.arc.deployment.ArcProcessor$6.test(ArcProcessor.java:347)
        at io.quarkus.arc.processor.UnusedBeans.findRemovableBeans(UnusedBeans.java:54)
        at io.quarkus.arc.processor.BeanDeployment.removeUnusedBeans(BeanDeployment.java:434)
        at io.quarkus.arc.processor.BeanDeployment.removeUnusedComponents(BeanDeployment.java:349)
        at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:295)
        at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:140)
        at io.quarkus.arc.deployment.ArcProcessor.validate(ArcProcessor.java:517)
        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:909)
        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)

  Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.classloading.ClassPathResource.getUrl()" because the return value of "io.quarkus.bootstrap.classloading.ClassPathElement.getResource(String)" is null
        at io.quarkus.bootstrap.classloading.QuarkusClassLoader.getResource(QuarkusClassLoader.java:354)
        at io.quarkus.test.common.PathTestHelper.isTestClass(PathTestHelper.java:257)
        at io.quarkus.test.junit.QuarkusTestExtension$TestBuildChainFunction$1$1$1.test(QuarkusTestExtension.java:1374)
        at io.quarkus.test.junit.QuarkusTestExtension$TestBuildChainFunction$1$1$1.test(QuarkusTestExtension.java:1371)
        at io.quarkus.arc.deployment.ArcProcessor$6.test(ArcProcessor.java:350)
        at io.quarkus.arc.deployment.ArcProcessor$6.test(ArcProcessor.java:347)
        at io.quarkus.arc.processor.UnusedBeans.findRemovableBeans(UnusedBeans.java:54)
        at io.quarkus.arc.processor.BeanDeployment.removeUnusedBeans(BeanDeployment.java:434)
        at io.quarkus.arc.processor.BeanDeployment.removeUnusedComponents(BeanDeployment.java:349)
        at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:295)
        at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:140)
        at io.quarkus.arc.deployment.ArcProcessor.validate(ArcProcessor.java:517)
        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:909)
        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)

  Caused by: java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.classloading.ClassPathResource.getUrl()" because the return value of "io.quarkus.bootstrap.classloading.ClassPathElement.getResource(String)" is null

Expected behavior

Build completes without intermittent errors.

Actual behavior

See above

How to Reproduce?

I cannot reproduce this in a "small" project. We have a 10 module Gradle project that I am seeing the issue in. While intermittent I would say it happens 60% of the time at this point.

Output of uname -a or ver

macOS 12.6

Output of java -version

OpenJDK 17.0.1

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.13.0.Final

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

Gradle 7.5.1

Additional information

No response

@kdubb kdubb added the kind/bug Something isn't working label Oct 9, 2022
@yrodiere yrodiere added area/gradle Gradle area/arc Issue related to ARC (dependency injection) area/testing and removed triage/needs-triage labels Oct 10, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 10, 2022

/cc @geoand, @glefloch, @manovotn, @mkouba, @quarkusio/devtools @aloubyansky

@manovotn
Copy link
Contributor

I am not familiar with QuarkusClassLoader but looking at the line of code where it fails, it seems that ClassPathElement.getResource() is allowed to return null value if the resource doesn't exist and the code doesn't guard against that at all.

The line in question is - https://github.com/quarkusio/quarkus/blob/main/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/classloading/QuarkusClassLoader.java#L364

As for why it sometimes return null intermittently, I have no idea and without a reproducer (even one that would exhibit the failure in one out of X cases) I am not even sure how to get to the bottom of that.

@manovotn
Copy link
Contributor

@kdubb I sent a PR for at least the null check. If the CI passes it, could you give it a go and report back if that helped you? Assuming you can brute force current failures through repeated test runs, you should be able to at least somehow test it.

@kdubb
Copy link
Contributor Author

kdubb commented Oct 18, 2022

I've tried creating a reproducer with no luck. We have a pretty big multi-module Gradle project to reproduce; unfortunately it isn't open source.

@kdubb
Copy link
Contributor Author

kdubb commented Oct 18, 2022

@manovotn If you have any ideas/suggestions of what I could do to provide more information to you (aside from a reproducer) I'd be happy to gather it. This is a fairly painful issue directly affecting development.

@kdubb
Copy link
Contributor Author

kdubb commented Oct 18, 2022

I'm not sure I'll be able to reliably test with your PR until #28440 is fixed.

@kdubb
Copy link
Contributor Author

kdubb commented Oct 18, 2022

Actually, I guess I can check pick your changes back onto 2.13.0.Final branch and test it that way.

@stuartwdouglas
Copy link
Member

Is it possible that files are being deleted from the class path during tests?

@aloubyansky
Copy link
Member

@kdubb would you mind trying https://github.com/aloubyansky/quarkus/tree/classloader-npe? It's not a fix, unfortunately, I just throw an IllegalStateException with some info about the provider and its state that failed to provide the resource.

@kdubb
Copy link
Contributor Author

kdubb commented Oct 19, 2022

Yes. I'll be working on this tomorrow.

@mkouba
Copy link
Contributor

mkouba commented Oct 25, 2022

Yes. I'll be working on this tomorrow.

@kdubb did you get a chance to try the Alexey's branch?

@kdubb
Copy link
Contributor Author

kdubb commented Oct 25, 2022

Yeah we talked in Zulip a bit. I can't seem to reproduce the issue at this point 😔.

I believe his plan is to merge #28703 regardless so that if/when the issue arises again we'll have more information to debug it.

@kdubb
Copy link
Contributor Author

kdubb commented Jan 7, 2023

@aloubyansky I haven't seen it in a very long time but it reappeared today. I'm assuming this includes your extra information.

java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor#setupEndpoints threw an exception: java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.classloading.ClassPathResource.getData()" because the return value of "io.quarkus.bootstrap.classloading.ClassPathElement.getResource(String)" is null
        at io.quarkus.bootstrap.classloading.QuarkusClassLoader.getResourceAsStream(QuarkusClassLoader.java:409)
        at io.quarkus.resteasy.reactive.server.deployment.FilterClassIntrospector.usesGetResourceMethod(FilterClassIntrospector.java:26)
        at io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor$4.inspect(ResteasyReactiveProcessor.java:717)
        at io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor$4.visitGlobalRequestFilter(ResteasyReactiveProcessor.java:690)
        at org.jboss.resteasy.reactive.common.model.ResourceInterceptors.visitFilters(ResourceInterceptors.java:82)
        at io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor.filtersAccessResourceMethod(ResteasyReactiveProcessor.java:729)
        at io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor.setupEndpoints(ResteasyReactiveProcessor.java:437)
        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:909)
        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)

Caused by: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor#setupEndpoints threw an exception: java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.classloading.ClassPathResource.getData()" because the return value of "io.quarkus.bootstrap.classloading.ClassPathElement.getResource(String)" is null
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.getResourceAsStream(QuarkusClassLoader.java:409)
at io.quarkus.resteasy.reactive.server.deployment.FilterClassIntrospector.usesGetResourceMethod(FilterClassIntrospector.java:26)
at io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor$4.inspect(ResteasyReactiveProcessor.java:717)
at io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor$4.visitGlobalRequestFilter(ResteasyReactiveProcessor.java:690)
at org.jboss.resteasy.reactive.common.model.ResourceInterceptors.visitFilters(ResourceInterceptors.java:82)
at io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor.filtersAccessResourceMethod(ResteasyReactiveProcessor.java:729)
at io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor.setupEndpoints(ResteasyReactiveProcessor.java:437)
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:909)
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)

Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor#setupEndpoints threw an exception: java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.classloading.ClassPathResource.getData()" because the return value of "io.quarkus.bootstrap.classloading.ClassPathElement.getResource(String)" is null
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.getResourceAsStream(QuarkusClassLoader.java:409)
at io.quarkus.resteasy.reactive.server.deployment.FilterClassIntrospector.usesGetResourceMethod(FilterClassIntrospector.java:26)
at io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor$4.inspect(ResteasyReactiveProcessor.java:717)
at io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor$4.visitGlobalRequestFilter(ResteasyReactiveProcessor.java:690)
at org.jboss.resteasy.reactive.common.model.ResourceInterceptors.visitFilters(ResourceInterceptors.java:82)
at io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor.filtersAccessResourceMethod(ResteasyReactiveProcessor.java:729)
at io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor.setupEndpoints(ResteasyReactiveProcessor.java:437)
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:909)
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)

Caused by: java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.classloading.ClassPathResource.getData()" because the return value of "io.quarkus.bootstrap.classloading.ClassPathElement.getResource(String)" is null

@aloubyansky
Copy link
Member

No, it's in another method, unfortunately. Previously it was in getResource(name), now it's getResourceAsStream(name). I should have added in both places. I opened #30242

@mkouba
Copy link
Contributor

mkouba commented Apr 17, 2023

@aloubyansky @kdubb What's the current status of this issue?

@jcjolley
Copy link

Intermittently getting this on 2.14.2

java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.classloading.ClassPathResource.getData()" because the return value of "io.quarkus.bootstrap.classloading.ClassPathElement.getResource(String)" is null
            	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:918)
            	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)
            Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.classloading.ClassPathResource.getData()" because the return value of "io.quarkus.bootstrap.classloading.ClassPathElement.getResource(String)" is null
            	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
            	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
            	at io.quarkus.deployment.steps.ClassTransformingBuildStep.handleClassTransformation(ClassTransformingBuildStep.java:258)
            	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:909)
            	... 6 more
            Caused by: java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.classloading.ClassPathResource.getData()" because the return value of "io.quarkus.bootstrap.classloading.ClassPathElement.getResource(String)" is null
            	at io.quarkus.deployment.steps.ClassTransformingBuildStep$2.call(ClassTransformingBuildStep.java:215)
            	at io.quarkus.deployment.steps.ClassTransformingBuildStep$2.call(ClassTransformingBuildStep.java:210)
            	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
            	... 5 more
                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:160)
                at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:331)
                ... 79 more

                Caused by:
                java.lang.IllegalStateException: java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.classloading.ClassPathResource.getData()" because the return value of "io.quarkus.bootstrap.classloading.ClassPathElement.getResource(String)" is null
                    at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:918)
                    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)

                    Caused by:
                    java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.classloading.ClassPathResource.getData()" because the return value of "io.quarkus.bootstrap.classloading.ClassPathElement.getResource(String)" is null
                        at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
                        at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
                        at io.quarkus.deployment.steps.ClassTransformingBuildStep.handleClassTransformation(ClassTransformingBuildStep.java:258)
                        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:909)
                        ... 6 more

                        Caused by:
                        java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.classloading.ClassPathResource.getData()" because the return value of "io.quarkus.bootstrap.classloading.ClassPathElement.getResource(String)" is null
                            at io.quarkus.deployment.steps.ClassTransformingBuildStep$2.call(ClassTransformingBuildStep.java:215)
                            at io.quarkus.deployment.steps.ClassTransformingBuildStep$2.call(ClassTransformingBuildStep.java:210)
                            at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
                            ... 5 more

This seemed to start occurring after introducing a dependency with a microprofile-config.properties in it

@aloubyansky
Copy link
Member

Thanks @jcjolley also during tests? If so, do the tests fail with that error?

@gdraganic
Copy link

I had exactly the same issue and it was due to vscode-java extension. If you are using VSCode, give this a try:
microsoft/vscode-maven#698 (comment)

@kdubb
Copy link
Contributor Author

kdubb commented Oct 25, 2023

@gdraganic I use IntelliJ, but thanks for the info. I'll try shutting it down the next time I get this error.

@geoand
Copy link
Contributor

geoand commented Sep 20, 2024

Is this still an issue?

@geoand geoand added the triage/needs-feedback We are waiting for feedback. label Sep 20, 2024
@mkouba
Copy link
Contributor

mkouba commented Oct 1, 2024

@kdubb Did you get a chance to test your app with the latest Quarkus? Since we don't have a reproducer there's not much we can do about it.

@kdubb
Copy link
Contributor Author

kdubb commented Oct 1, 2024

Haven't seen the issue in quite a while.

@geoand
Copy link
Contributor

geoand commented Oct 1, 2024

Thanks.

Let's close for now and we can always reopen if this reappears

@geoand geoand closed this as completed Oct 1, 2024
@geoand geoand added triage/out-of-date This issue/PR is no longer valid or relevant and removed triage/needs-feedback We are waiting for feedback. labels Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection) area/gradle Gradle area/testing kind/bug Something isn't working triage/out-of-date This issue/PR is no longer valid or relevant
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants