[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-5307) "SettingsFactory" no longer checks for presence of "supportsGetGeneratedKeys" before calling it
Steve Ebersole (JIRA)
noreply at atlassian.com
Fri Jun 11 22:46:58 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole closed HHH-5307.
-------------------------------
Resolution: Rejected
Since 3.3 Hibernate has expected at least JDBC3 (>= JDK 1.4). You appear to be using a driver for JDK 1.3 or earlier.
> "SettingsFactory" no longer checks for presence of "supportsGetGeneratedKeys" before calling it
> -----------------------------------------------------------------------------------------------
>
> Key: HHH-5307
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5307
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.5.2
> Reporter: Weinan Xiong
>
> Same issue occured again like HHH-5017. The Hibernate version is 3.5.2.
> When I am using DB2 type 2 driver, I will get the following error:
> Initial SessionFactory Creaion Failed.java.lang.AbstractMethodError
> The temperate solution will add this property into xxx.cfg.xml file:
> hibernate.temp.use_jdbc_metadata_defaults= false.
> When you look at the source code for SettingsFactory, you can tell the supportsGetGeneratedKeys has never been checked before getting call.
> boolean useJdbcMetadata = PropertiesHelper.getBoolean( "hibernate.temp.use_jdbc_metadata_defaults", props, true );
> if ( useJdbcMetadata ) {
> try {
> Connection conn = connections.getConnection();
> try {
> DatabaseMetaData meta = conn.getMetaData();
> log.info( "RDBMS: " + meta.getDatabaseProductName() + ", version: " + meta.getDatabaseProductVersion() );
> log.info( "JDBC driver: " + meta.getDriverName() + ", version: " + meta.getDriverVersion() );
> dialect = DialectFactory.buildDialect( props, conn );
> jdbcSupport = JdbcSupportLoader.loadJdbcSupport( conn );
> metaSupportsScrollable = meta.supportsResultSetType( ResultSet.TYPE_SCROLL_INSENSITIVE );
> metaSupportsBatchUpdates = meta.supportsBatchUpdates();
> metaReportsDDLCausesTxnCommit = meta.dataDefinitionCausesTransactionCommit();
> metaReportsDDLInTxnSupported = !meta.dataDefinitionIgnoredInTransactions();
> metaSupportsGetGeneratedKeys = meta.supportsGetGeneratedKeys();
> }
> catch ( SQLException sqle ) {
> log.warn( "Could not obtain connection metadata", sqle );
> }
> finally {
> connections.closeConnection( conn );
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list