title: IllegalArgumentException: At least one JPA metamodel must be present
body: <p>while starting with spring rest I got following error as</p>
  <pre><code>&gt;  org.springframework.beans.factory.BeanCreationException: Error
  &gt; creating bean with name 'jpaMappingContext': Invocation of init method
  &gt; failed; nested exception is java.lang.IllegalArgumentException: At
  &gt; least one JPA metamodel must be present!
  &gt;       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1595)
  &gt; ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:566)
  &gt; ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
  &gt; ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
  &gt; ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
  &gt; ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
  &gt; ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
  &gt; ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:725)
  &gt; ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
  &gt; ~[spring-context-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
  &gt; ~[spring-context-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
  &gt; ~[spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:736)
  &gt; [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)
  &gt; [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)
  &gt; [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.boot.SpringApplication.run(SpringApplication.java:1161)
  &gt; [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.boot.SpringApplication.run(SpringApplication.java:1150)
  &gt; [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
  &gt;       at com.java.app.QuickPollApplication.main(QuickPollApplication.java:14)
  &gt; [classes/:na]
  &gt;     Caused by: java.lang.IllegalArgumentException: At least one JPA metamodel must be present!
  &gt;       at org.springframework.util.Assert.notEmpty(Assert.java:438) ~[spring-core-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.data.jpa.mapping.JpaMetamodelMappingContext.&lt;init&gt;(JpaMetamodelMappingContext.java:52)
  &gt; ~[spring-data-jpa-1.11.0.BUILD-SNAPSHOT.jar:na]
  &gt;       at org.springframework.data.jpa.repository.config.JpaMetamodelMappingContextFactoryBean.createInstance(JpaMetamodelMappingContextFactoryBean.java:71)
  &gt; ~[spring-data-jpa-1.11.0.BUILD-SNAPSHOT.jar:na]
  &gt;       at org.springframework.data.jpa.repository.config.JpaMetamodelMappingContextFactoryBean.createInstance(JpaMetamodelMappingContextFactoryBean.java:26)
  &gt; ~[spring-data-jpa-1.11.0.BUILD-SNAPSHOT.jar:na]
  &gt;       at org.springframework.beans.factory.config.AbstractFactoryBean.afterPropertiesSet(AbstractFactoryBean.java:134)
  &gt; ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1654)
  &gt; ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
  &gt;       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1591)
  &gt; ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
  &gt;       ... 16 common frames omitted
  </code></pre>
  <p>with following code</p>
  <pre><code>@SpringBootApplication
  @RestController
  public class QuickPollApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(QuickPollApplication.class, args);
      }
  
      @RequestMapping(value = &quot;/test&quot;, method = RequestMethod.GET)
      public String testRest() {
          return &quot;rest tested&quot;;
      }
  </code></pre>
  <p>and following is my pom.xml</p>
  
              UTF-8
              UTF-8
              1.8
          
      
      
          
              
                  org.springframework.boot
                  spring-boot-starter-data-jpa
              
              
                  org.springframework.boot
                  spring-boot-starter-web
              
              
                  org.springframework.boot
                  spring-boot-starter-web-services
              
      
              
                  org.hsqldb
                  hsqldb
                  runtime
              
              
                  org.springframework.boot
                  spring-boot-starter-test
                  test
              
              
                  org.springframework
                  spring-web
              
          
      
          
              
                  
                      org.springframework.boot
                      spring-boot-maven-plugin
                  
              
          
      
          
              
                  spring-snapshots
                  Spring Snapshots
                  https://repo.spring.io/snapshot
                  
                      true
                  
              
              
                  spring-milestones
                  Spring Milestones
                  https://repo.spring.io/milestone
                  
                      false
                  
              
          
          
              
                  spring-snapshots
                  Spring Snapshots
                  https://repo.spring.io/snapshot
                  
                      true
                  
              
              
                  spring-milestones
                  Spring Milestones
                  https://repo.spring.io/milestone
                  
                      false
                  
              
          
  <p>Please help me. I do not know how to solve this error</p>