org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [applicationContextDb.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.property.access.spi.PropertyAccessStrategyResolver.resolvePropertyAccessStrategy(Ljava/lang/String;Lorg/hibernate/EntityMode;)Lorg/hibernate/property/access/spi/PropertyAccessStrategy;

Spring JIRA | Florian | 1 year ago
  1. 0

    Hello, Spring can not instantiate the bean EntityManagerFactory with the final version of Hibernate ORM 5.0 Looking at the sources of Hibernate 5.0 RC3 / RC4, I realize that resolvePropertyAccessStrategy method has an additional parameter: containerClass (type: class) https://github.com/hibernate/hibernate-orm/blob/c622d391990969a7d776cf06f565c5934c0d8be4/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyResolverStandardImpl.java Errors : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [applicationContextDb.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.property.access.spi.PropertyAccessStrategyResolver.resolvePropertyAccessStrategy(Ljava/lang/String;Lorg/hibernate/EntityMode;)Lorg/hibernate/property/access/spi/PropertyAccessStrategy; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1045) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:824) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)

    Spring JIRA | 1 year ago | Florian
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [applicationContextDb.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.property.access.spi.PropertyAccessStrategyResolver.resolvePropertyAccessStrategy(Ljava/lang/String;Lorg/hibernate/EntityMode;)Lorg/hibernate/property/access/spi/PropertyAccessStrategy;
  2. 0

    Hello, Spring can not instantiate the bean EntityManagerFactory with the final version of Hibernate ORM 5.0 Looking at the sources of Hibernate 5.0 RC3 / RC4, I realize that resolvePropertyAccessStrategy method has an additional parameter: containerClass (type: class) https://github.com/hibernate/hibernate-orm/blob/c622d391990969a7d776cf06f565c5934c0d8be4/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyResolverStandardImpl.java Errors : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [applicationContextDb.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.property.access.spi.PropertyAccessStrategyResolver.resolvePropertyAccessStrategy(Ljava/lang/String;Lorg/hibernate/EntityMode;)Lorg/hibernate/property/access/spi/PropertyAccessStrategy; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1045) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:824) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)

    Spring JIRA | 1 year ago | Florian
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [applicationContextDb.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.property.access.spi.PropertyAccessStrategyResolver.resolvePropertyAccessStrategy(Ljava/lang/String;Lorg/hibernate/EntityMode;)Lorg/hibernate/property/access/spi/PropertyAccessStrategy;
  3. 0

    [SPR-4683] NullPointerException in org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator - Spring JIRA

    spring.io | 11 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource' defined in class path resource [...] : BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Working on Spring MVC Project? How to Report List of All Loaded Spring Beans during Startup?

    crunchify.com | 1 year ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0’: Cannot resolve reference to bean ‘nodeProperty’ while setting bean property ‘properties’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘nodeProperty’: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [config/crunchify.properties] cannot be opened because it does not exist
  6. 0

    Spring 3 and Mongo Configuration help - Spring Forum

    spring.io | 11 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongo' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.data.document.mongodb.MongoFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/data/document/UncategorizedDocumentStoreException

  1. Kawada 10 times, last 8 months ago
  2. kjhdofjosvs 3 times, last 1 month ago
  3. Tahir 6 times, last 2 months ago
  4. asdasd 4 times, last 3 months ago
  5. tvrmsmith 4 times, last 3 months ago
13 more registered users
81 unregistered visitors
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. org.springframework.beans.factory.BeanCreationException

    Error creating bean with name 'entityManagerFactory' defined in class path resource [applicationContextDb.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.property.access.spi.PropertyAccessStrategyResolver.resolvePropertyAccessStrategy(Ljava/lang/String;Lorg/hibernate/EntityMode;)Lorg/hibernate/property/access/spi/PropertyAccessStrategy;

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean()
  2. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    4. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
    5. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    6. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
    7. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
    7 frames
  3. Spring Context
    ClassPathXmlApplicationContext.<init>
    1. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1045)
    2. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:824)
    3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
    4. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
    5. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
    5 frames