Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-18615 hbase-rest tests fail in hbase-2.0.0-alpha2
  3. HBASE-18636

Cannot run REST server out of a built checkout; fails with NoSuchMethodError: javax.ws.rs.core.Application.getProperties

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • REST
    • None

    Description

      I think this a symptom of our move to jersey2 but haven't done the work to verify. Besides, it is a minor inconvenience as we make the migration from jersey1 to jersey2 but here I make note of it.

      While the REST unit tests pass and if you run hbase and then the rest server out of a built tarball, this works too, what does not work is running a REST server in-situ out of a built checkout; i.e. checkout, mvn install, and then do start-hbase.sh followed by hbase-daemon.sh rest start. HBase starts but the rest server does not. In its .out you will find the below exception which occurs because we have jersey1 and jersey2 on our CLASSPATH and REST on startup is finding jersey1 first in which the cited method does not exist.

      See the parent issue for struggles trying to take hbase pure jersey2. It involves lots of filtering out of transitive includes that are coming in from hadoop. It also means we undo our use of the Jackson1Feature trick since it depends on jersey1. While we get to a place where we can launch REST in-situ out of the build dir, we break the world of unit tests that want to run yarn et al.

      Filing this for now. It is low-priority I think and hopefully the learnings from the parent issue help move us to jersey2 and then this issue will evaporate.

      Exception in thread "main" java.lang.NoSuchMethodError: javax.ws.rs.core.Application.getProperties()Ljava/util/Map;
        at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:331)
        at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:392)
        at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:177)
        at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:369)
        at javax.servlet.GenericServlet.init(GenericServlet.java:244)
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:640)
        at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:419)
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:875)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:348)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:772)
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
        at org.eclipse.jetty.server.Server.start(Server.java:405)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
        at org.eclipse.jetty.server.Server.doStart(Server.java:372)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.apache.hadoop.hbase.rest.RESTServer.main(RESTServer.java:356)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            stack Michael Stack
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: