title: Changing faces-config.xml from 2.2 to 2.3 causes javax.el.PropertyNotFoundException: Target Unreachable, identifier 'bean' resolved to null
body: <p>Have the following code snippets:</p>
  <p>Bean:</p>
  <pre><code>import javax.faces.view.ViewScoped;
  import javax.inject.Named;
  
  @Named(value = &quot;directoryBean&quot;)
  @ViewScoped
  public class DirectoryBean implements Serializable {
  
  private static final long serialVersionUID = 1L;
      ....
  }
  </code></pre>
  <p>faces-config.xml</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;faces-config
      xmlns=&quot;http://xmlns.jcp.org/xml/ns/javaee&quot;
      xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
      xsi:schemaLocation=&quot;http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_3.xsd&quot;
      version=&quot;2.3&quot;&gt;
       ....
  &lt;/faces-config&gt;
  </code></pre>
  <p>group.xhtml</p>
  <pre><code>&lt;ui:composition ...&gt;
  
      &lt;f:metadata&gt;
          &lt;f:viewParam name=&quot;id&quot; value=&quot;#{directoryBean.id}&quot; /&gt;
      &lt;/f:metadata&gt;
  
  &lt;/ui:composition&gt;
  </code></pre>
  <p>In result getting the exception:</p>
  <pre><code>javax.el.PropertyNotFoundException: /group.xhtml @6,64 value=&quot;#{directoryBean.id}&quot;: Target Unreachable, identifier 'directoryBean' resolved to null
  </code></pre>
  <p>Got it after changing faces-config.xml from ver 2.2 to ver 2.3 syntax.</p>
  <p>Meaning, with faces-config.xml with the following content everything works fine:</p>
  <pre><code>&lt;faces-config version=&quot;2.2&quot; xmlns=&quot;http://xmlns.jcp.org/xml/ns/javaee&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
            xsi:schemaLocation=&quot;http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd&quot;&gt;
  ....
  &lt;/faces-config&gt;
  </code></pre>
  <p>JSF 2.3.2 deployed on the Payara 4.1.2.172 (Full) server, and also added to pom.xml with &quot;provided&quot; scope.</p>
  <pre><code>....
  &lt;dependencies&gt;
      ...
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish&lt;/groupId&gt;
          &lt;artifactId&gt;javax.faces&lt;/artifactId&gt;
          &lt;version&gt;2.3.2&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.faces&lt;/groupId&gt;
          &lt;artifactId&gt;javax.faces-api&lt;/artifactId&gt;
          &lt;version&gt;2.3&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;            
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax&lt;/groupId&gt;
          &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
          &lt;version&gt;7.0&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      ...
  &lt;/dependencies&gt;
  ....
  </code></pre>
  <p>I have checked all solutions that I was able to find during several hours, including different version of beans.xml:</p>
  <ol>
  <li>initially beans.xml was not present in the project - issue
  persist;</li>
  <li>added empty beans.xml - issue persist;</li>
  <li>added beans.xml with two different options of bean-discovery-mode - &quot;all&quot;
  and &quot;annotated&quot; - issue persist;</li>
  </ol>
  <p>Content of \WEB-INF\beans.xml:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;beans xmlns=&quot;http://xmlns.jcp.org/xml/ns/javaee&quot;
         xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
         xsi:schemaLocation=&quot;http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd&quot;
         bean-discovery-mode=&quot;all&quot;&gt;
  &lt;/beans&gt;
  </code></pre>
  <p>Tested on local instances of Payara 4.1.2.172, GlassFish 5 (java ver 1.8.0_144), and remote instance of Payara 4.1.2.172 (java ver 1.8.0_131).</p>
  <p>Thanks!</p>
  <p>Note: Example projects like this one <a href="https://github.com/AnghelLeonard/JSF-2.3/tree/master/JSF23InjectInConverterValidator" rel="nofollow noreferrer">https://github.com/AnghelLeonard/JSF-2.3/tree/master/JSF23InjectInConverterValidator</a> give the same error.</p>
  <p>===</p>
  <p>Update as of 2022-03-31:</p>
  <p>Got another error related to this issue on Payara 5.2022.1:
  <code>org.glassfish.deployment.common.DeploymentException: CDI deployment failure:WELD-001408: Unsatisfied dependencies for type UIViewRoot with qualifiers @Default</code>
  So seems even on the latest version of Payara JSF 2.3 is not enabled by default, as was mentioned in one of the comments below.
  Adding it here for better searching visibility. :)</p>