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 9b38b984138..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 @@ -235,9 +235,7 @@ public class RESTServer implements Constants { parseCommandLine(args, servlet); - // Set up the Jersey servlet container for Jetty - // The Jackson1Feature is a signal to Jersey that it should use jackson doing json. - // See here: https://stackoverflow.com/questions/39458230/how-register-jacksonfeature-on-clientconfig + // set up the Jersey servlet container for Jetty ResourceConfig application = new ResourceConfig(). packages("org.apache.hadoop.hbase.rest").register(Jackson1Feature.class); ServletHolder sh = new ServletHolder(new ServletContainer(application)); diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java index c5cc1217f8f..298b954650b 100644 --- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java +++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java @@ -34,7 +34,6 @@ import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.servlet.ServletHolder; import org.eclipse.jetty.servlet.ServletContextHandler; -import org.glassfish.jersey.jackson1.Jackson1Feature; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.servlet.ServletContainer; @@ -62,8 +61,7 @@ public class HBaseRESTTestingUtility { RESTServlet.getInstance(conf, UserProvider.instantiate(conf)); // set up the Jersey servlet container for Jetty - ResourceConfig app = new ResourceConfig(). - packages("org.apache.hadoop.hbase.rest").register(Jackson1Feature.class); + ResourceConfig app = new ResourceConfig(); ServletHolder sh = new ServletHolder(new ServletContainer(app)); // set up Jetty and run the embedded server