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

@WebFilter annotation with servletName attribute cannot be deployed #11417

Closed
38leinaD opened this issue Aug 17, 2020 · 0 comments · Fixed by #11420
Closed

@WebFilter annotation with servletName attribute cannot be deployed #11417

38leinaD opened this issue Aug 17, 2020 · 0 comments · Fixed by #11420
Assignees
Labels
area/undertow kind/bug Something isn't working
Milestone

Comments

@38leinaD
Copy link
Contributor

I have a servlet filter without an explicit url mapping, but servletNames set to a valid/existing servlet (defined via web.xml):

@webfilter(filterName = "MyFilter", servletNames = "myservlet", asyncSupported = true)
public class MyFilter implements Filter {}

Expected behavious
As per the Servlet spec, the filter should be able to deploy based on the provided serveltNames attribute :

image

Actual behavior

The build fails with this exception because the @webfilter annotation does not define an urlMapping:

Build failure: Build failed due to errors
[error]: Build step io.quarkus.undertow.deployment.UndertowBuildStep#build threw an exception: java.lang.NullPointerException
at io.quarkus.undertow.deployment.UndertowBuildStep.build(UndertowBuildStep.java:420)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:932)
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.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:479)

Environment (please complete the following information):

Quarkus version or git rev: 1.7.0.Final
Build tool (ie. output of mvnw --version or gradlew --version): gradle

@38leinaD 38leinaD added the kind/bug Something isn't working label Aug 17, 2020
@gastaldi gastaldi self-assigned this Aug 17, 2020
gastaldi added a commit to gastaldi/quarkus that referenced this issue Aug 17, 2020
According to the spec, servlet names can be specified instead
Fixes quarkusio#11417
gastaldi added a commit to gastaldi/quarkus that referenced this issue Aug 17, 2020
According to the spec, servlet names can be specified instead
Fixes quarkusio#11417
gastaldi added a commit to gastaldi/quarkus that referenced this issue Aug 18, 2020
According to the spec, servlet names can be specified instead
Fixes quarkusio#11417
gastaldi added a commit to gastaldi/quarkus that referenced this issue Aug 18, 2020
According to the spec, servlet names can be specified instead
Fixes quarkusio#11417
@gsmet gsmet added this to the 1.8.0 - master milestone Aug 20, 2020
noelo pushed a commit to noelo/quarkus that referenced this issue Aug 21, 2020
According to the spec, servlet names can be specified instead
Fixes quarkusio#11417
@gsmet gsmet modified the milestones: 1.8.0 - master, 1.7.1.Final Aug 24, 2020
gsmet pushed a commit to gsmet/quarkus that referenced this issue Aug 24, 2020
According to the spec, servlet names can be specified instead
Fixes quarkusio#11417
gsmet pushed a commit to gsmet/quarkus that referenced this issue Aug 24, 2020
According to the spec, servlet names can be specified instead
Fixes quarkusio#11417
gsmet pushed a commit to gsmet/quarkus that referenced this issue Aug 24, 2020
According to the spec, servlet names can be specified instead
Fixes quarkusio#11417
gsmet pushed a commit to gsmet/quarkus that referenced this issue Aug 25, 2020
According to the spec, servlet names can be specified instead
Fixes quarkusio#11417
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/undertow kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants