Skip to content

Commit

Permalink
RANGER-4874: replaced javax.ws.rs-api with jsr311-api, as jersey-bund…
Browse files Browse the repository at this point in the history
…le fails with javax.ws.rs-api - #2

(cherry picked from commit c609c97)
  • Loading branch information
mneethiraj committed Jul 30, 2024
1 parent 72270ab commit 477f879
Show file tree
Hide file tree
Showing 25 changed files with 88 additions and 144 deletions.
4 changes: 0 additions & 4 deletions agents-audit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
4 changes: 0 additions & 4 deletions agents-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
4 changes: 0 additions & 4 deletions agents-cred/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
4 changes: 0 additions & 4 deletions credentialbuilder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
12 changes: 0 additions & 12 deletions hbase-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,6 @@
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -371,10 +367,6 @@
<groupId>log4j</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -415,10 +407,6 @@
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
12 changes: 0 additions & 12 deletions hdfs-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -106,10 +102,6 @@
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -182,10 +174,6 @@
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
17 changes: 0 additions & 17 deletions kms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -266,11 +262,6 @@
<artifactId>httpcore</artifactId>
<version>${httpcomponents.httpcore.version}</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>${javax.ws.rs-api.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
Expand Down Expand Up @@ -351,10 +342,6 @@
<groupId>log4j</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -627,10 +614,6 @@
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
44 changes: 44 additions & 0 deletions kms/src/main/java/javax/ws/rs/core/NoContentException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package javax.ws.rs.core;

import java.io.IOException;

/* Workaround: use of JacksonJaxbJsonProvider in RangerJsonProvider along with jersey-bundle results in following initialization failure:
* SEVERE: Allocate exception for servlet [REST Service]
* java.lang.ClassNotFoundException: javax.ws.rs.core.NoContentException
* at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1338)
* at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1150)
*/
public class NoContentException extends IOException {
private static final long serialVersionUID = -3082577759787473245L;

public NoContentException(String message) {
super(message);
}

public NoContentException(String message, Throwable cause) {
super(message, cause);
}

public NoContentException(Throwable cause) {
super(cause);
}
}
4 changes: 0 additions & 4 deletions knox-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
4 changes: 0 additions & 4 deletions plugin-kafka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
4 changes: 0 additions & 4 deletions plugin-ozone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ limitations under the License.
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
4 changes: 0 additions & 4 deletions plugin-schema-registry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
4 changes: 0 additions & 4 deletions plugin-yarn/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
13 changes: 0 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@
<javax-inject.version>1</javax-inject.version>
<javax.annotation-api>1.3.2</javax.annotation-api>
<javax.el.version>3.0.1-b12</javax.el.version>
<javax.ws.rs-api.version>2.1.1</javax.ws.rs-api.version>
<jaxb.api.version>2.3.1</jaxb.api.version>
<jericho.html.version>3.3</jericho.html.version>
<jersey-bundle.version>1.19.3</jersey-bundle.version>
Expand Down Expand Up @@ -861,10 +860,6 @@
<groupId>org.codehaus.jackson</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand All @@ -876,10 +871,6 @@
<groupId>org.codehaus.jackson</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand All @@ -902,10 +893,6 @@
<groupId>org.codehaus.jackson</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
4 changes: 0 additions & 4 deletions ranger-authn/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down
4 changes: 0 additions & 4 deletions ranger-common-ha/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
4 changes: 0 additions & 4 deletions ranger-examples/plugin-sampleapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
4 changes: 0 additions & 4 deletions ranger-hdfs-plugin-shim/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
4 changes: 0 additions & 4 deletions ranger-metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
4 changes: 0 additions & 4 deletions ranger-presto-plugin-shim/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down
4 changes: 0 additions & 4 deletions ranger-yarn-plugin-shim/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
Loading

0 comments on commit 477f879

Please sign in to comment.