-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
NPE: Cannot invoke "org.eclipse.jetty.server.Request.getAttribute(String)" because the return value of "org.eclipse.jetty.ee10.servlet.ServletApiRequest.getRequest()" is null #12518
Comments
Update: the problem came in with jetty 12.0.8. The last known version where the NPE does not appear is 12.0.7. |
That error message indicates that |
Oh, great. Do you have any hints for me? What can I do to get rid of the NPE? Besides sticking with 12.0.7? |
@cliviu prior to release 12.0.8, there was a bug in AsyncContext events where the request object wasn't provided properly. With 12.0.8 onwords, the behavior is correct to the Servlet spec. |
I can add a simple In that case, no request attribute should be retrieved, right? See: pac4j/pac4j@d205795 The fix can be tested with pac4j v6.1.1-SNAPSHOT. Maybe other methods require the same "protection". |
I'm not sure though if it will not hide using obsolete HttpServletRequest objects. Maybe it will be cleaner to take the fix back. |
Jetty Version:12.0.15
Jetty Environment: ee10
Java Version: OpenJDK Runtime Environment Temurin-17.0.13+11 (build 17.0.13+11)
Question
I am trying to integrate pac4j with Jetty 12. With Jetty 11 was working.
Now I get this nasty exception:
Any clue about what I'm doing wrong?
Thanks!
The text was updated successfully, but these errors were encountered: