org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘entityManagerFactory’ defined in file [/home/majid/Project/spring-jpa-primefaces-tutorial-master/target/primefaces-spring-jpa-tutorial/WEB-INF/classes/META-INF/spring/applicationContext-db.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/persistence/Convert

journaldev.com | 3 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Primefaces, Spring 4 with JPA (Hibernate 4/EclipseLink) Example Tutorial - JournalDev

    journaldev.com | 7 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘entityManagerFactory’ defined in file [/home/majid/Project/spring-jpa-primefaces-tutorial-master/target/primefaces-spring-jpa-tutorial/WEB-INF/classes/META-INF/spring/applicationContext-db.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/persistence/Convert
  2. 0

    Primefaces, Spring 4 with JPA (Hibernate 4/EclipseLink) Example Tutorial - JournalDev

    journaldev.com | 3 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘entityManagerFactory’ defined in file [/home/majid/Project/spring-jpa-primefaces-tutorial-master/target/primefaces-spring-jpa-tutorial/WEB-INF/classes/META-INF/spring/applicationContext-db.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/persistence/Convert

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      javax/persistence/Convert

      at org.hibernate.metamodel.source.annotations.JPADotNames.<init>()
    2. Hibernate
      JPADotNames.<init>
      1. org.hibernate.metamodel.source.annotations.JPADotNames.<init>(JPADotNames.java:134)
      1 frame
    3. org.hibernate.jpa
      HibernatePersistenceProvider.createContainerEntityManagerFactory
      1. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.prepareMetadataSources(EntityManagerFactoryBuilderImpl.java:386)
      2. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:224)
      3. org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:51)
      4. org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilder(HibernatePersistenceProvider.java:182)
      5. org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilder(HibernatePersistenceProvider.java:177)
      6. org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:152)
      6 frames
    4. Spring ORM
      AbstractEntityManagerFactoryBean.afterPropertiesSet
      1. org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:336)
      2. org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318)
      2 frames
    5. Spring Beans
      AbstractAutowireCapableBeanFactory.initializeBean
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
      2 frames