You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a collection-like parameter for a Qute template is declared using the {@type name} syntax and collection items are then used as a parameter for type-safe messages, Quarkus is unable to build and start.
Expected behavior
Type-safe message parameters work whether the argument type has been declared in the template or not.
Actual behavior
Quarkus is unable to build (or start in dev mode) as a NullPointerException occurs during the build phase.
The bug does not occur for simple types, but for collection types.
Stack trace:
2021-04-16 17:53:59,592 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (vert.x-worker-thread-1) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
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:564)
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:832)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Resulted in: 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:564)
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:832)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
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:153)
at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:394)
at io.quarkus.runner.bootstrap.AugmentActionImpl.reloadExistingApplication(AugmentActionImpl.java:282)
at io.quarkus.runner.bootstrap.AugmentActionImpl.reloadExistingApplication(AugmentActionImpl.java:66)
at io.quarkus.deployment.dev.IsolatedDevModeMain.restartApp(IsolatedDevModeMain.java:189)
at io.quarkus.deployment.dev.IsolatedDevModeMain.restartCallback(IsolatedDevModeMain.java:175)
at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:254)
at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup$2.handle(VertxHttpHotReplacementSetup.java:62)
at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup$2.handle(VertxHttpHotReplacementSetup.java:52)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:313)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:832)
Resulted in: java.lang.RuntimeException: 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:564)
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:832)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:396)
... 12 more
The problematic line is the first line of page.txt (see snippet below). It results in an exception. If it is removed, it no longer crashes and the page can be opened from a browser at http://localhost:8080/hello-resteasy
- NPE is currently thrown if a type-safe message expression references a
parent expression via hint
- resolvesquarkusio#16590
(cherry picked from commit cb2305f)
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Apr 26, 2021
- NPE is currently thrown if a type-safe message expression references a
parent expression via hint
- resolvesquarkusio#16590
(cherry picked from commit cb2305f)
Describe the bug
If a collection-like parameter for a Qute template is declared using the
{@type name}
syntax and collection items are then used as a parameter for type-safe messages, Quarkus is unable to build and start.Expected behavior
Type-safe message parameters work whether the argument type has been declared in the template or not.
Actual behavior
Quarkus is unable to build (or start in dev mode) as a NullPointerException occurs during the build phase.
The bug does not occur for simple types, but for collection types.
Stack trace:
To Reproduce
Minimal project to reproduce: message-in-loop.zip
The problematic line is the first line of page.txt (see snippet below). It results in an exception. If it is removed, it no longer crashes and the page can be opened from a browser at http://localhost:8080/hello-resteasy
Steps to reproduce the behavior:
mvnw compile quarkus:dev
Environment (please complete the following information):
Output of
uname -a
orver
Microsoft Windows [Version 10.0.19042.928]
Output of
java -version
Quarkus version or git rev
1.32.2.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)The text was updated successfully, but these errors were encountered: