title: Spring kafka error Caused by: java.lang.ClassNotFoundException: org.springframework.kafka.transaction.KafkaAwareTransactionManager
body: <p>This is wired just started spring boot project with simple main class, it works fine without spring-kafka dependency but after adding <code>spring-kafka</code> and <code>spring-kafka-test</code> blows up with exception, github <a href="https://github.com/Deadpool1111/SpringKafkaTest" rel="noreferrer">here</a></p>
  
  <p><strong>gradle.build</strong></p>
  
  <pre><code>apply plugin: 'java-library'
  
  repositories {
      jcenter()
   }
  
  dependencies {
  
       compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.1.0.RELEASE'
       compile group: 'org.springframework.kafka', name: 'spring-kafka', version: '2.0.5.RELEASE'
      testCompile group: 'org.springframework.kafka', name: 'spring-kafka-test', version: '2.0.5.RELEASE'
  
   }
  </code></pre>
  
  <p><strong>Main class</strong></p>
  
  <pre><code>@SpringBootApplication
  public class KafkaMain {
  
  public static void main(String[] args) {
      SpringApplication.run(KafkaMain.class, args);
       }
  
    }
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <pre><code>Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
  2018-12-16 19:32:29.347 ERROR 39854 --- [           main] o.s.boot.SpringApplication               : Application run failed
  
  org.springframework.beans.factory.BeanCreationException: Erro creating beanwithname'org.springframework.boot.autoconfigure.kafka.KafkaAnnotationDrivenConfiguration': Unexpected exception during bean creation; nested exception is java.lang.TypeNotPresentException: Type org.springframework.kafka.transaction.KafkaAwareTransactionManager not present
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:511) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
  at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:846) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:863) ~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) ~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
  at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
  at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
  at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
  at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
  at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
  at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
  at com.kafka.KafkaMain.main(KafkaMain.java:10) [bin/:na]
  Caused by: java.lang.TypeNotPresentException: Type org.springframework.kafka.transaction.KafkaAwareTransactionManager not present
  </code></pre>