Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting NoSuchMethodError [SPR-12034] #16650

spring-issuemaster opened this issue Jul 26, 2014 · 1 comment


Copy link

@spring-issuemaster spring-issuemaster commented Jul 26, 2014

Shoeb Siddiqui opened SPR-12034 and commented

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [net/ibs/config/database.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/SharedCacheMode;

<bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" id="entityManagerFactory">
<property name="persistenceUnitName" value="persistenceUnit"/>
<property name="dataSource" ref="dataSource"/>

Affects: 4.0.6


This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Jul 26, 2014

Juergen Hoeller commented

This looks like you have a JPA 1.0 API jar on the classpath too, getting picked up before your explicitly declared JPA 2.0 API jar. That JPA 1.0 jar probably comes in transitively through your persistence provider, e.g. an old Hibernate version... Note that you have to use Hibernate 3.6 or higher as of Spring 4.0.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.