Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-9235

@Resource injection does not fail in a servlet when the resource is missing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • None
    • Naming, Web (Undertow)
    • None

    Description

      The attached web application builds, deploys and runs perfectly.

      However, if you remove one of the <env-entry> elements from the web.xml it will still deploy and run.

      The associated injection point is left as null instead of having the deployment fail as required by the Java EE 7 Spec in "EE.5.2.5 Annotations and Injection", where it states:

      If the container fails to find a resource needed for injection, initialization of the class must fail, and the class must not be put into service.

      Also see StackOverflow question https://stackoverflow.com/questions/45716813/glassfish-wildfly-not-failing-if-resource-cannot-be-resolved

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            sfcoy Stephen Coy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: