title: Failed to initialize JPA EntityManagerFactory: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
body: <p>Based on this project (updated to current latest release of spring boot + java 11):</p>
  <p><a href="https://github.com/springframeworkguru/spring5webapp/tree/bootstrap-v2" rel="nofollow noreferrer">https://github.com/springframeworkguru/spring5webapp/tree/bootstrap-v2</a></p>
  <p>I am trying to run the application from IntelliJ but I get:</p>
  <pre><code>2021-04-02 11:18:08.185  INFO 86413 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
  2021-04-02 11:18:08.422 ERROR 86413 --- [           main] j.LocalContainerEntityManagerFactoryBean : Failed to initialize JPA EntityManagerFactory: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: book, for columns: [org.hibernate.mapping.Column(authors)]
  2021-04-02 11:18:08.423  WARN 86413 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: book, for columns: [org.hibernate.mapping.Column(authors)]
  2021-04-02 11:18:08.423  INFO 86413 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
  </code></pre>
  <p>Where this looks like the essential part:</p>
  <pre><code>Could not determine type for: java.util.Set, at table: book, for columns: [org.hibernate.mapping.Column(authors)]
  </code></pre>
  <p>Any suggestions?</p>
  <p>And:</p>
  <p><strong>Author.java</strong></p>
  <pre><code>package com.example.demospring.domain;
  
  import javax.persistence.*;
  import java.util.HashSet;
  import java.util.Set;
  
  @Entity
  public class Author {
  
      private String firstName;
      private String lastName;
  
      @ManyToMany(mappedBy = &quot;authors&quot;)
      private Set&lt;Book&gt; books = new HashSet&lt;&gt;();
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private Long id;
  
      public Author() {
      }
  
      public Author(String firstName, String lastName) {
          this.firstName = firstName;
          this.lastName = lastName;
      }
  
  
      public String getFirstName() {
          return firstName;
      }
  
      public void setFirstName(String firstName) {
          this.firstName = firstName;
      }
  
      public String getLastName() {
          return lastName;
      }
  
      public void setLastName(String lastName) {
          this.lastName = lastName;
      }
  
      public Set&lt;Book&gt; getBooks() {
          return books;
      }
  
      public void setBooks(Set&lt;Book&gt; books) {
          this.books = books;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  
      @Id
      public Long getId() {
          return id;
      }
  
  
      @Override
      public String toString() {
          return &quot;Author{&quot; +
                  &quot;firstName='&quot; + firstName + '\'' +
                  &quot;, lastName='&quot; + lastName + '\'' +
                  &quot;, books=&quot; + books +
                  &quot;, id=&quot; + id +
                  '}';
      }
  
      @Override
      public boolean equals(Object o) {
          if (this == o) return true;
          if (o == null || getClass() != o.getClass()) return false;
  
          Author author = (Author) o;
  
          return id != null ? id.equals(author.id) : author.id == null;
      }
  
      @Override
      public int hashCode() {
          return id != null ? id.hashCode() : 0;
      }
  
  
  }
  </code></pre>
  <p><strong>Book.java</strong></p>
  <pre><code>package com.example.demospring.domain;
  
  
  import javax.persistence.*;
  import java.util.HashSet;
  import java.util.Set;
  
  @Entity
  public class Book {
      private String title;
      private String isbn;
  
      @ManyToMany
      @JoinTable(name = &quot;author_book&quot;, joinColumns = @JoinColumn(name=&quot;book_id&quot;), inverseJoinColumns = @JoinColumn(name=&quot;author_id&quot;))
      private Set&lt;Author&gt; authors = new HashSet&lt;&gt;();
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private Long id;
  
  
      public Book() {
      }
  
      public Book(String title, String isbn) {
          this.title = title;
          this.isbn = isbn;
      }
  
      public String getTitle() {
          return title;
      }
  
      public void setTitle(String title) {
          this.title = title;
      }
  
      public String getIsbn() {
          return isbn;
      }
  
      public void setIsbn(String isbn) {
          this.isbn = isbn;
      }
  
      public Set&lt;Author&gt; getAuthors() {
          return authors;
      }
  
      public void setAuthors(Set&lt;Author&gt; authors) {
          this.authors = authors;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  
      @Id
      public Long getId() {
          return id;
      }
  
  
      @Override
      public String toString() {
          return &quot;Book{&quot; +
                  &quot;title='&quot; + title + '\'' +
                  &quot;, isbn='&quot; + isbn + '\'' +
                  &quot;, authors=&quot; + authors +
                  &quot;, id=&quot; + id +
                  '}';
      }
  
      @Override
      public boolean equals(Object o) {
          if (this == o) return true;
          if (o == null || getClass() != o.getClass()) return false;
  
          Book book = (Book) o;
  
          return id != null ? id.equals(book.id) : book.id == null;
      }
  
      @Override
      public int hashCode() {
          return id != null ? id.hashCode() : 0;
      }
  }
  </code></pre>
  <p><strong>pom.xml</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
      xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &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.4.4&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
      &lt;groupId&gt;com.example&lt;/groupId&gt;
      &lt;artifactId&gt;demo-spring&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;demo-spring&lt;/name&gt;
      &lt;description&gt;Demo project for Spring Boot&lt;/description&gt;
      &lt;properties&gt;
          &lt;java.version&gt;11&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;com.h2database&lt;/groupId&gt;
              &lt;artifactId&gt;h2&lt;/artifactId&gt;
              &lt;scope&gt;runtime&lt;/scope&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;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>