title: Axonframework doesn't insert event data with jpa
body: <p>I ran the getting started guide (<a href="http://www.axonframework.org/axon-2-quickstart-guide/" rel="nofollow noreferrer">http://www.axonframework.org/axon-2-quickstart-guide/</a>) and it works fine. </p>
  
  <p>I tried to replace the FileSystemEventStore with JpaEventStore, but it doesn't store any event.</p>
  
  <p><img src="https://i.stack.imgur.com/UCFxP.png" alt="enter image description here"></p>
  
  <p>Here is my configuration:</p>
  
  <pre><code>public static void main(String[] args) {
      CommandBus commandBus = new SimpleCommandBus();
      CommandGateway commandGateway = new DefaultCommandGateway(commandBus);
      //EventStore eventStore = new FileSystemEventStore(new SimpleEventFileResolver(new File("./events")));
  
      EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory( "cqrsworkshop" );
      EntityManager entityManager = entityManagerFactory.createEntityManager();
      SimpleEntityManagerProvider entityManagerProvider = new SimpleEntityManagerProvider(entityManager);
      EventStore eventStore = new JpaEventStore(entityManagerProvider);
  
      EventBus eventBus = new SimpleEventBus();
      EventSourcingRepository&lt;ToDoItem&gt; repository = new EventSourcingRepository&lt;ToDoItem&gt;(ToDoItem.class, eventStore);
  
      repository.setEventBus(eventBus);
  
      AggregateAnnotationCommandHandler.subscribe(ToDoItem.class, repository, commandBus);
      AnnotationEventListenerAdapter.subscribe(new ToDoEventHandler(), eventBus);
  
      final String itemId = UUID.randomUUID().toString();
      commandGateway.send(new CreateToDoItemCommand(itemId, "Need to do this"));
      commandGateway.send(new MarkCompletedCommand(itemId));
  
      entityManagerFactory.close();
  }
  
     &lt;persistence-unit name="cqrsworkshop"&gt;
              &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;
              &lt;!-- JPA Event Store --&gt;
              &lt;class&gt;org.axonframework.eventstore.jpa.DomainEventEntry&lt;/class&gt;
              &lt;class&gt;org.axonframework.eventstore.jpa.SnapshotEventEntry&lt;/class&gt;
  
              &lt;properties&gt;
  
                  &lt;property name="javax.persistence.jdbc.driver" value="org.h2.Driver" /&gt;
  
                  &lt;property name="javax.persistence.jdbc.url" value="jdbc:h2:~/test" /&gt;
                  &lt;property name="javax.persistence.jdbc.user" value="sa" /&gt;
                  &lt;property name="javax.persistence.jdbc.password" value="" /&gt;
  
                  &lt;property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect " /&gt;
                  &lt;property name="hibernate.show_sql" value="true" /&gt;
                  &lt;property name="hibernate.hbm2ddl.auto" value="update" /&gt;
              &lt;/properties&gt;
          &lt;/persistence-unit&gt;
  </code></pre>