title: @BeanParam in Swagger with Resteasy 3.0 and Wildfly 8.0
body: <p>I'm trying to use Swagger to document my Rest API. I want to make use of @BeanParam annotation, however Swagger interprets the bean model as a single <i>body</i>. I've changed my swagger dependency to <i>swagger-jersey2-jaxrs_2.10</i> but that made Wildfly unable to start cause of <b>WELD-001408</b> error (as in first link below). I have read a lot of stuff, but nothing seems to solve my problem:  </p>
  
  <ul>
  <li><a href="https://developer.jboss.org/thread/240847" rel="nofollow">https://developer.jboss.org/thread/240847</a></li>
  <li><a href="https://github.com/swagger-api/swagger-core/issues/446" rel="nofollow">https://github.com/swagger-api/swagger-core/issues/446</a></li>
  <li><a href="https://groups.google.com/forum/#!msg/swagger-swaggersocket/K5TFkxIcRQs/A34nupqPTTcJ" rel="nofollow">https://groups.google.com/forum/#!msg/swagger-swaggersocket/K5TFkxIcRQs/A34nupqPTTcJ</a></li>
  </ul>
  
  <p>I've tried by changing dependencies in my <b>pom.xml</b> according to linked threads, now it looks like this:</p>
  
  <pre><code>&lt;dependency&gt;
          &lt;groupId&gt;com.wordnik&lt;/groupId&gt;
          &lt;artifactId&gt;swagger-annotations&lt;/artifactId&gt;
          &lt;version&gt;1.3.12&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.wordnik&lt;/groupId&gt;
          &lt;artifactId&gt;swagger-core_2.10&lt;/artifactId&gt;
          &lt;version&gt;1.3.12&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.wordnik&lt;/groupId&gt;
          &lt;artifactId&gt;swagger-jersey2-jaxrs_2.10&lt;/artifactId&gt;
          &lt;version&gt;1.3.12&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.jersey.containers.glassfish&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-gf-cdi&lt;/artifactId&gt;
          &lt;version&gt;2.14&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.jersey.containers&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-container-servlet&lt;/artifactId&gt;
          &lt;version&gt;2.14&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Moreover, I have a custom servlet for Swagger:</p>
  
  <pre><code>public class SwaggerServlet extends HttpServlet {
      private static final long serialVersionUID = 4104485315753399385L;
  
      @Override
      public void init(ServletConfig config) throws ServletException {
          super.init(config);
  
          BeanConfig beanConfig = new BeanConfig();
          beanConfig.setVersion("1.0.2");
          beanConfig.setBasePath("/CityAlertsWeb/service");
          beanConfig.setResourcePackage("pl.cityalerts.web.controllers");
          beanConfig.setScan(true);
          ClassReaders.setReader(new JerseyApiReader());
      }
  }
  </code></pre>
  
  <p>Is there any way to make @BeanParam work in Swagger with Resteasy?
  Should I add any other dependency?</p>
  
  <p>With such a config I'm getting:</p>
  
  <pre><code>...
  Caused by: java.lang.RuntimeException: Unable to instantiate ContextResolver
  at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1607)
  at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1310)
  at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1232)
  at org.jboss.resteasy.spi.ResteasyDeployment.registerProvider(ResteasyDeployment.java:531)
  at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:338)
  at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:241)
  at org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap.contextInitialized(ResteasyBootstrap.java:28)
  at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
  at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:187)
  ... 7 more
  Caused by: java.lang.IllegalArgumentException: Unable to find a public constructor for provider class org.glassfish.jersey.media.multipart.MultiPartProperties$Feature$MultiPartContextResolver
  at org.jboss.resteasy.spi.ResteasyProviderFactory.createConstructorInjector(ResteasyProviderFactory.java:2184)
  at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2173)
  at org.jboss.resteasy.spi.ResteasyProviderFactory.addContextResolver(ResteasyProviderFactory.java:1072)
  at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1601)
  ... 15 more
  </code></pre>
  
  <p>Thanks</p>