Exception in thread "main" java.lang.AbstractMethodError: oracle.jdbc.driver.OracleDatabaseMetaData....

Exception in thread "main" java.lang.AbstractMethodError: oracle.jdbc.driver.OracleDatabaseMetaData.supportsGetGeneratedKeys()Z
 at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:142)
 at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
 at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
 at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
 at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:71)
 at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2270)
 at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2266)
 at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1735)
 at com.hibernate.model.StudentTest.beforeClass(StudentTest.java:24)
 at com.hibernate.model.StudentTest.main(StudentTest.java:32)


导入的驱动包有问题 :
oracle10g  的包用classes12.jar,在hibernate框架上就很容易出现上面的错误,推荐大家使用下面的包ojdbc14_1_.jar

转载于:https://www.cnblogs.com/slowly-keeping/archive/2012/04/20/2458969.html

你可能感兴趣的:(java,数据库)