title: @FacesConverter annotation not working with tomcat7-maven-plugin
body: <p>I have an application packaged as WAR file, which runs perfectly fine in a standalone tomcat (7.0.67) but it does not work properly with the tomcat7-maven-plugin using <code>mvn tomcat7:run</code> . </p>
  
  <p>The problem is that there are custom converters defined, e.g.:</p>
  
  <pre><code>import javax.faces.convert.Converter;
  import javax.faces.convert.FacesConverter;
  
  @FacesConverter( "custom" )
  public class CustomConverter implements Converter, Serializable {
    ...
  }
  </code></pre>
  
  <p>which seem not to be registered, because I get the following error and the application does not load properly:</p>
  
  <pre><code>Dec 15, 2015 10:27:01 AM com.sun.faces.application.ApplicationImpl createConverter
  SEVERE: JSF1006: Cannot instantiate converter of type custom
  </code></pre>
  
  <p>However, if I register the same converter in the <strong>faces-config.xml</strong>, all works fine:</p>
  
  <pre><code>&lt;converter&gt;
      &lt;converter-id&gt;custom&lt;/converter-id&gt;
      &lt;converter-class&gt;com.package.CustomConverter&lt;/converter-class&gt;
  &lt;/converter&gt;
  </code></pre>
  
  <p>So the problem seems to be with the different libraries in the standalone tomcat and the tomcat7-maven-plugin. But I could not figure out what exactly it is. Please, let me know if you have any suggestions, thanks.</p>
  
  <p>dependencies from the <strong>pom.xml</strong> and the tomcat7-maven-plugin:</p>
  
  <pre><code>&lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.tomcat.maven&lt;/groupId&gt;
              &lt;artifactId&gt;tomcat7-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;port&gt;8080&lt;/port&gt;
                  &lt;path&gt;/&lt;/path&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
          &lt;artifactId&gt;jsf-api&lt;/artifactId&gt;
          &lt;version&gt;2.1.20&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
          &lt;artifactId&gt;jsf-impl&lt;/artifactId&gt;
          &lt;version&gt;2.1.20&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.el&lt;/groupId&gt;
          &lt;artifactId&gt;el-api&lt;/artifactId&gt;
          &lt;version&gt;2.2&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.el&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-el&lt;/artifactId&gt;
          &lt;version&gt;2.0.1.GA&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;jstl&lt;/artifactId&gt;
          &lt;version&gt;1.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
          &lt;version&gt;2.5&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
          &lt;artifactId&gt;spring-security-web&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.primefaces&lt;/groupId&gt;
          &lt;artifactId&gt;primefaces&lt;/artifactId&gt;
          &lt;version&gt;3.5&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context-support&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.primefaces.extensions&lt;/groupId&gt;
          &lt;artifactId&gt;primefaces-extensions&lt;/artifactId&gt;
          &lt;version&gt;0.6.3&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>subset of the <strong>web.xml</strong>:</p>
  
  <pre><code>&lt;context-param&gt;
      &lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt;
      &lt;param-value&gt;server&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
      &lt;param-name&gt;javax.faces.PROJECT_STAGE&lt;/param-name&gt;
      &lt;param-value&gt;Production&lt;/param-value&gt;       
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
  &lt;param-name&gt;javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL&lt;/param-name&gt;
      &lt;param-value&gt;true&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
      &lt;param-name&gt;javax.faces.VALIDATE_EMPTY_FIELDS&lt;/param-name&gt;
      &lt;param-value&gt;true&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
      &lt;param-name&gt;javax.faces.FACELETS_SKIP_COMMENTS&lt;/param-name&gt;
      &lt;param-value&gt;true&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
      &lt;param-name&gt;javax.faces.DEFAULT_SUFFIX&lt;/param-name&gt;
      &lt;param-value&gt;.xhtml&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
      &lt;param-name&gt;com.sun.faces.enableMissingResourceLibraryDetection&lt;/param-name&gt;
      &lt;param-value&gt;true&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
      &lt;param-name&gt;com.sun.faces.expressionFactory&lt;/param-name&gt;
      &lt;param-value&gt;org.jboss.el.ExpressionFactoryImpl&lt;/param-value&gt;
  &lt;/context-param&gt;
  </code></pre>