hibernate 注解报错
刚配置hibernate,用的是4.3版本,把required中的全部导入进去,然后配置注解,@Entity@Cache(usage=CacheConcurrencySt...
刚配置hibernate, 用的是4.3版本, 把required中的全部导入进去,然后配置注解,
@Entity
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Table(name="tuser")
public class TUser {
@Id
@SequenceGenerator(name="seq_t_user",sequenceName="seq_t_user")
@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="seq_t_user")
private int id;
@Column
private String username;
@Column
private String sex;
上面是一部分代码,运行时候报错了,提示
Exception in thread "main" java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;
找了老半天,没找到解决的办法,跪求大神帮忙解决!!! 展开
@Entity
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Table(name="tuser")
public class TUser {
@Id
@SequenceGenerator(name="seq_t_user",sequenceName="seq_t_user")
@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="seq_t_user")
private int id;
@Column
private String username;
@Column
private String sex;
上面是一部分代码,运行时候报错了,提示
Exception in thread "main" java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;
找了老半天,没找到解决的办法,跪求大神帮忙解决!!! 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询