Spring Jersey - java.lang.NoSuchMethodError: javax.ws.rs.core.Application.getProperties()Ljava/util/Map
<p><strong>UPDATE:</strong> So I just want to point out that before I submitted this question, I attempted the solution that I've seen on similar stackoverflow questions such as <a href="https://stackoverflow.com/questions/28509370/nosuchmethoderror-on-startup-in-java-jersey-app">this one</a>. It was still giving me runtime errors, so I decided to write this question. <code>mvn dependency:tree</code> is what I was looking for so thanks @dunni. With <code>mvn dependency:tree</code>, I was able to find the actual name of the jersey dependency that was breaking my application and updated the exclusion by changing it from:</p>

<pre><code>&lt;exclusions&gt;
    &lt;exclusion&gt;
        &lt;groupId&gt;javax.ws.rs&lt;/groupId&gt;
        &lt;artifactId&gt;jsr311-api&lt;/artifactId&gt;
    &lt;/exclusion&gt;
&lt;/exclusions&gt;
</code></pre>

<p>To:</p>

<pre><code>&lt;exclusions&gt;
    &lt;exclusion&gt;
        &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
        &lt;artifactId&gt;jersey-client&lt;/artifactId&gt;
    &lt;/exclusion&gt;
&lt;/exclusions&gt;
</code></pre>

<p>This works now.</p>

<hr>

<p>For the longest time, I've been working on this Spring Jersey REST application using 1 internal company repository. Now, I found out that a library I need to use only exists in a 2nd internal company repository. I updated my .m2 -> settings.xml configuration to add the reference to the new repo like so:</p>

<pre><code>&lt;settings&gt;
    &lt;mirrors&gt;
        &lt;mirror&gt;
            &lt;id&gt;internal-repository1&lt;/id&gt;
            &lt;name&gt;name&lt;/name&gt;
            &lt;url&gt;http://repo1.company.com/repositories/&lt;/url&gt;
            &lt;mirrorOf&gt;*, !repo2&lt;/mirrorOf&gt;
        &lt;/mirror&gt;
    &lt;/mirrors&gt;  
    &lt;profiles&gt;
        &lt;profile&gt;
            &lt;id&gt;profile&lt;/id&gt;
            &lt;repositories&gt;
                &lt;repository&gt;
                    &lt;id&gt;repo1&lt;/id&gt;
                    &lt;name&gt;repo1&lt;/name&gt;
                    &lt;url&gt;http://repo1.company.com/repositories/&lt;/url&gt;
                &lt;/repository&gt;
                &lt;repository&gt;
                    &lt;id&gt;repo2&lt;/id&gt;
                    &lt;name&gt;repo2&lt;/name&gt;
                    &lt;url&gt;http://repo2.company.com/respositories/&lt;/url&gt;
                &lt;/repository&gt;
            &lt;/repositories&gt;
        &lt;/profile&gt;                
    &lt;/profiles&gt;

    &lt;activeProfiles&gt;
        &lt;activeProfile&gt;profile&lt;/activeProfile&gt;
    &lt;/activeProfiles&gt;
&lt;/settings&gt;
</code></pre>

<p>This works. I can see in the System.out that it attempts to download the repo2 exclusive dependency from repo1.company.com/repositories/. It fails, then it attempts to download it from repo2.company.com/repositories and it succeeds. The build continues, and eventually tomcat gets started up on localhost:8080 and everything is fine.</p>

<p>The problem is, whenever I try to access any of my Jersey REST endpoints I've set up, I get the runtime error mentioned in the question title:</p>

<pre><code>ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[my.package.name] 
- Allocate exception for servlet my.package.name.JerseyConfig
java.lang.NoSuchMethodError: javax.ws.rs.core.Application.getProperties()Ljava/util/Map;
</code></pre>

<p>I know for a fact that the issue lies somewhere in this new dependency I'm trying to use. When I comment out the dependency in my pom.xml, and re run the application, everything works fine. All REST endpoints are functional. Uncomment the dependency, re-run the application, and try to access my REST endpoints, and I get the above error.</p>

<p>How do I go about finding out why this dependency is breaking my Jersey application at runtime?</p>