title: I'm having problems using @BeanParam annotation
body: <p>I'm using JAX-RS annotations and I'm having problems with @BeanParam. I'm using Wildfly-Swarm and Maven. The next lines are part of my error:</p>
  
  <blockquote>
    <p>2017-05-02 09:57:39,513 INFO  [org.wildfly.swarm.runtime.deployer]
    (main) deploying e15735ec-96f3-42f3-be84-4dbd08e05e0d.war 2017-05-02
    09:57:39,543 INFO  [org.jboss.as.server.deployment] (MSC service
    thread 1-7) WFLYSRV0027: Starting deployment of
    "e15735ec-96f3-42f3-be84-4dbd08e05e0d.war" (runtime-name:
    "e15735ec-96f3-42f3-be84-4dbd08e05e0d.war") 2017-05-02 09:57:40,419
    WARN  [org.jboss.as.dependency.private] (MSC service thread 1-4)
    WFLYSRV0018: Deployment
    "deployment.e15735ec-96f3-42f3-be84-4dbd08e05e0d.war" is using a
    private module ("org.jboss.jts:main") which may be changed or removed
    in future versions without notice. 2017-05-02 09:57:40,488 INFO 
    [org.jboss.weld.deployer] (MSC service thread 1-4) WFLYWELD0003:
    Processing weld deployment e15735ec-96f3-42f3-be84-4dbd08e05e0d.war
    2017-05-02 09:57:40,561 INFO 
    [org.hibernate.validator.internal.util.Version] (MSC service thread
    1-4) HV000001: Hibernate Validator 5.2.3.Final 2017-05-02 09:57:40,861
    ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001:
    Failed to start service
    jboss.deployment.unit."e15735ec-96f3-42f3-be84-4dbd08e05e0d.war".INSTALL:
    org.jboss.msc.service.StartException in service
    jboss.deployment.unit."e15735ec-96f3-42f3-be84-4dbd08e05e0d.war".INSTALL:
    WFLYSRV0153: Failed to process phase INSTALL of deployment
    "e15735ec-96f3-42f3-be84-4dbd08e05e0d.war"    at
    org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
      at
    org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
      at
    org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
      at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745) Caused by:
    java.lang.NoClassDefFoundError: com/test/example/models/User  at
    java.lang.Class.getDeclaredMethods0(Native Method)    at
    java.lang.Class.privateGetDeclaredMethods(Class.java:2701)    at
    java.lang.Class.privateGetPublicMethods(Class.java:2902)  at
    java.lang.Class.getMethods(Class.java:1615)   at
    io.swagger.jaxrs.Reader.read(Reader.java:255)     at
    io.swagger.jaxrs.Reader.read(Reader.java:147)     at
    io.swagger.jaxrs.config.BeanConfig.setScan(BeanConfig.java:172)   at
    org.wildfly.swarm.swagger.deployment.SwaggerServiceActivator.activate(SwaggerServiceActivator.java:73)
      at
    org.jboss.as.server.deployment.service.ServiceActivatorProcessor.deploy(ServiceActivatorProcessor.java:74)
      at
    org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
      ... 5 more Caused by: java.lang.ClassNotFoundException:
    com.test.example.models.User from [Module
    "deployment.e15735ec-96f3-42f3-be84-4dbd08e05e0d.war:main" from
    Service Module Loader]    at
    org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
      at
    org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
      at
    org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
      at
    org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
      ... 15 more</p>
  </blockquote>
  
  <p>My pom.xml:</p>
  
  <pre><code>&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; 
  &lt;groupId&gt;com.test.example&lt;/groupId&gt; 
  &lt;artifactId&gt;ws-be-example1&lt;/artifactId&gt; 
  &lt;name&gt;ws-be-example1&lt;/name&gt;
  &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt; 
  &lt;packaging&gt;jar&lt;/packaging&gt; 
  &lt;properties&gt;
      &lt;version.wildfly.swarm&gt;2016.8.1&lt;/version.wildfly.swarm&gt;
      &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
      &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
      &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;/properties&gt;
  
  &lt;dependencyManagement&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.wildfly.swarm&lt;/groupId&gt;
              &lt;artifactId&gt;bom-all&lt;/artifactId&gt;
              &lt;version&gt;${version.wildfly.swarm}&lt;/version&gt;
  
              &lt;scope&gt;import&lt;/scope&gt;
              &lt;type&gt;pom&lt;/type&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/dependencyManagement&gt;
  
  
  &lt;dependencies&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;!-- Wildfly Swarm Fractions --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.wildfly.swarm&lt;/groupId&gt;
          &lt;artifactId&gt;logging&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.wildfly.swarm&lt;/groupId&gt;
          &lt;artifactId&gt;jaxrs-cdi&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.wildfly.swarm&lt;/groupId&gt;
          &lt;artifactId&gt;swagger&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.mongodb&lt;/groupId&gt;
          &lt;artifactId&gt;mongo-java-driver&lt;/artifactId&gt;
          &lt;version&gt;3.4.2&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.googlecode.json-simple&lt;/groupId&gt;
          &lt;artifactId&gt;json-simple&lt;/artifactId&gt;
          &lt;version&gt;1.1&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;finalName&gt;ws-be-example1&lt;/finalName&gt;
  
      &lt;plugins&gt;
  
          &lt;plugin&gt;
              &lt;groupId&gt;org.wildfly.swarm&lt;/groupId&gt;
              &lt;artifactId&gt;wildfly-swarm-plugin&lt;/artifactId&gt;
              &lt;version&gt;${version.wildfly.swarm}&lt;/version&gt;
  
              &lt;configuration&gt;
                  &lt;mainClass&gt;com.test.example.Main&lt;/mainClass&gt;
                  &lt;properties&gt;
                      &lt;swarm.http.port&gt;3001&lt;/swarm.http.port&gt; 
                      &lt;swarm.debug.port&gt;5005&lt;/swarm.debug.port&gt;
                  &lt;/properties&gt;
  
                  &lt;environment&gt;
                      &lt;EXAMPLE2_HOST&gt;localhost&lt;/EXAMPLE2_HOST&gt;
                      &lt;EXAMPLE2_PORT&gt;8082&lt;/EXAMPLE2_PORT&gt;
                      &lt;EXAMPLE2_CONTEXT&gt;/example2/frame&lt;/EXAMPLE2_CONTEXT&gt;
                  &lt;/environment&gt;
              &lt;/configuration&gt;
  
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;package&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <p>My bean:</p>
  
  <pre><code>package com.test.example.models;
  import javax.ws.rs.FormParam;
  
  public class User {
  
  
     @FormParam("nombre")
     private String nombre;
  
     @FormParam("apellido1")
     private String apellido1;
  
     @FormParam("apellido2")
     private String apellido2;
  
     @FormParam("direccion")
     private String direccion;
  
  public User(String nombre, String apellido1, String apellido2, String direccion) {
      this.nombre = nombre;
      this.apellido1 = apellido1;
      this.apellido2 = apellido2;
      this.direccion = direccion;
  }
  
  public String getNombre() {
      return nombre;
  }
  
  public String getApellido1() {
      return apellido1;
  }
  
  public String getApellido2() {
      return apellido2;
  }
  
  public String getDireccion() {
      return direccion;
  }
  }
  </code></pre>
  
  <p>I'm injecting the before class in my endpoint like this:</p>
  
  <pre><code>@Path("/test")
  @POST
  @Produces(MediaType.APPLICATION_JSON)
  public Response prueba(@BeanParam User user){
     return Response.ok().build();
  }
  </code></pre>
  
  <p>Before all thank for your help :)</p>