This is an automated email from the ASF dual-hosted git repository.
madhan pushed a commit to branch ranger-2.5
in repository https://gitbox.apache.org/repos/asf/ranger.git
The following commit(s) were added to refs/heads/ranger-2.5 by this push:
new c609c9740 RANGER-4874: replaced javax.ws.rs-api with jsr311-api, as
jersey-bundle fails with javax.ws.rs-api - #2
c609c9740 is described below
commit c609c9740864fabab6d984617e191bcc7a72fd70
Author: Madhan Neethiraj <[email protected]>
AuthorDate: Mon Jul 29 15:05:19 2024 -0700
RANGER-4874: replaced javax.ws.rs-api with jsr311-api, as jersey-bundle
fails with javax.ws.rs-api - #2
---
agents-audit/pom.xml | 4 --
agents-common/pom.xml | 4 --
agents-cred/pom.xml | 4 --
credentialbuilder/pom.xml | 4 --
distro/src/main/assembly/sample-client.xml | 2 +-
hbase-agent/pom.xml | 12 ------
hdfs-agent/pom.xml | 12 ------
kms/pom.xml | 17 ---------
.../java/javax/ws/rs/core/NoContentException.java | 44 ++++++++++++++++++++++
knox-agent/pom.xml | 4 --
plugin-kafka/pom.xml | 4 --
plugin-ozone/pom.xml | 4 --
plugin-schema-registry/pom.xml | 4 --
plugin-yarn/pom.xml | 4 --
pom.xml | 13 -------
ranger-authn/pom.xml | 4 --
ranger-common-ha/pom.xml | 4 --
ranger-examples/plugin-sampleapp/pom.xml | 4 --
ranger-hdfs-plugin-shim/pom.xml | 4 --
ranger-metrics/pom.xml | 4 --
ranger-presto-plugin-shim/pom.xml | 4 --
ranger-yarn-plugin-shim/pom.xml | 4 --
security-admin/pom.xml | 13 -------
.../java/javax/ws/rs/core/NoContentException.java | 44 ++++++++++++++++++++++
storm-agent/pom.xml | 8 ----
ugsync/pom.xml | 5 ---
26 files changed, 89 insertions(+), 145 deletions(-)
diff --git a/agents-audit/pom.xml b/agents-audit/pom.xml
index b0e7bb92a..e8f5c20b8 100644
--- a/agents-audit/pom.xml
+++ b/agents-audit/pom.xml
@@ -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>
diff --git a/agents-common/pom.xml b/agents-common/pom.xml
index 02c4a2362..26d4ca633 100644
--- a/agents-common/pom.xml
+++ b/agents-common/pom.xml
@@ -115,10 +115,6 @@
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
diff --git a/agents-cred/pom.xml b/agents-cred/pom.xml
index 6ed81be0b..b8950319a 100644
--- a/agents-cred/pom.xml
+++ b/agents-cred/pom.xml
@@ -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>
diff --git a/credentialbuilder/pom.xml b/credentialbuilder/pom.xml
index 6e5dc7c0c..5317df429 100644
--- a/credentialbuilder/pom.xml
+++ b/credentialbuilder/pom.xml
@@ -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>
diff --git a/distro/src/main/assembly/sample-client.xml
b/distro/src/main/assembly/sample-client.xml
index dd01d1f47..56f3677c2 100644
--- a/distro/src/main/assembly/sample-client.xml
+++ b/distro/src/main/assembly/sample-client.xml
@@ -101,4 +101,4 @@
</includes>
</fileSet>
</fileSets>
-</assembly>
\ No newline at end of file
+</assembly>
diff --git a/hbase-agent/pom.xml b/hbase-agent/pom.xml
index 1d214cdcc..f5c87d195 100644
--- a/hbase-agent/pom.xml
+++ b/hbase-agent/pom.xml
@@ -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>
@@ -379,10 +375,6 @@
<groupId>log4j</groupId>
<artifactId>*</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -415,10 +407,6 @@
<groupId>log4j</groupId>
<artifactId>*</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
diff --git a/hdfs-agent/pom.xml b/hdfs-agent/pom.xml
index e51ec307d..af1a12188 100644
--- a/hdfs-agent/pom.xml
+++ b/hdfs-agent/pom.xml
@@ -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>
@@ -98,10 +94,6 @@
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -169,10 +161,6 @@
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
diff --git a/kms/pom.xml b/kms/pom.xml
index 0003378a5..9d4e601fc 100644
--- a/kms/pom.xml
+++ b/kms/pom.xml
@@ -86,10 +86,6 @@
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -259,11 +255,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>
@@ -344,10 +335,6 @@
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -620,10 +607,6 @@
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
diff --git a/kms/src/main/java/javax/ws/rs/core/NoContentException.java
b/kms/src/main/java/javax/ws/rs/core/NoContentException.java
new file mode 100644
index 000000000..b9366122d
--- /dev/null
+++ b/kms/src/main/java/javax/ws/rs/core/NoContentException.java
@@ -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);
+ }
+}
diff --git a/knox-agent/pom.xml b/knox-agent/pom.xml
index 9063fda2b..b3ae482e8 100644
--- a/knox-agent/pom.xml
+++ b/knox-agent/pom.xml
@@ -133,10 +133,6 @@
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
diff --git a/plugin-kafka/pom.xml b/plugin-kafka/pom.xml
index bac40aac8..0214f6515 100644
--- a/plugin-kafka/pom.xml
+++ b/plugin-kafka/pom.xml
@@ -70,10 +70,6 @@
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
diff --git a/plugin-ozone/pom.xml b/plugin-ozone/pom.xml
index 7fa198f0a..a18b87f3e 100644
--- a/plugin-ozone/pom.xml
+++ b/plugin-ozone/pom.xml
@@ -81,10 +81,6 @@ limitations under the License.
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
diff --git a/plugin-schema-registry/pom.xml b/plugin-schema-registry/pom.xml
index fa4f781bc..ba2831472 100644
--- a/plugin-schema-registry/pom.xml
+++ b/plugin-schema-registry/pom.xml
@@ -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>
diff --git a/plugin-yarn/pom.xml b/plugin-yarn/pom.xml
index c5263ecff..cfa4df078 100644
--- a/plugin-yarn/pom.xml
+++ b/plugin-yarn/pom.xml
@@ -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>
diff --git a/pom.xml b/pom.xml
index bd5b69600..a964d045e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -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>
@@ -866,10 +865,6 @@
<groupId>org.codehaus.jackson</groupId>
<artifactId>*</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -881,10 +876,6 @@
<groupId>org.codehaus.jackson</groupId>
<artifactId>*</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -907,10 +898,6 @@
<groupId>org.codehaus.jackson</groupId>
<artifactId>*</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
diff --git a/ranger-authn/pom.xml b/ranger-authn/pom.xml
index 361a130f5..807d413db 100644
--- a/ranger-authn/pom.xml
+++ b/ranger-authn/pom.xml
@@ -50,10 +50,6 @@
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
diff --git a/ranger-common-ha/pom.xml b/ranger-common-ha/pom.xml
index b1fba9690..4482c7f61 100644
--- a/ranger-common-ha/pom.xml
+++ b/ranger-common-ha/pom.xml
@@ -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>
diff --git a/ranger-examples/plugin-sampleapp/pom.xml
b/ranger-examples/plugin-sampleapp/pom.xml
index 297cabeda..63febb16b 100644
--- a/ranger-examples/plugin-sampleapp/pom.xml
+++ b/ranger-examples/plugin-sampleapp/pom.xml
@@ -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>
diff --git a/ranger-hdfs-plugin-shim/pom.xml b/ranger-hdfs-plugin-shim/pom.xml
index fb4ecb631..70ba342e8 100644
--- a/ranger-hdfs-plugin-shim/pom.xml
+++ b/ranger-hdfs-plugin-shim/pom.xml
@@ -52,10 +52,6 @@
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
diff --git a/ranger-metrics/pom.xml b/ranger-metrics/pom.xml
index c9b676460..630ef0673 100644
--- a/ranger-metrics/pom.xml
+++ b/ranger-metrics/pom.xml
@@ -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>
diff --git a/ranger-presto-plugin-shim/pom.xml
b/ranger-presto-plugin-shim/pom.xml
index 05d0c7fe8..bf93fe463 100644
--- a/ranger-presto-plugin-shim/pom.xml
+++ b/ranger-presto-plugin-shim/pom.xml
@@ -104,10 +104,6 @@
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
diff --git a/ranger-yarn-plugin-shim/pom.xml b/ranger-yarn-plugin-shim/pom.xml
index 83d3b67d6..b7f87aece 100644
--- a/ranger-yarn-plugin-shim/pom.xml
+++ b/ranger-yarn-plugin-shim/pom.xml
@@ -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>
diff --git a/security-admin/pom.xml b/security-admin/pom.xml
index ddc7dfffd..19ee9fac0 100644
--- a/security-admin/pom.xml
+++ b/security-admin/pom.xml
@@ -325,11 +325,6 @@
</exclusion>
</exclusions>
</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.core</groupId>
<artifactId>jackson-core</artifactId>
@@ -603,10 +598,6 @@
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -648,10 +639,6 @@
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
diff --git
a/security-admin/src/main/java/javax/ws/rs/core/NoContentException.java
b/security-admin/src/main/java/javax/ws/rs/core/NoContentException.java
new file mode 100644
index 000000000..b9366122d
--- /dev/null
+++ b/security-admin/src/main/java/javax/ws/rs/core/NoContentException.java
@@ -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);
+ }
+}
diff --git a/storm-agent/pom.xml b/storm-agent/pom.xml
index 38f3f6a33..fab962ff0 100644
--- a/storm-agent/pom.xml
+++ b/storm-agent/pom.xml
@@ -121,10 +121,6 @@
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -160,10 +156,6 @@
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
- <exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
diff --git a/ugsync/pom.xml b/ugsync/pom.xml
index 1240711f4..6822bca2f 100644
--- a/ugsync/pom.xml
+++ b/ugsync/pom.xml
@@ -140,11 +140,6 @@
<artifactId>ranger-plugins-common</artifactId>
<version>${project.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.core</groupId>
<artifactId>jackson-core</artifactId>