问题描述
信息:RDBMS:Oracle,version:Oracle9iEnterpriseEditionRelease9.0.1.1.1-ProductionWiththePartitioningoptionJServerRelease9.0.1.1.1-Production2010-12-38:49:39org.hibernate.cfg.SettingsFactorybuildSettings信息:JDBCdriver:OracleJDBCdriver,version:9.0.1.1.02010-12-38:49:40org.hibernate.dialect.Dialect<init>信息:Usingdialect:org.hibernate.dialect.Oracle9iDialectExceptioninthread"main"java.lang.AbstractMethodError:oracle.jdbc.driver.OracleDatabaseMetaData.getJDBCMajorVersion()Iatorg.hibernate.engine.jdbc.JdbcSupportLoader.useContextualLobCreation(JdbcSupportLoader.java:78)atorg.hibernate.engine.jdbc.JdbcSupportLoader.loadJdbcSupport(JdbcSupportLoader.java:52)atorg.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:121)atorg.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2163)atorg.hibernate.cfg.Configuration.buildSettings(Configuration.java:2159)atorg.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1383)atHibernateTest.main(HibernateTest.java:17)附上配置文件和映射文件<?xmlversion='1.0'encoding='utf-8'?><!DOCTYPEhibernate-configurationPUBLIC"-//Hibernate/HibernateConfigurationDTD3.0//EN""http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"><hibernate-configuration><session-factory><!--Databaseconnectionsettings--><propertyname="connection.driver_class">oracle.jdbc.driver.OracleDriver</property><propertyname="connection.url">jdbc:oracle:thin:@localhost:1521:ORA92</property><propertyname="connection.username">scott</property><propertyname="connection.password">tiger</property><!--JDBCconnectionpool(usethebuilt-in)--><propertyname="connection.pool_size">1</property><!--SQLdialect--><propertyname="dialect">org.hibernate.dialect.Oracle9iDialect</property><!--EchoallexecutedSQLtostdout--><propertyname="show_sql">true</property><propertyname="format_sql">true</property><mappingresource="student.hbm.xml"/></session-factory></hibernate-configuration>
<?xmlversion="1.0"?><!DOCTYPEhibernate-mappingPUBLIC"-//Hibernate/HibernateMappingDTD3.0//EN""http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"><hibernate-mapping><classname="student"table="student"><idname="id"type="int"column="id"><generatorclass="sequence"><paramname="sequence">student_id_seq</param></generator></id><propertyname="name"type="java.lang.String"column="name"/><propertyname="psssword"type="java.lang.String"column="password"/><propertyname="phone"type="java.lang.String"column="phone"/><propertyname="email"type="java.lang.String"column="email"/></class></hibernate-mapping>
网上搜了下貌似是JDBC驱动的关系,但是我去官网重新下了个驱动还是一样,我用的ORALCE是9.0的,难道要升级到9.2吗
解决方案
解决方案二:
在Oracle安装目录里面搜索class12.jar试试
解决方案三:
引用1楼xieruilin的回复:
在Oracle安装目录里面搜索class12.jar试试
+1
解决方案四:
楼上说的对,楼主可以去类似这个目录product10.2.0client_1jdbclib找到classes12.jar、ojdbc14.jar我建议用后者
解决方案五:
下个class12.jar
解决方案六:
引用楼主lulirucs的回复:
信息:RDBMS:Oracle,version:Oracle9iEnterpriseEditionRelease9.0.1.1.1-ProductionWiththePartitioningoptionJServerRelease9.0.1.1.1-Production2010-12-38:49:39org.hibernate.cfg.Settin……
我用的JDBC驱动就是ORACLE目录下找来了,出现这个问题之后才去官网下的,结果还是出现一样的问题