title: java.lang.ClassNotFoundException: org.apache.hadoop.hive.service.HiveServer$ThriftHiveProcessorFactory
body: <p>hi everyone i have refer below link to create one sample of spring with hive integration.</p>
  
  <p><a href="https://github.com/spring-projects/spring-data-book/tree/master/hadoop/hive" rel="nofollow noreferrer">https://github.com/spring-projects/spring-data-book/tree/master/hadoop/hive</a></p>
  
  <p>When i used as it is only spring version i have changed,below is my pom.xml</p>
  
  <pre><code>&lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;spring.hadoop.version&gt;1.0.0.RELEASE&lt;/spring.hadoop.version&gt;
          &lt;spring.integration.version&gt;3.0.1.RELEASE&lt;/spring.integration.version&gt;
          &lt;!-- &lt;spring.integration.version&gt;2.1.3.RELEASE&lt;/spring.integration.version&gt;  --&gt;    
          &lt;hadoop.version&gt;1.0.1&lt;/hadoop.version&gt;
          &lt;hive.version&gt;0.8.1&lt;/hive.version&gt;
          &lt;thrift.version&gt;0.7.0&lt;/thrift.version&gt;
          &lt;log4j.version&gt;1.2.17&lt;/log4j.version&gt;
          &lt;spring.version&gt;3.2.1.RELEASE&lt;/spring.version&gt;
          &lt;logback.version&gt;1.0.6&lt;/logback.version&gt;
          &lt;querydsl.version&gt;2.9.0&lt;/querydsl.version&gt;
    &lt;/properties&gt;
  
    &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
              &lt;artifactId&gt;spring-data-hadoop&lt;/artifactId&gt;
              &lt;version&gt;${spring.hadoop.version}&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-context-support&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                      &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
                      &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
                &lt;/exclusion&gt;
              &lt;/exclusions&gt;                
          &lt;/dependency&gt; 
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;       
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.integration&lt;/groupId&gt;
              &lt;artifactId&gt;spring-integration-core&lt;/artifactId&gt;
              &lt;version&gt;${spring.integration.version}&lt;/version&gt;
          &lt;/dependency&gt;       
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
              &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
              &lt;version&gt;${hadoop.version}&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
              &lt;artifactId&gt;hive-metastore&lt;/artifactId&gt;
              &lt;version&gt;${hive.version}&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt; 
                      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                      &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt; 
                      &lt;groupId&gt;log4j&lt;/groupId&gt;
                      &lt;artifactId&gt;log4j&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
                      &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
                &lt;/exclusion&gt;
              &lt;/exclusions&gt;            
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
              &lt;artifactId&gt;hive-service&lt;/artifactId&gt;
              &lt;version&gt;${hive.version}&lt;/version&gt;      
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                      &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt; 
                      &lt;groupId&gt;log4j&lt;/groupId&gt;
                      &lt;artifactId&gt;log4j&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
                      &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
                &lt;/exclusion&gt;
              &lt;/exclusions&gt;           
          &lt;/dependency&gt;   
  
          &lt;!-- thrift only needed as compile time to support 'native' implementation of HivePasswordRepository --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.thrift&lt;/groupId&gt;
              &lt;artifactId&gt;libthrift&lt;/artifactId&gt;
              &lt;version&gt;${thrift.version}&lt;/version&gt;
          &lt;/dependency&gt;           
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.thrift&lt;/groupId&gt;
              &lt;artifactId&gt;libfb303&lt;/artifactId&gt;
              &lt;version&gt;${thrift.version}&lt;/version&gt;
          &lt;/dependency&gt;               
  
          &lt;!-- runtime Hive deps start --&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
              &lt;artifactId&gt;hive-common&lt;/artifactId&gt;
              &lt;version&gt;${hive.version}&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                          &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
                          &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
                   &lt;/exclusion&gt;
               &lt;/exclusions&gt;
          &lt;/dependency&gt;       
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
              &lt;artifactId&gt;hive-builtins&lt;/artifactId&gt;
              &lt;version&gt;${hive.version}&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;           
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
              &lt;artifactId&gt;hive-jdbc&lt;/artifactId&gt;
              &lt;version&gt;${hive.version}&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;           
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
              &lt;artifactId&gt;hive-shims&lt;/artifactId&gt;
              &lt;version&gt;${hive.version}&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                          &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
                          &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
                   &lt;/exclusion&gt;
               &lt;/exclusions&gt;
          &lt;/dependency&gt;           
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
              &lt;artifactId&gt;hive-serde&lt;/artifactId&gt;
              &lt;version&gt;${hive.version}&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt; 
                      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                      &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt; 
                      &lt;groupId&gt;log4j&lt;/groupId&gt;
                      &lt;artifactId&gt;log4j&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                          &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
                          &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
                   &lt;/exclusion&gt;
              &lt;/exclusions&gt;               
          &lt;/dependency&gt;               
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
              &lt;artifactId&gt;hive-contrib&lt;/artifactId&gt;
              &lt;version&gt;${hive.version}&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                          &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
                          &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
                   &lt;/exclusion&gt;
               &lt;/exclusions&gt;
          &lt;/dependency&gt;
          &lt;!-- runtime Hive deps end --&gt;      
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.groovy&lt;/groupId&gt;
              &lt;artifactId&gt;groovy&lt;/artifactId&gt;
              &lt;version&gt;1.8.5&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;                   
  
          &lt;dependency&gt;
              &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
              &lt;artifactId&gt;logback-classic&lt;/artifactId&gt;
              &lt;version&gt;${logback.version}&lt;/version&gt;
          &lt;/dependency&gt;
    &lt;/dependencies&gt;
  </code></pre>
  
  <p>in this case i got below exception</p>
  
  <pre><code>Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hiveServer': Invocation of init method failed; nested exception is org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address 0.0.0.0/0.0.0.0:10000.
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:608)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
      at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:197)
      at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:172)
      at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:158)
      at com.evolvus.nxtgen.MyApp.main(MyApp.java:15)
  Caused by: org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address 0.0.0.0/0.0.0.0:10000.
      at org.apache.thrift.transport.TServerSocket.&lt;init&gt;(TServerSocket.java:93)
      at org.apache.thrift.transport.TServerSocket.&lt;init&gt;(TServerSocket.java:75)
      at org.apache.thrift.transport.TServerSocket.&lt;init&gt;(TServerSocket.java:68)
      at org.springframework.data.hadoop.hive.HiveServerFactoryBean.afterPropertiesSet(HiveServerFactoryBean.java:73)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1545)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483)
      ... 13 more
  </code></pre>
  
  <p>After refer to some Q &amp; A here i changed my pom.xml to this as below to overcome this issue.</p>
  
  <pre><code>&lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;spring.hadoop.version&gt;1.0.0.RELEASE&lt;/spring.hadoop.version&gt;
          &lt;!-- &lt;spring.integration.version&gt;2.1.3.RELEASE&lt;/spring.integration.version&gt; --&gt;
          &lt;spring.integration.version&gt;3.0.1.RELEASE&lt;/spring.integration.version&gt;      
          &lt;hadoop.version&gt;1.0.1&lt;/hadoop.version&gt;
          &lt;!-- &lt;hive.version&gt;0.8.1&lt;/hive.version&gt; --&gt;
          &lt;hive.version&gt;2.1.1&lt;/hive.version&gt; 
          &lt;!-- &lt;thrift.version&gt;0.7.0&lt;/thrift.version&gt; --&gt;
          &lt;thrift.version&gt;0.9.3&lt;/thrift.version&gt;
          &lt;log4j.version&gt;1.2.17&lt;/log4j.version&gt;
          &lt;spring.version&gt;3.2.1.RELEASE&lt;/spring.version&gt;
          &lt;logback.version&gt;1.0.6&lt;/logback.version&gt;
          &lt;querydsl.version&gt;2.9.0&lt;/querydsl.version&gt;
          &lt;hamcrest.version&gt;1.3&lt;/hamcrest.version&gt;
    &lt;/properties&gt;
  
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;3.8.1&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
              &lt;artifactId&gt;spring-data-hadoop&lt;/artifactId&gt;
              &lt;version&gt;${spring.hadoop.version}&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-context-support&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                      &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;                
          &lt;/dependency&gt; 
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;       
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.integration&lt;/groupId&gt;
              &lt;artifactId&gt;spring-integration-core&lt;/artifactId&gt;
              &lt;version&gt;${spring.integration.version}&lt;/version&gt;
          &lt;/dependency&gt;       
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
              &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
              &lt;version&gt;${hadoop.version}&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
              &lt;artifactId&gt;hive-metastore&lt;/artifactId&gt;
              &lt;version&gt;${hive.version}&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt; 
                      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                      &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt; 
                      &lt;groupId&gt;log4j&lt;/groupId&gt;
                      &lt;artifactId&gt;log4j&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;            
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
              &lt;artifactId&gt;hive-service&lt;/artifactId&gt;
              &lt;version&gt;${hive.version}&lt;/version&gt;
              &lt;!-- &lt;version&gt;1.2.1000.2.4.2.12-1&lt;/version&gt;      --&gt;    
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                      &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt; 
                      &lt;groupId&gt;log4j&lt;/groupId&gt;
                      &lt;artifactId&gt;log4j&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;           
          &lt;/dependency&gt;
  
  
          &lt;!-- thrift only needed as compile time to support 'native' implementation of HivePasswordRepository --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.thrift&lt;/groupId&gt;
              &lt;artifactId&gt;libthrift&lt;/artifactId&gt;
              &lt;version&gt;${thrift.version}&lt;/version&gt;
          &lt;/dependency&gt;           
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.thrift&lt;/groupId&gt;
              &lt;artifactId&gt;libfb303&lt;/artifactId&gt;
              &lt;version&gt;${thrift.version}&lt;/version&gt;
          &lt;/dependency&gt;               
  
          &lt;!-- runtime Hive deps start --&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
              &lt;artifactId&gt;hive-common&lt;/artifactId&gt;
              &lt;version&gt;${hive.version}&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;       
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
              &lt;artifactId&gt;hive-builtins&lt;/artifactId&gt;
              &lt;!-- &lt;version&gt;${hive.version}&lt;/version&gt; --&gt;
              &lt;version&gt;0.10.0&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;           
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
              &lt;artifactId&gt;hive-jdbc&lt;/artifactId&gt;
              &lt;version&gt;${hive.version}&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;           
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
              &lt;artifactId&gt;hive-shims&lt;/artifactId&gt;
              &lt;version&gt;${hive.version}&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;           
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
              &lt;artifactId&gt;hive-serde&lt;/artifactId&gt;
              &lt;version&gt;${hive.version}&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt; 
                      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                      &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt; 
                      &lt;groupId&gt;log4j&lt;/groupId&gt;
                      &lt;artifactId&gt;log4j&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;               
          &lt;/dependency&gt;               
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
              &lt;artifactId&gt;hive-contrib&lt;/artifactId&gt;
              &lt;version&gt;${hive.version}&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- runtime Hive deps end --&gt;      
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.groovy&lt;/groupId&gt;
              &lt;artifactId&gt;groovy&lt;/artifactId&gt;
              &lt;version&gt;1.8.5&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;                   
  
          &lt;dependency&gt;
              &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
              &lt;artifactId&gt;logback-classic&lt;/artifactId&gt;
              &lt;version&gt;${logback.version}&lt;/version&gt;
          &lt;/dependency&gt;
    &lt;/dependencies&gt;
  </code></pre>
  
  <p>in this case got below exception :</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hive/service/HiveServer$ThriftHiveProcessorFactory
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
      at java.lang.Class.getDeclaredMethods(Class.java:1975)
      at org.springframework.core.type.StandardAnnotationMetadata.hasAnnotatedMethods(StandardAnnotationMetadata.java:159)
      at org.springframework.context.annotation.ConfigurationClassUtils.isLiteConfigurationCandidate(ConfigurationClassUtils.java:106)
      at org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:88)
      at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:255)
      at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:225)
      at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
      at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:197)
      at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:172)
      at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:158)
      at com.evolvus.nxtgen.HiveApp.main(HiveApp.java:15)
  Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.service.HiveServer$ThriftHiveProcessorFactory
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 14 more
  </code></pre>
  
  <p>I already tried by changing the port no from 10000 to 10001.Still facing the issue.Please any one know this.Thanks for giving yours valuable time.I am using java 1.8 and Hadoop 2.7.3 , Hive 2.1.1.For your information i have created a new project as it is in the github link(didn't import the same project to the workspace) </p>