org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [persistence-beans.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedOperationException: any types do not have a unique referenced persister

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Hibernate JIRA by Jan Goyvaerts, 1 year ago
Error creating bean with name 'entityManagerFactory' defined in class path resource [persistence-beans.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedOperationException: any types do not have a unique referenced persister
via Hibernate JIRA by Jan Goyvaerts, 1 year ago
Error creating bean with name 'entityManagerFactory' defined in class path resource [persistence-beans.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedOperationException: any types do not have a unique referenced persister
via atlassian.net by Unknown author, 2 years ago
Error creating bean with name 'entityManagerFactory' defined in class path resource [persistence-beans.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedOperationException: any types not have a unique referenced persister
via Spring JIRA by Florian, 1 year ago
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;
via Spring JIRA by Florian, 1 year ago
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;
via Hibernate JIRA by Jones, 10 months ago
Error creating bean with name 'entityManagerFactory' defined in class path resource [META-INF/spring/jpa.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: appPersistenceUnit] Unable to build Hibernate SessionFactory
java.lang.UnsupportedOperationException: any types do not have a unique referenced persister
at org.hibernate.type.AnyType.getAssociatedJoinable(AnyType.java:501)
at org.hibernate.tuple.component.AbstractCompositionAttribute$1$1.next(AbstractCompositionAttribute.java:107)
at org.hibernate.persister.walking.spi.MetamodelGraphWalker.visitAttributes(MetamodelGraphWalker.java:147)
at org.hibernate.persister.walking.spi.MetamodelGraphWalker.visitCompositeDefinition(MetamodelGraphWalker.java:216)
at org.hibernate.persister.walking.spi.MetamodelGraphWalker.visitAttributeDefinition(MetamodelGraphWalker.java:180)
at org.hibernate.persister.walking.spi.MetamodelGraphWalker.visitAttributes(MetamodelGraphWalker.java:148)
at org.hibernate.persister.walking.spi.MetamodelGraphWalker.visitEntityDefinition(MetamodelGraphWalker.java:111)
at org.hibernate.persister.walking.spi.MetamodelGraphWalker.visitEntity(MetamodelGraphWalker.java:71)
at org.hibernate.loader.plan.build.spi.MetamodelDrivenLoadPlanBuilder.buildRootEntityLoadPlan(MetamodelDrivenLoadPlanBuilder.java:56)
at org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader.(AbstractLoadPlanBasedEntityLoader.java:99)
at org.hibernate.loader.entity.plan.EntityLoader.(EntityLoader.java:134)
at org.hibernate.loader.entity.plan.EntityLoader.(EntityLoader.java:55)
at org.hibernate.loader.entity.plan.EntityLoader$Builder.byUniqueKey(EntityLoader.java:98)
at org.hibernate.loader.entity.plan.EntityLoader$Builder.byPrimaryKey(EntityLoader.java:94)
at org.hibernate.loader.entity.plan.AbstractBatchingEntityLoaderBuilder.buildNonBatchingLoader(AbstractBatchingEntityLoaderBuilder.java:47)
at org.hibernate.loader.entity.BatchingEntityLoaderBuilder.buildLoader(BatchingEntityLoaderBuilder.java:76)
at org.hibernate.persister.entity.AbstractEntityPersister.createEntityLoader(AbstractEntityPersister.java:2506)
at org.hibernate.persister.entity.AbstractEntityPersister.createEntityLoader(AbstractEntityPersister.java:2528)
at org.hibernate.persister.entity.AbstractEntityPersister.createLoaders(AbstractEntityPersister.java:4029)
at org.hibernate.persister.entity.AbstractEntityPersister.postInstantiate(AbstractEntityPersister.java:4011)
at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:479)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843)
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:399)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842)
at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:150)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:288)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1541)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1482)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:922)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
at com.acme.util.SpringContextRule$1.evaluate(SpringContextRule.java:88)
at com.acme.persistence.TemporaryDatabaseRule$1.evaluate(TemporaryDatabaseRule.java:99)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.