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

Failed to find servlet #226

Closed
trydofor opened this issue Apr 11, 2024 · 3 comments
Closed

Failed to find servlet #226

trydofor opened this issue Apr 11, 2024 · 3 comments
Labels
bug :lady_beetle: Something isn't working
Milestone

Comments

@trydofor
Copy link
Owner

trydofor commented Apr 11, 2024

java.lang.IllegalArgumentException: Failed to find servlet [] in the servlet context
 at org.springframework.util.Assert.notNull(Assert.java:172) ~[spring-core-6.1.3.jar:6.1.3]
 at org.springframework.security.config.annotation.web.AbstractRequestMatcherRegistry$DispatcherServletDelegatingRequestMatcher.matches(AbstractRequestMatcherRegistry.java:533) ~[spring-security-config-6.2.1.jar:6.2.1]
 at pro.fessional.wings.warlock.spring.bean.WarlockSecurityConfConfiguration.lambda$securityCheckUrlRunner$25(WarlockSecurityConfConfiguration.java:348) ~[warlock-shadow-3.2.110.jar:3.2.110]
 at pro.fessional.wings.silencer.runner.ApplicationRunnerOrdered.run(ApplicationRunnerOrdered.java:25) ~[silencer-3.2.110.jar:3.2.110]
 at org.springframework.boot.SpringApplication.lambda$callRunner$4(SpringApplication.java:786) ~[spring-boot-3.2.2.jar:3.2.2]
 at org.springframework.util.function.ThrowingConsumer$1.acceptWithException(ThrowingConsumer.java:83) ~[spring-core-6.1.3.jar:6.1.3]
 at org.springframework.util.function.ThrowingConsumer.accept(ThrowingConsumer.java:60) ~[spring-core-6.1.3.jar:6.1.3]
 at org.springframework.util.function.ThrowingConsumer$1.accept(ThrowingConsumer.java:88) ~[spring-core-6.1.3.jar:6.1.3]
 at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:798) ~[spring-boot-3.2.2.jar:3.2.2]
 at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:786) ~[spring-boot-3.2.2.jar:3.2.2]
 at org.springframework.boot.SpringApplication.lambda$callRunners$3(SpringApplication.java:774) ~[spring-boot-3.2.2.jar:3.2.2]
 at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[na:na]
 at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357) ~[na:na]
 at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510) ~[na:na]
 at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[na:na]
 at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[na:na]
 at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[na:na]
 at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:na]
 at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[na:na]
 at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:774) ~[spring-boot-3.2.2.jar:3.2.2]
 at org.springframework.boot.SpringApplication.run(SpringApplication.java:341) ~[spring-boot-3.2.2.jar:3.2.2]
 at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-3.2.2.jar:3.2.2]
 at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) ~[spring-boot-3.2.2.jar:3.2.2]
@trydofor trydofor converted this from a draft issue Apr 11, 2024
@trydofor trydofor added the bug :lady_beetle: Something isn't working label Apr 11, 2024
@trydofor trydofor moved this from 🆕 New to 📋 Backlog in WingsBoot Backlog Apr 11, 2024
@trydofor
Copy link
Owner Author

Workaround: wings.enabled.warlock.sec-check-url=false to skip the check

@trydofor
Copy link
Owner Author

trydofor commented May 5, 2024

This happens when there are more than 1 servlets,

  • unit test passed because it ref MvcRequestMatcher
    • dispatcherServlet -> {ServletRegistrationImpl@21004}
  • mk failed because it ref DispatcherServletDelegatingRequestMatcher
    • dispatcherServlet -> {ServletRegistrationImpl@27003}
    • messageDispatcherServlet -> {ServletRegistrationImpl@27005}

trydofor added a commit that referenced this issue May 5, 2024
@trydofor trydofor moved this from 📋 Backlog to 🏗 In progress in WingsBoot Backlog May 5, 2024
@trydofor trydofor added this to the Bane milestone May 5, 2024
@trydofor trydofor moved this from 🏗 In progress to 👀 In review in WingsBoot Backlog May 6, 2024
@trydofor
Copy link
Owner Author

trydofor commented May 6, 2024

fixed by getting the dispatcherServlet name

@trydofor trydofor closed this as completed May 6, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in WingsBoot Backlog May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug :lady_beetle: Something isn't working
Projects
Archived in project
Development

No branches or pull requests

1 participant