hibernate4.3 与JPA结合实现数据库插入报错unable to build factory
来源:互联网 发布:软件测试工具使用 编辑:程序博客网 时间:2024/04/28 09:21
hibernate4.3 与JPA结合实现数据库插入报错unable to build factory。
原因分析:在实体类中如果类添加了注解 @table(name=“user”) 就会报这个错误。
java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;
所以把 @Entity修改为 @entity(name=“user”)
这样就不会出现那种情况。
@Entity(name="user")
/*@Table(name="User")*/
之前介绍过hibernate的创建sessionfactory方法 在4.3版本中也发生了变化。影响范围挺大的。
0 0
- hibernate4.3 与JPA结合实现数据库插入报错unable to build factory
- SPRING 报错 Unable to access project 's build-path
- Android项目Build报错:Unable to execute dx
- 报错:Unable to instantiate Configuration. Unable to build the default ValidatorFactory.
- Hibernate错误:Unable to build the default Bean Validator Factory
- 【转】SSH 整合 junit报错 Unable to get the default Bean Validation factory
- Android APP build报错:Unable to resolve target 'android-17'
- android studio 3.0 报错 Unable to find method 'com.android.build.gradle.internal.variant.BaseVariantDa
- Hibernate4.3.5报Could not bind factory to JNDI的解决方案
- 打开安卓项目报错Failed to load E:\android\android-sdk-windows\build-tools\26.0.2\lib\dx.ja Unable to build:
- 启动数据库报错:ORA-27123: unable to attach to shared memory segment
- 关于解决Eclipse报错显示Unable to build: the file dx.jar was not loaded from the SDK folder
- Eclipse报错 Unable to build: the file dx.jar was not loaded from the SDK folder
- eclipse异常报错:Unable to build: the file dx.jar was not loaded from the SDK folder
- Eclipse报错显示Unable to build: the file dx.jar was not loaded from the SDK folder
- 解决Eclipse报错显示Unable to build: the file dx.jar was not loaded from the SDK folder
- SSH 整合报错处理记录---Unable to get the default Bean Validation factory
- 整合ssh时候报 Unable to get the default Bean Validation factory
- [Python]解释器的几种实现版本
- USACO 40 The Perfect Stall
- STL algorithm算法fill_n(15)
- 有用的链接(数据获取、项目管理)
- Java多线程(2)——多线程安全(传智播客毕老师视频讲解)
- hibernate4.3 与JPA结合实现数据库插入报错unable to build factory
- ios 使用 通讯录 picker 快速 拾取 用户 手机号码 代码分享
- Java将Unix时间戳转换成指定格式日期
- 互斥量和信号量的区别
- DELPHI之关于String的内存分配
- QT实现CRC16校验(查表法)
- [leetcode] Single Number II
- Linux线程同步与互斥
- 基于servlet的文件下载