title: Correct the classpath of your application so that it contains a single, compatible version of org.axonframework.eventsourcing.eventstore.jpa
body: <p>I am working on <code>Spring Boot + Axon</code> example. Following <a href="https://www.youtube.com/watch?v=lBKZOTe9QM4&amp;list=PL4O1nDpoa5KTq5QKX9ueK-0QCJ-6Wm_ma" rel="noreferrer">https://www.youtube.com/watch?v=lBKZOTe9QM4&amp;list=PL4O1nDpoa5KTq5QKX9ueK-0QCJ-6Wm_ma</a> link from the youtube and using the latest dependencies.</p>
  
  <p>If I used <code>axon-core</code> and <code>axon-amqp</code> version to <code>3.0-RC1</code> then it works fine. But I use 3.4 version, then I get the below error on starup. Any quick help ?</p>
  
  <pre><code>***************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  An attempt was made to call the method org.axonframework.eventsourcing.eventstore.jpa.JpaEventStorageEngine.&lt;init&gt;(Lorg/axonframework/common/jpa/EntityManagerProvider;)V but it does not exist. Its class, org.axonframework.eventsourcing.eventstore.jpa.JpaEventStorageEngine, is available from the following locations:
  
      jar:file:/C:/Users/user/.m2/repository/org/axonframework/axon-core/3.4/axon-core-3.4.jar!/org/axonframework/eventsourcing/eventstore/jpa/JpaEventStorageEngine.class
  
  It was loaded from the following location:
  
      file:/C:/Users/user/.m2/repository/org/axonframework/axon-core/3.4/axon-core-3.4.jar
  
  
  Action:
  
  Correct the classpath of your application so that it contains a single, compatible version of org.axonframework.eventsourcing.eventstore.jpa.JpaEventStorageEngine
  </code></pre>
  
  <p><strong>pom.xml</strong></p>
  
  <pre><code>&lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.0.6.RELEASE&lt;/version&gt;
          &lt;!-- &lt;version&gt;1.4.2.RELEASE&lt;/version&gt; --&gt;
          &lt;relativePath /&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.axonframework&lt;/groupId&gt;
              &lt;artifactId&gt;axon-spring-boot-starter&lt;/artifactId&gt;
              &lt;version&gt;3.0-RC1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.axonframework&lt;/groupId&gt;
              &lt;artifactId&gt;axon-amqp&lt;/artifactId&gt;
              &lt;!-- &lt;version&gt;3.0-RC1&lt;/version&gt; --&gt;
              &lt;version&gt;3.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.axonframework&lt;/groupId&gt;
              &lt;artifactId&gt;axon-core&lt;/artifactId&gt;
              &lt;!-- &lt;version&gt;3.0-RC1&lt;/version&gt; --&gt;
              &lt;version&gt;3.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hsqldb&lt;/groupId&gt;
              &lt;artifactId&gt;hsqldb&lt;/artifactId&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
              &lt;artifactId&gt;lombok&lt;/artifactId&gt;
              &lt;optional&gt;true&lt;/optional&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-amqp&lt;/artifactId&gt;
          &lt;/dependency&gt; --&gt;
      &lt;/dependencies&gt;
  </code></pre>
  
  <p>DemoComplaintsApplication.java</p>
  
  <pre><code>@SpringBootApplication
  public class DemoComplaintsApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(DemoComplaintsApplication.class, args);
      }
  
      @RestController
      public static class ComplaintAPI {
  
          private final ComplaintQueryObjectRepository repostory;
          private final CommandGateway commandGateway;
  
          public ComplaintAPI(ComplaintQueryObjectRepository repostory, CommandGateway commandGateway) {
              this.repostory = repostory;
              this.commandGateway = commandGateway;
          }
  
          @PostMapping
          public CompletableFuture&lt;String&gt; fileCompplaint(@RequestBody Map&lt;String, String&gt; request) {
              String id = UUID.randomUUID().toString();
              return commandGateway
                      .send(new FileComplaintCommand(id, request.get("company"), request.get("description")));
          }
  
          @GetMapping
          public List&lt;ComplaintQueryObject&gt; findAll() {
              return repostory.findAll();
          }
  
          @GetMapping("/{id}")
          public ComplaintQueryObject find(@PathVariable String id) {
              //return repostory.findOne(id);
              return repostory.findById(id).get();
          }
      }
  
      @Aggregate
      public static class Complaint {
          @AggregateIdentifier
          private String complaintId;
  
          public Complaint() {
          }
  
          @CommandHandler
          public Complaint(FileComplaintCommand command) {
              apply(new ComplaintFileEvent(command.getId(), command.getCompany(), command.getDescription()));
          }
  
          @EventSourcingHandler
          public void on(ComplaintFileEvent event) {
              this.complaintId = event.getId();
          }
      }
  
      @Component
      public static class ComplaintQueryObjectUpdater {
  
          private final ComplaintQueryObjectRepository repository;
  
          public ComplaintQueryObjectUpdater(ComplaintQueryObjectRepository repository) {
              this.repository = repository;
          }
  
          @EventHandler
          public void on(ComplaintFileEvent event) {
              repository.save(new ComplaintQueryObject(event.getId(), event.getCompany(), event.getDescription()));
          }
      }
  
      public static class FileComplaintCommand {
          @TargetAggregateIdentifier
          private String id;
          private String company;
          private String description;
  
          public FileComplaintCommand(String id, String company, String description) {
              super();
              this.id = id;
              this.company = company;
              this.description = description;
          }
  
          public String getId() {
              return id;
          }
  
          public String getCompany() {
              return company;
          }
  
          public String getDescription() {
              return description;
          }
      }
  }
  </code></pre>