[ 
https://issues.apache.org/jira/browse/TOMEE-4642?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Markus Jung updated TOMEE-4642:
-------------------------------
    Description: 
When a war's deployment descriptor or annotation names a servlet or filter 
class, but the class is not in the war, TomEE aborts startup of the whole 
context. Two Jakarta Servlet TCK deployments trigger this: the pluggability 
{{RegistrationTests}} deployment names filter {{AddFilterString}}, and the spec 
{{DefaultMappingTests}} deployment names servlet {{TestServlet1}}. Neither 
class ships in its war.

Both contexts fail to start. Every test method in both classes then errors, 
since each method needs a working deployment URL and gets none.

The Servlet 6.1 spec calls for strict checks on registered components, but a 
missing class should not bring down the full context. The current behaviour 
treats a single unresolved servlet or filter reference as fatal to the whole 
deployment, when the failure should stay local to that class.

h2. Steps to reproduce / TCK reference
* TCK test classes: {{RegistrationTests}} (Jakarta Servlet TCK, pluggability), 
{{DefaultMappingTests}} (Jakarta Servlet TCK, spec)
* Deploy the wars used by these classes; each names a servlet or filter class 
it does not package ({{AddFilterString}} for {{RegistrationTests}}, 
{{TestServlet1}} for {{DefaultMappingTests}})
* Result: context startup fails, all methods in both classes error on the 
missing deployment URL
* Currently excluded in: {{runner-standalone/exclusions/servlet.txt}} (2 class 
entries, 12 methods) in the apache/tomee-tck harness repo.
* Remove the exclusion entries once fixed and confirm both classes pass

  was:
h2. Description
When a war's deployment descriptor or annotation names a servlet or filter 
class, but the class is not in the war, TomEE aborts startup of the whole 
context. Two Jakarta Servlet TCK deployments trigger this: the pluggability 
{{RegistrationTests}} deployment names filter {{AddFilterString}}, and the spec 
{{DefaultMappingTests}} deployment names servlet {{TestServlet1}}. Neither 
class ships in its war.

Both contexts fail to start. Every test method in both classes then errors, 
since each method needs a working deployment URL and gets none.

The Servlet 6.1 spec calls for strict checks on registered components, but a 
missing class should not bring down the full context. The current behaviour 
treats a single unresolved servlet or filter reference as fatal to the whole 
deployment, when the failure should stay local to that class.

h2. Steps to reproduce / TCK reference
* TCK test classes: {{RegistrationTests}} (Jakarta Servlet TCK, pluggability), 
{{DefaultMappingTests}} (Jakarta Servlet TCK, spec)
* Deploy the wars used by these classes; each names a servlet or filter class 
it does not package ({{AddFilterString}} for {{RegistrationTests}}, 
{{TestServlet1}} for {{DefaultMappingTests}})
* Result: context startup fails, all methods in both classes error on the 
missing deployment URL
* Currently excluded in: {{runner-standalone/exclusions/servlet.txt}} (2 class 
entries, 12 methods) in the apache/tomee-tck harness repo.
* Remove the exclusion entries once fixed and confirm both classes pass


> Deployment fails when a war lists a servlet or filter class it does not 
> package
> -------------------------------------------------------------------------------
>
>                 Key: TOMEE-4642
>                 URL: https://issues.apache.org/jira/browse/TOMEE-4642
>             Project: TomEE
>          Issue Type: Bug
>          Components: TomEE Core Server
>            Reporter: Markus Jung
>            Priority: Major
>
> When a war's deployment descriptor or annotation names a servlet or filter 
> class, but the class is not in the war, TomEE aborts startup of the whole 
> context. Two Jakarta Servlet TCK deployments trigger this: the pluggability 
> {{RegistrationTests}} deployment names filter {{AddFilterString}}, and the 
> spec {{DefaultMappingTests}} deployment names servlet {{TestServlet1}}. 
> Neither class ships in its war.
> Both contexts fail to start. Every test method in both classes then errors, 
> since each method needs a working deployment URL and gets none.
> The Servlet 6.1 spec calls for strict checks on registered components, but a 
> missing class should not bring down the full context. The current behaviour 
> treats a single unresolved servlet or filter reference as fatal to the whole 
> deployment, when the failure should stay local to that class.
> h2. Steps to reproduce / TCK reference
> * TCK test classes: {{RegistrationTests}} (Jakarta Servlet TCK, 
> pluggability), {{DefaultMappingTests}} (Jakarta Servlet TCK, spec)
> * Deploy the wars used by these classes; each names a servlet or filter class 
> it does not package ({{AddFilterString}} for {{RegistrationTests}}, 
> {{TestServlet1}} for {{DefaultMappingTests}})
> * Result: context startup fails, all methods in both classes error on the 
> missing deployment URL
> * Currently excluded in: {{runner-standalone/exclusions/servlet.txt}} (2 
> class entries, 12 methods) in the apache/tomee-tck harness repo.
> * Remove the exclusion entries once fixed and confirm both classes pass



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to