-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: NoSuchMethodError: javax.persistence.Table.indexes()
PostPosted: Fri Feb 10, 2017 10:58 am 
Newbie

Joined: Wed Jan 18, 2017 8:37 pm
Posts: 3
I’m trying to migrate from Hibernate 4.1.4 to Hibernate 5.1.1. But. I keep getting this error, upon Tomcat startup when Spring tries to instantiate my session factory:

Caused by: java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;


I do have the hibernate-jpa-2.1-api-1.0.0.Final.jar file in the lib directory of my web app.


I’m running on Tomcat 8.0.30


Here’s the mix of frameworks that I’m using:

Hibernate 5.1.1

Spring 4.2.5

Struts 2.3.30

Hibernate Validator 5.1.2


Top
 Profile  
 
 Post subject: Re: Need help migrating to Hibernate 5.1.1
PostPosted: Fri Feb 10, 2017 11:03 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
You have multiple versions of JPA libraries, that's why you get this error.

Check both the WAR libraries and the Tomcat global libraries for JPA, and you'll find it.

If you're using Maven, just run:

> mvn dependency:tree

and grep for JPA libraries.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.