Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As a follow-on to <strong>ahus1</strong>'s answer: if you have a multi-level deployment archive (i.e. a top-level EAR file containing an EJB jar and a war file), you will need to configure the exclusion of <code>org.jboss.resteasy.resteasy-jackson-provider</code> on whichever sub-deployment contains the RESTEasy/JAX-RS components.</p> <p>In my deployment, for example, my REST endpoints were annotated on top of EJBs in my EJB jar file, while my <code>@ApplicationPath</code>-annotated <code>javax.ws.rs.core.Application</code> subclass which activates RESTEasy was in my war file. I found that the approaches of putting the exclusions solely on the top-level (EAR) deployment (as in ahus1's example) or on the EJB-jar-level deployment were ineffective, but I finally got RESTEasy to use Jettison rather than Jackson by putting the exclusions on all 3 levels (EAR, EJB, Web):</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt; &lt;jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2"&gt; &lt;deployment&gt; &lt;exclusions&gt; &lt;module name="org.jboss.resteasy.resteasy-jackson-provider" /&gt; &lt;/exclusions&gt; &lt;dependencies&gt; &lt;module name="org.jboss.resteasy.resteasy-jettison-provider" /&gt; &lt;/dependencies&gt; &lt;/deployment&gt; &lt;sub-deployment name="MyApp-ejb.jar"&gt; &lt;exclusions&gt; &lt;module name="org.jboss.resteasy.resteasy-jackson-provider" /&gt; &lt;/exclusions&gt; &lt;dependencies&gt; &lt;module name="org.jboss.resteasy.resteasy-jettison-provider" /&gt; &lt;/dependencies&gt; &lt;/sub-deployment&gt; &lt;sub-deployment name="MyApp.war"&gt; &lt;exclusions&gt; &lt;module name="org.jboss.resteasy.resteasy-jackson-provider" /&gt; &lt;/exclusions&gt; &lt;dependencies&gt; &lt;module name="org.jboss.resteasy.resteasy-jettison-provider" /&gt; &lt;/dependencies&gt; &lt;/sub-deployment&gt; &lt;/jboss-deployment-structure&gt; </code></pre> <p>It's very likely that I only needed the exclusions on the subdeployments, and putting it on the main EAR deployment is superfluous; I didn't try it that way, since for now putting it on all three seems to work perfectly well.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload