-
Notifications
You must be signed in to change notification settings - Fork 357
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
Undetermined behaviour with @ApplicationPath #5403
Comments
There is a difference between Jersey 2.x and 3.1 regarding the However, you also describe (in SO) the problems with scanning classes. The classes are scanned by the Servlet autodiscovery mechanism in both cases, Jersey 2.x and 3.x (when not used web.xml) and that's outside of Jersey. Anyway, could you please create a sample project that demonstrates the issue? |
Would it be possible to create a new GitHub repository with the demo and reference it here? |
Short update: I'm now trying for some hours to reproduce this issue with a Tomcat setup that should actually be very close to the one I used when I found this issue. But currently I can't reproduce it. Meanwhile we changed some webapps in the Tomcat container and made some configuration changes for Tomcat in files we don't have approriate backups for. I have no idea what else the missing point could be, so I currently cannot provide more details than I had written here and in SO. If we are ever able do reproduce the issue again I'll freeze everything to set up a reproducable test case. |
Hi, after deploying a Jersey 3.1.3 webapp using @ApplicationPath, without referencing the application class in web.xml, the registered resources for this application might sometimes be undetermined (using Tomcat 10.1 container).
For me it seems to be a timing issue during startup of an webapp, possibly related with the mechamism of automatic adding of Servlets as mentioned in https://eclipse-ee4j.github.io/jersey.github.io/documentation/3.1.3/deployment.html: "If no such Servlet is defined to handle the custom Application subclass, Jersey dynamically adds a Servlet with a fully qualified name equal to the name of the provided Application subclass.".
Possible workaround: Replace @ApplicationPath in the application class with an approriate entry in web.xml (as described in the docs).
See more details here: https://stackoverflow.com/questions/76779528/undetermined-registration-of-resources-while-migrating-to-jersey-3-1-x
The text was updated successfully, but these errors were encountered: