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