title: Unsatisfied dependency when using OmniFaces @Param annotation. No qualifying bean of type java.lang.String
body: <p>I am attempting to use CDI over the deprecated ManagedBean/ManagedProperty annotations and run into this exception in a very simple web app:</p>
  
  <pre><code>Error creating bean with name 'navigationController': Unsatisfied dependency expressed through field 'message'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: 
  No qualifying bean of type 'java.lang.String' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.inject.Inject(), @org.omnifaces.cdi.Param(validatorAttributes=[], validatorMessage=, validators=[], converter=, pathIndex=-1, converterAttributes=[], converterClass=interface javax.faces.convert.Converter, label=, overrideGlobalBeanValidationDisabled=false, required=false, disableBeanValidation=false, name=, validatorClasses=[], converterMessage=, requiredMessage=)}
  </code></pre>
  
  <p>I am attempting to follow the example of @Param in the OmniFaces showcase at <a href="http://showcase.omnifaces.org/cdi/Param" rel="nofollow noreferrer">http://showcase.omnifaces.org/cdi/Param</a>. </p>
  
  <p>I PUT to a page with <a href="http://localhost:8080/jsfSpringBootApp/nav.xhtml?message=My+message+from+MessageSource" rel="nofollow noreferrer">http://localhost:8080/jsfSpringBootApp/nav.xhtml?message=My+message+from+MessageSource</a>. It is my understanding that the NavigationController bean should be created on navigation to nav.xhtml and that the message field will be populated with the value taken from the request parameter.  </p>
  
  <p>IntellliJ also complains about the @Param annotation: </p>
  
  <blockquote>
    <p>Cannot find bean qualified with @Param</p>
  </blockquote>
  
  <p>Thank you for any help.  I am stuck at what to try next.</p>
  
  <p>The entire project is at <a href="https://david_maffitt@bitbucket.org/david_maffitt/jsfspringbootapp.git" rel="nofollow noreferrer">https://david_maffitt@bitbucket.org/david_maffitt/jsfspringbootapp.git</a>.</p>
  
  <p>The contents of nav.xhtml are</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://xmlns.jcp.org/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
        xmlns:f="http://xmlns.jcp.org/jsf/core"
        xmlns:p="http://primefaces.org/ui"&gt;
  
  &lt;h:body &gt;
  &lt;f:view&gt;
  
      &lt;p:panel id="myPanelId" header="My Panel" style="margin-bottom:20px"&gt;
          &lt;h:outputText value="My text output." /&gt;
          &lt;h:outputText value="My text output from params: #{navigationController.action}" /&gt;
      &lt;/p:panel&gt;
  
  &lt;/f:view&gt;
  &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The contents of NavigationController.java are
  package org.nrg.cap.jsfWebApp;</p>
  
  <pre><code>import org.omnifaces.cdi.Param;
  
  import javax.enterprise.context.RequestScoped;
  import javax.faces.annotation.ManagedProperty;
  import javax.inject.Inject;
  import javax.inject.Named;
  import java.io.Serializable;
  
  //@Component
  //@Scope("request")
  @Named
  @RequestScoped
  public class NavigationController implements Serializable {
  
      @Inject @Param
      private String message;
  
  
      public String showPage() {
          return ("fubar".equals(message))? "fubar": "snafu";
      }
  
      public void setAction(String message) {
          this.message = message;
      }
      public String getAction() {
          return message;
      }
  }
  </code></pre>
  
  <p>The pom.xml is</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;org.nrg.cap&lt;/groupId&gt;
      &lt;artifactId&gt;jsfSpringBootApp&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;name&gt;JSF Spring Boot WebApp&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
  
          &lt;joinfaces.version&gt;4.0.0&lt;/joinfaces.version&gt;
      &lt;/properties&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.1.1.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt;
      &lt;/parent&gt;
  
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.joinfaces&lt;/groupId&gt;
                  &lt;artifactId&gt;joinfaces-dependencies&lt;/artifactId&gt;
                  &lt;version&gt;${joinfaces.version}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.joinfaces&lt;/groupId&gt;
              &lt;artifactId&gt;primefaces-spring-boot-starter&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.joinfaces&lt;/groupId&gt;
              &lt;artifactId&gt;omnifaces3-spring-boot-starter&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.enterprise&lt;/groupId&gt;
              &lt;artifactId&gt;cdi-api&lt;/artifactId&gt;
              &lt;version&gt;2.0.SP1&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>I found that I had to add the dependency for cdi-api because I am deploying to tomcat 9.0.13 which doesn't have cdi baked in.
  The pom is derived from the joinfaces project.</p>