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

Mike Drob commented on HBASE-20007:
-----------------------------------

It looks like the problem is only in dev environment, on a real cluster running 
hadoop 3 the rest server started without issue. I'm not sure how much of that 
is $dayjob deployment magic and how much is just lifted from the assembly and 
would work for other folks doing their own thing.

Tried a couple of other approaches after a bit of discussion with [~busbey], 
posting my findings here so that I don't forget everything...

It might make sense to use the maven-dependency-plugin to create a separate 
classpath listing for each service. Rest Server doesn't need some thrift 
specific things on its classpath, Thrift Server doesn't need rest things, etc. 
First problem with this approach is that dependency plugin doesn't output the 
current module, which makes sense but also leads to awkward gymnastics for us 
if we try to use it like that. We can put in a bunch of special case scripting 
for dev environment in {{bin/hbase}} then, but this all starts going down a 
path that is fairly muddy.

Further, I'm not sure what happens when we try to run this out of a binary 
tarball. Leaving this a reminder to myself to check that out.

> rest server doesn't start against hadoop-3
> ------------------------------------------
>
>                 Key: HBASE-20007
>                 URL: https://issues.apache.org/jira/browse/HBASE-20007
>             Project: HBase
>          Issue Type: Sub-task
>          Components: REST
>    Affects Versions: 2.0.0-alpha-3
>            Reporter: Mike Drob
>            Assignee: Mike Drob
>            Priority: Major
>             Fix For: 2.0.0-beta-2
>
>         Attachments: HBASE-20007.patch, HBASE-20007.patch
>
>
> While fixing HBASE-19991 I discovered that this command fails:
> {noformat}
> mvn clean package -Dhadoop.profile=3.0 -DskipTests && bin/hbase-daemon.sh 
> start rest
> {noformat}
> The command itself actually succeeds, but the rest server fails to start with
> {noformat}
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> com/sun/jersey/core/spi/factory/AbstractRuntimeDelegate
>       at java.lang.ClassLoader.defineClass1(Native Method)
>       at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
>       at 
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>       at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
>       at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
>       at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
>       at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>       at java.lang.Class.forName0(Native Method)
>       at java.lang.Class.forName(Class.java:348)
>       at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:107)
>       at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:166)
>       at 
> javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:135)
>       at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120)
>       at javax.ws.rs.core.MediaType.valueOf(MediaType.java:179)
>       at 
> org.glassfish.jersey.server.model.IntrospectionModeller.extractMediaTypes(IntrospectionModeller.java:297)
>       at 
> org.glassfish.jersey.server.model.IntrospectionModeller.extractMediaTypes(IntrospectionModeller.java:282)
>       at 
> org.glassfish.jersey.server.model.IntrospectionModeller.doCreateResourceBuilder(IntrospectionModeller.java:129)
>       at 
> org.glassfish.jersey.server.model.IntrospectionModeller.access$000(IntrospectionModeller.java:80)
>       at 
> org.glassfish.jersey.server.model.IntrospectionModeller$1.call(IntrospectionModeller.java:112)
>       at 
> org.glassfish.jersey.server.model.IntrospectionModeller$1.call(IntrospectionModeller.java:109)
>       at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
>       at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
>       at 
> org.glassfish.jersey.internal.Errors.processWithException(Errors.java:255)
>       at 
> org.glassfish.jersey.server.model.IntrospectionModeller.createResourceBuilder(IntrospectionModeller.java:109)
>       at org.glassfish.jersey.server.model.Resource.from(Resource.java:797)
>       at 
> org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:465)
>       at 
> org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:184)
>       at 
> org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:350)
>       at 
> org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:347)
>       at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
>       at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
>       at 
> org.glassfish.jersey.internal.Errors.processWithException(Errors.java:255)
>       at 
> org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:347)
>       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:643)
>       at 
> org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:422)
>       at 
> org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:892)
>       at 
> org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:349)
>       at 
> org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)
>       at 
> org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
>       at 
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
>       at 
> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
>       at org.eclipse.jetty.server.Server.start(Server.java:422)
>       at 
> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
>       at 
> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
>       at org.eclipse.jetty.server.Server.doStart(Server.java:389)
>       at 
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
>       at org.apache.hadoop.hbase.rest.RESTServer.main(RESTServer.java:357)
> Caused by: java.lang.ClassNotFoundException: 
> com.sun.jersey.core.spi.factory.AbstractRuntimeDelegate
>       at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>       ... 56 more
> {noformat}
> We fixed this for the test classpath, but more needs to be done in the 
> runtime classpath?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to