The Hibernate tool gives "Caused by: java.lang.NoSuchMethodError: javax.persistence.SequenceGenerator.catalog () Ljava / lang / String;"

My entity class has a sequence.

@Entity
@SequenceGenerator(name = "idgen", sequenceName = "PROVIDER_SEQ")
public class Provider extends BaseEntity {

The superclass defines idgen. However, when I run the Ant task to convert to SQL, I get

Called: java.lang.NoSuchMethodError: javax.persistence.SequenceGenerator.catalog () Ljava / lang / String

Using Hibernate3.0

+3
source share
1 answer

You have a mix of JPA 1 and 2 libraries in the classpath. As you can see from the documentation , a directory attribute was added in JPA 2.0. Hibernate 3.0 is quite old (about 7 years old) and does not implement JPA 2.

+5
source

All Articles