Hibernate java.lang.NoSuchFieldError: INSTANCE
2024-08-25 05:48:19
在使用hibernate3.6.2是我遇到了一个有趣的错误java.lang.NoSuchFieldError: INSTANCEat org.hibernate.type.BasicTypeRegistry.<init>(BasicTypeRegistry.java:94)at org.hibernate.type.TypeResolver.<init>(TypeResolver.java:59)at org.hibernate.cfg.Configuration.<init>(Configuration.java:249)at org.hibernate.cfg.Configuration.<init>(Configuration.java:300)
近在项目中使用SSH集成开发,由于hibernate使用3.0在映射配置文件中用<filter-def>老是报错,就升级hibernate到3.6版本了,但是报错了,错误如上。网上查了一下,说是hibernate3.5以后就集成annotation了,不需要引入hibernate-annotations.jar和hibernate-commons-annotations.jar,在项目中去掉这两个jar包,就可以了,标记一下
原因: hibernate3.6与 hibernate-annotations.jar和hibernate-commons-annotations.jar冲突
最新文章
- [译]Testing Node.js With Mocha and Chai
- Spring MVC实例(增删改查)
- 转载~vim配置文件
- POJ1947 - Rebuilding Roads(树形DP)
- 报错:Cannot insert explicit value for identity column in table &#39;t&#39; when identity_insert is set to OFF
- mvn archetyoe:generate -DarchetypeCatalog=internal
- Nginx基础教程PPT
- linux查看与开启ssh
- 【百度地图API】如何获取行政区域的边界?
- 使用putty上传文件到linux系统
- 从JVM字节码执行看重载和重写
- POJ 3673 Cow Multiplication
- BookNote: Refactoring - Improving the Design of Existing Code
- 方法总结:如何实现html页面自动刷新
- go-设计思想
- 洛谷P3321 序列统计
- LeetCode高频148错题记录
- 2019.04.09 电商24 订单模快 ORM
- tar 打包当前目录下文件但不包括该录
- 26、xcode8.0 解决没有iPhone4模拟器问题