[ 
https://issues.apache.org/jira/browse/HBASE-18615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16134239#comment-16134239
 ] 

stack commented on HBASE-18615:
-------------------------------

Reset. Reel back my attempt at moving us up on to jersey2 exclusively.

Master hbase-rest test suite passes. If I run REST from tarball, it works too 
doing curl get text/xml or application/json (see below). If I try to run 
in-situ out of built dir, it fails w/ the below NoSuchMethodError which happens 
because it is finding a jersey1 before jersey2 on the CLASSPATH (from Hadoop). 
REST actually makes use of jersey1 doing JSON, the Jackson1Feature that we ask 
for on creation of the ResourceConfig setting up the REST server.

branch-2 works out of tarball but hbase-rest suite fails. Ditto on the run from 
in-situ out of a build dir.

The difference between the two branches is what @samir ahmic, above, the use of 
Jackson1Feature in the REST test utility (in master but not in branch-2). When 
I put that into branch-2, it works like master branch.

For this issue, lets push the branch-2 patch that makes master and branch-2 the 
same. Tests will pass then. The work to come up purely on jersey2 and that REST 
does not run in-situ, we can do elsewhere; they are of less import.

{code}
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)
{code}

{code}
kalashnikov:hbase-3.0.0-SNAPSHOT stack$ curl -vi -X GET  -H "Accept: text/xml" 
http://localhost:8080/version/cluster
Note: Unnecessary use of -X or --request, GET is already inferred.
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
> GET /version/cluster HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.51.0
> Accept: text/xml
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Cache-Control: no-cache
Cache-Control: no-cache
< Content-Type: text/xml
Content-Type: text/xml
< Content-Length: 102
Content-Length: 102

<
* Curl_http_done: called premature == 0
* Connection #0 to host localhost left intact
<?xml version="1.0" encoding="UTF-8" 
standalone="yes"?><ClusterVersion>3.0.0-SNAPSHOT</ClusterVersion>
kalashnikov:hbase-3.0.0-SNAPSHOT stack$ curl -vi -X GET  -H "Accept: 
application/json" http://localhost:8080/version/cluster
Note: Unnecessary use of -X or --request, GET is already inferred.
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
> GET /version/cluster HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.51.0
> Accept: application/json
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Cache-Control: no-cache
Cache-Control: no-cache
< Content-Type: application/json
Content-Type: application/json
< Content-Length: 16
Content-Length: 16

<
* Curl_http_done: called premature == 0
* Connection #0 to host localhost left intact
"3.0.0-SNAPSHOT"
{code}

> hbase-rest tests fail in hbase-2.0.0-alpha2
> -------------------------------------------
>
>                 Key: HBASE-18615
>                 URL: https://issues.apache.org/jira/browse/HBASE-18615
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>            Reporter: stack
>            Assignee: stack
>         Attachments: 18615.2.txt, 18615.txt, 18615.v3.txt, 
> HBASE-18615.branch-2.001.patch, HBASE-18615.branch-2.002.patch
>
>
> Pointed out by Andrew on VOTE mail for hbase-2.0.0-alpha2



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to