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!

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web46

Stack trace

  • 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! at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1589)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:554)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:740)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at com.crossover.techtrial.java.se.TrialApplication.main(TrialApplication.java:12)[classes/:na] Caused by: java.lang.IllegalArgumentException: At least one JPA metamodel must be present! at org.springframework.util.Assert.notEmpty(Assert.java:276)[spring-core-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.data.jpa.mapping.JpaMetamodelMappingContext.<init>(JpaMetamodelMappingContext.java:52)[spring-data-jpa-1.10.6.RELEASE.jar:na] at org.springframework.data.jpa.repository.config.JpaMetamodelMappingContextFactoryBean.createInstance(JpaMetamodelMappingContextFactoryBean.java:71)[spring-data-jpa-1.10.6.RELEASE.jar:na] at org.springframework.data.jpa.repository.config.JpaMetamodelMappingContextFactoryBean.createInstance(JpaMetamodelMappingContextFactoryBean.java:26)[spring-data-jpa-1.10.6.RELEASE.jar:na] at org.springframework.beans.factory.config.AbstractFactoryBean.afterPropertiesSet(AbstractFactoryBean.java:134)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1648)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1585)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] ... 16 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

tvrmsmithtvrmsmith
3 times, last one
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitor2 times, last one
18 more bugmates