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

Qute NullPointerException in build when combining MessageBundle with TemplateExtension method #16868

Closed
andlinger opened this issue Apr 28, 2021 · 5 comments
Labels
area/qute The template engine kind/bug Something isn't working

Comments

@andlinger
Copy link
Contributor

When a MessageBundle is used in combination with a TemplateExtension method, a NullPointerException happens during the build.

I have created a small reproducer project. https://github.com/andlinger/quarkus-qute-npe

The template line which triggers the error can be found here:
https://github.com/andlinger/quarkus-qute-npe/blob/ad06b9adce8f9e38abb0d8bfb1a3d47bc77209b6/quarkus/src/main/resources/templates/QuteResource/number.txt#L1

io.quarkus.builder.BuildException: Build failure: Build failed due to errors
    [error]: Build step io.quarkus.qute.deployment.MessageBundleProcessor#validateMessageBundleMethodsInTemplates threw an exception: java.lang.NullPointerException
    at io.quarkus.qute.deployment.Types.isAssignableFrom(Types.java:116)
    at io.quarkus.qute.deployment.MessageBundleProcessor.validateMessageBundleMethodsInTemplates(MessageBundleProcessor.java:410)
    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:920)
    at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
    at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
    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:501)
@andlinger andlinger added the kind/bug Something isn't working label Apr 28, 2021
@quarkus-bot quarkus-bot bot added the area/qute The template engine label Apr 28, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Apr 28, 2021

/cc @mkouba

@mkouba
Copy link
Contributor

mkouba commented Apr 28, 2021

I believe that this should be fixed in #16618 (fixes #16590).

@andlinger What version of quarkus do you use? The fix should be backported in 1.13.3.Final...

@andlinger
Copy link
Contributor Author

We use 1.13.2.Final. When will 1.13.3.Final be released?

@mkouba
Copy link
Contributor

mkouba commented Apr 28, 2021

A tag already exists so I'd say the release is in the works. CC @gsmet

@andlinger
Copy link
Contributor Author

Updated to Quarkus 1.13.3.Final and bug is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/qute The template engine kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants