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

Toshihiro Suzuki commented on HBASE-21182:
------------------------------------------

I think running bin/start-hbase.sh in the source checkout directory is 
expected, because bin/hbase obviously expects it as the following:
{code}
# Detect if we are in hbase sources dir
in_dev_env=false
if [ -d "${HBASE_HOME}/target" ]; then
  in_dev_env=true
fi
{code}
And it looks like when in_dev_env=true, it adds jars in cached_classpath.txt to 
the classpath.
{code}
#Add the development env class path stuff
if $in_dev_env; then
  add_maven_deps_to_classpath "cached_classpath.txt"

  if [[ $jline_needed ]]; then
    add_maven_deps_to_classpath "cached_classpath_jline.txt"
  elif [[ $jruby_needed ]]; then
    add_maven_deps_to_classpath "cached_classpath_jruby.txt"
  fi
fi
{code}
This actual path is hbase-build-configuration/target/cached_classpath.txt, and 
it looks like it's generated by the hbase-assembly module.

I think we should not add hbase-shaded-mapreduce.jar to the 
cached_classpath.txt. I will make a patch not to add hbase-shaded-mapreduce the 
cached_classpath.txt.

> Failed to execute start-hbase.sh
> --------------------------------
>
>                 Key: HBASE-21182
>                 URL: https://issues.apache.org/jira/browse/HBASE-21182
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: Subrat Mishra
>            Priority: Major
>
> Built master branch like below:
> {code:java}
> mvn clean install -DskipTests{code}
> Then tried to execute start-hbase.sh failed with NoClassDefFoundError
> {code:java}
> ./bin/start-hbase.sh 
> Error: A JNI error has occurred, please check your installation and try again
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> org/apache/hadoop/hbase/shaded/org/eclipse/jetty/server/Connector
> at java.lang.Class.getDeclaredMethods0(Native Method)
> at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
> at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
> at java.lang.Class.getMethod0(Class.java:3018)
> at java.lang.Class.getMethod(Class.java:1784)
> at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
> at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
> Caused by: java.lang.ClassNotFoundException: 
> org.apache.hadoop.hbase.shaded.org.eclipse.jetty.server.Connector{code}
> Note: It worked after reverting HBASE-21153



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

Reply via email to