title: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; : At least one JPA metamodel must be present
body: <p>pom.xml</p>
  
  <pre><code>&lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
              &lt;version&gt;1.5.6.RELEASE&lt;/version&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;version&gt;1.5.6.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa --&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;version&gt;2.0.3.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;mysql&lt;/groupId&gt;
              &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
              &lt;version&gt;8.0.11&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  </code></pre>
  
  <hr>
  
  <p>public interface EmployeeInterface extends CrudRepository{
  }</p>
  
  <hr>
  
  <pre><code>@RestController
  public class EmployeeController {
  
      @Autowired
      EmployeeInterface empInterface;
  
      @RequestMapping("/getAll")
      public List&lt;Employee&gt; getEmployees() {
          return (List&lt;Employee&gt;)empInterface.findAll();
      }
  }
  </code></pre>
  
  <hr>
  
  <p>Employee entity with getters and setters</p>
  
  <pre><code>@Entity
  @Table(name="Employee")
  public class Employee implements Serializable {
  
      private static final long serialVersionUID = 5406213393320888178L;
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      @Column(name="id")
      private Long id;
      @Column(name="fname")
      private String fname;
      @Column(name="lname")
      private String lname;
  </code></pre>
  
  <p>When i execute the jar created </p>
  
  <p>java -Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=container -jar demo.jar</p>
  
  <p>I see this error</p>
  
  <p>Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: At least one JPA metamodel must be present!</p>