| Hibernate version:2.1.16 
 Mapping documents:
 
 Code between sessionFactory.openSession() and session.close():
 
 Full stack trace of any exception that occurs:
 
 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySessionFactory' defined in file [C:\projects\invendu\implementation\conf\test\applicationContext-hibernate.xml]: Initialization of bean failed; nested exception is java.lang.AbstractMethodError: COM.ibm.db2.jdbc.net.DB2DatabaseMetaData.supportsResultSetType(I)Z
 java.lang.AbstractMethodError: COM.ibm.db2.jdbc.net.DB2DatabaseMetaData.supportsResultSetType(I)Z
 at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
 at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1155)
 
 
 Name and version of the database you are using:
 
 DB2 7.2
 
 Debug level Hibernate log excerpt:
 
 Hibernate.properties:
 
 hibernate.connection.driver_class=COM.ibm.db2.jdbc.net.DB2Driver
 hibernate.connection.url=...
 hibernate.connection.username=...
 hibernate.connection.password=...
 
 
 Environment:
 
 Swing, Spring, Hibernate, DB2, Windows
 
 
 Problem:
 
 I'm developping a rich client app and i need to use the JDBC COM.ibm.db2.jdbc.net.DB2Driver to connect to DB2 to because no DB2 client will be installed on the users workstations (and therefore i can not use the COM.ibm.db2.jdbc.app.DB2Driver, which works fine).
 I get this error when Hibernate sets up the connection:  java.lang.AbstractMethodError: COM.ibm.db2.jdbc.net.DB2DatabaseMetaData.supportsResultSetType(I)Z
 
 So the problem is that this method is not abstract in the db2java.zip file including the app.DB2Driver but is abstract in the db2java.zip file including the net.DB2Driver.
 
 I managed to get around that by commenting out the code in Hibernate in the method 'public static Settings buildSettings(Properties properties)' in 'SettingsFactory.java':
 
 Connection conn = connections.getConnection();
 try {
 DatabaseMetaData meta = conn.getMetaData();
 //metaSupportsScrollable = meta.supportsResultSetType(ResultSet.TYPE_SCROLL_INSENSITIVE);
 if ( ( batchSize > 0 ) && !meta.supportsBatchUpdates() ) batchSize = 0;
 
 So my questions are:
 - what is the impact of removing this line of code?
 - Is there anything that can be done on the Hibernate development side?
 - Is there any other solution to make the COM.ibm.db2.jdbc.net.DB2Driver work with my environment?
 
 
 Many thanks for that, and congratulation again on this great framework
 
 Fabster.
 
 
 |