My entity class has a sequence.
我的实体类有一个序列。
@Entity
@SequenceGenerator(name = "idgen", sequenceName = "PROVIDER_SEQ")
public class Provider extends BaseEntity {
Superclass defines idgen. However when I run the Ant task to convert to SQL I get
超类定义idgen。但是,当我运行Ant任务转换为SQL时,我得到了
Caused by: java.lang.NoSuchMethodError: javax.persistence.SequenceGenerator.catalog()Ljava/lang/String
引起:java.lang.NoSuchMethodError:javax.persistence.SequenceGenerator.catalog()Ljava / lang / String
Am using Hibernate3.0
我正在使用Hibernate3.0
1 个解决方案
#1
5
You have mixture of JPA 1 and 2 libraries in classpath. As you see from the documentation, catalog attribute was added in JPA 2.0. Hibernate 3.0 is rather old (roughly 7 years) and does not implement JPA 2.
在类路径中混合了JPA 1和2库。从文档中可以看出,在JPA 2.0中添加了catalog属性。 Hibernate 3.0相当陈旧(大约7年),并没有实现JPA 2。
#1
5
You have mixture of JPA 1 and 2 libraries in classpath. As you see from the documentation, catalog attribute was added in JPA 2.0. Hibernate 3.0 is rather old (roughly 7 years) and does not implement JPA 2.
在类路径中混合了JPA 1和2库。从文档中可以看出,在JPA 2.0中添加了catalog属性。 Hibernate 3.0相当陈旧(大约7年),并没有实现JPA 2。