- Java code
Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE at 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:250) at org.hibernate.cfg.Configuration.<init>(Configuration.java:302) at dao.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:24) at impl.UserImpl.getAll(UserImpl.java:16) at text.UserList.main(UserList.java:20)
------解决方案--------------------
User 配置文件中和bean里面关于INSTANCE 属性不匹配