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 | 10 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

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

    journaldev.com | 10 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
  3. 0
    samebug tip
    There's a class or Jar missing, check if you have the jar and if it's included in your class-path, specially the hibernate-validator jar.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Deploy project without /WEB-INF/lib by placing libs in Tomcat's common.loader

    Stack Overflow | 4 years ago | Igor Bobko
    java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl
  6. 0

    NoClassDefFoundError: com/fasterxml/jackson/databind/ObjectMapper with Red5

    Stack Overflow | 4 years ago | ufk
    java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/ObjectMapper

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    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