From 6f9af9a9245e3354c5859660c3224ed19d58498a Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Fri, 18 Aug 2017 10:09:23 -0700 Subject: [PATCH] HBASE-18518 Remove jersey1* dependencies form project and jersey1* jars from lib dir; ADDENDUM on branch-2 so master and branch-2 are same --- hbase-rest/pom.xml | 4 ++++ .../main/java/org/apache/hadoop/hbase/rest/RESTServer.java | 4 +++- pom.xml | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/hbase-rest/pom.xml b/hbase-rest/pom.xml index c157a8d3817..3e55610db65 100644 --- a/hbase-rest/pom.xml +++ b/hbase-rest/pom.xml @@ -309,6 +309,10 @@ org.glassfish.jersey.containers jersey-container-servlet-core + + org.glassfish.jersey.media + jersey-media-json-jackson1 + diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java index b78af2f5490..eb3fc26e7d1 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java @@ -66,6 +66,7 @@ import org.eclipse.jetty.util.thread.QueuedThreadPool; import org.eclipse.jetty.jmx.MBeanContainer; import org.eclipse.jetty.servlet.FilterHolder; +import org.glassfish.jersey.jackson1.Jackson1Feature; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.servlet.ServletContainer; @@ -235,7 +236,8 @@ public class RESTServer implements Constants { parseCommandLine(args, servlet); // set up the Jersey servlet container for Jetty - ResourceConfig application = new ResourceConfig(); + ResourceConfig application = new ResourceConfig(). + packages("org.apache.hadoop.hbase.rest").register(Jackson1Feature.class); ServletHolder sh = new ServletHolder(new ServletContainer(application)); // Set the default max thread number to 100 to limit diff --git a/pom.xml b/pom.xml index 9da4c6b2d7e..a7857157ead 100644 --- a/pom.xml +++ b/pom.xml @@ -1878,6 +1878,11 @@ jersey-container-servlet-core ${jersey.version} + + org.glassfish.jersey.media + jersey-media-json-jackson1 + ${jackson.version} + javax.xml.bind jaxb-api