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

NullPointerException on mac with yaml config #37706

Closed
pcasaes opened this issue Dec 13, 2023 · 2 comments
Closed

NullPointerException on mac with yaml config #37706

pcasaes opened this issue Dec 13, 2023 · 2 comments
Labels
kind/bug Something isn't working triage/duplicate This issue or pull request already exists

Comments

@pcasaes
Copy link
Contributor

pcasaes commented Dec 13, 2023

Describe the bug

When building on/with:

  • mac
  • java 21
  • quarkus yaml

Build will fail:

[INFO] Total time:  3.381 s
[INFO] Finished at: 2023-12-12T18:54:40-08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.6.2:build (default) on project quarkus-yaml-config-npe: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR]         [error]: Build step io.quarkus.deployment.steps.ConfigGenerationBuildStep#unknownConfigFiles threw an exception: java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.toString()" because "s" is null
[ERROR]         at java.base/java.lang.String.contains(String.java:2977)
[ERROR]         at io.quarkus.runtime.configuration.ConfigDiagnostic.unknownConfigFiles(ConfigDiagnostic.java:231)
[ERROR]         at io.quarkus.deployment.steps.ConfigGenerationBuildStep.unknownConfigFiles(ConfigGenerationBuildStep.java:439)
[ERROR]         at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[ERROR]         at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[ERROR]         at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
[ERROR]         at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
[ERROR]         at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
[ERROR]         at java.base/java.lang.Thread.run(Thread.java:1583)
[ERROR]         at org.jboss.threads.JBossThread.run(JBossThread.java:501)

Expected behavior

Build should not fail

Actual behavior

Built fails

How to Reproduce?

Reproducer
https://github.com/pcasaes/quarkus-yaml-config-npe

Output of uname -a or ver

Darwin MacBook-Pro-2.local 21.6.0 Darwin Kernel Version 21.6.0: Thu Jul 6 22:20:00 PDT 2023; root:xnu-8020.240.18.702.13~1/RELEASE_ARM64_T6000 arm64

Output of java -version

openjdk version "21.0.1" 2023-10-17 LTS OpenJDK Runtime Environment Corretto-21.0.1.12.1 (build 21.0.1+12-LTS) OpenJDK 64-Bit Server VM Corretto-21.0.1.12.1 (build 21.0.1+12-LTS, mixed mode, sharing) zsh: command not found: Output

Quarkus version or git rev

3.6.2

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

Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546) Maven home: /Users/paulo.casaes/.sdkman/candidates/maven/3.9.5 Java version: 21.0.1, vendor: Amazon.com Inc., runtime: /Users/paulo.casaes/.sdkman/candidates/java/21.0.1-amzn Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "12.6.8", arch: "aarch64", family: "mac"

Additional information

I was able to track the issue to this change
https://github.com/quarkusio/quarkus/pull/37520/files

candidate.toUri().getPath() returns null while candidate.toString() does not.

I further found that if I add <extensions>true</extensions> to the Quarkus maven plugin definition then it works.

      <plugin>
        <groupId>${quarkus.platform.group-id}</groupId>
        <artifactId>quarkus-maven-plugin</artifactId>
        <version>${quarkus.platform.version}</version>
        <extensions>true</extensions>

Is enabling extensions required on 3.6.2 going forwards?
It doesn't seem like it was a few versions ago.

Screen Shot 2023-12-12 at 6 45 15 PM


Screen Shot 2023-12-12 at 6 46 05 PM

@pcasaes pcasaes added the kind/bug Something isn't working label Dec 13, 2023
@mschorsch
Copy link
Contributor

@pcasaes The issue was fixed. Upgrade to Quarkus 3.6.3.

#37695
#37690

@famod famod added triage/duplicate This issue or pull request already exists and removed triage/needs-triage labels Dec 13, 2023
@famod
Copy link
Member

famod commented Dec 13, 2023

Thanks for reporting anyway! :-)

@famod famod closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working triage/duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants