Announcement Announcement Module
Collapse
No announcement yet.
ClassDefFoundError: org/apache/hadoop/hive/service/HiveClient Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ClassDefFoundError: org/apache/hadoop/hive/service/HiveClient

    Hi friends,
    when i try to connect to hiveserver using hiveclient I got the following error, shows "org/apache/hadoop/hive/service/HiveClient" is missing. If HiveClient is missing then plz tell me how to download hive-jar using gradlew.

    Code:
            <context:property-placeholder location="hadoop.properties"/>
            <hdp:configuration>
                    fs.default.name=${hd.fs}
            </hdp:configuration>
            <hdp:hive-client host="localhost"  port="10000"/>
    Code:
    ../gradlew
    :compileJava UP-TO-DATE
    :processResources UP-TO-DATE
    :classes UP-TO-DATE
    :run
    2012-06-11 13:13:31,098 INFO [org.springframework.context.support.ClassPathXmlApplicationContext] - <Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1a0c10f: startup date [Mon Jun 11 13:13:31 IST 2012]; root of context hierarchy>
    2012-06-11 13:13:31,233 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Loading XML bean definitions from class path resource [META-INF/spring/context.xml]>
    2012-06-11 13:13:31,663 INFO [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Loading properties file from class path resource [hadoop.properties]>
    2012-06-11 13:13:31,688 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@115273a: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,hadoop-configuration,hive-client,clean-script,runner]; root of factory hierarchy>
    2012-06-11 13:13:31,780 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@115273a: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,hadoop-configuration,hive-client,clean-script,runner]; root of factory hierarchy>
    Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hive-client': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/hadoop/hive/service/HiveClient
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:526)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567)
            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
            at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
            at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
            at org.springframework.data.hadoop.samples.wordcount.Main.main(Main.java:41)
    Caused by: java.lang.NoClassDefFoundError: org/apache/hadoop/hive/service/HiveClient
            at java.lang.Class.getDeclaredMethods0(Native Method)
            at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
            at java.lang.Class.privateGetPublicMethods(Class.java:2547)
            at java.lang.Class.getMethods(Class.java:1410)
            at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1284)
            at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1158)
            at java.beans.Introspector.getBeanInfo(Introspector.java:408)
            at java.beans.Introspector.getBeanInfo(Introspector.java:167)
            at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:224)
            at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:149)
            at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:324)
            at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:354)
            at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:426)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1329)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1085)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)
            ... 11 more
    Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.service.HiveClient
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native)Method
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            ... 27 more
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':run'.
    > Command '/usr/java/jdk1.6.0_29/bin/java' finished with (non-zero) exit value 1.
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    
    BUILD FAILED
    
    Total time: 8.067 secs

  • #2
    http://search.maven.org/#artifactdet...%7C0.9.0%7Cjar

    Comment

    Working...
    X