Hibernate version:3.1.2
Hi,
I use a Sybase DB and jconn3 as my jdbc driver. I upgraded from version 3.0 to 3.1.2 and at init of SessionFactory I got exceptions like:
Code:
DEBUG impl.NewPooledConnection: com.mchange.v2.c3p0.impl.NewPooledConnection@1bd7848 handling a throwable.
com.sybase.jdbc3.utils.UnimplementedOperationException: The method com.sybase.jdbc3.jdbc.SybDatabaseMetaData.getDatabaseMajorVersion() has not been completed and should not be called.
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseRuntimeException(ErrorMessage.java:957)
at com.sybase.jdbc3.utils.Debug.notImplemented(Debug.java:387)
at com.sybase.jdbc3.jdbc.SybDatabaseMetaData.getDatabaseMajorVersion(SybDatabaseMetaData.java:2271)
at com.mchange.v2.c3p0.impl.NewProxyDatabaseMetaData.getDatabaseMajorVersion(NewProxyDatabaseMetaData.java:3678)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.hibernate.cfg.SettingsFactory.getDatabaseMajorVersion(SettingsFactory.java:293)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
at my.package.util.HibernateUtil.init(HibernateInventoryUtil.java:18)
...
This seems like a bug in Hibernate or jconn. Another exception:
Code:
DEBUG sql.SqlUtils: Converting Throwable to SQLException...
com.sybase.jdbc3.utils.UnimplementedOperationException: The method com.sybase.jdbc3.jdbc.SybDatabaseMetaData.getDatabaseMajorVersion() has not been completed and should not be called.
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseRuntimeException(ErrorMessage.java:957)
at com.sybase.jdbc3.utils.Debug.notImplemented(Debug.java:387)
at com.sybase.jdbc3.jdbc.SybDatabaseMetaData.getDatabaseMajorVersion(SybDatabaseMetaData.java:2271)
at com.mchange.v2.c3p0.impl.NewProxyDatabaseMetaData.getDatabaseMajorVersion(NewProxyDatabaseMetaData.java:3678)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.hibernate.cfg.SettingsFactory.getDatabaseMajorVersion(SettingsFactory.java:293)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
After init of SessionFactory I see
Code:
DEBUG impl.NewPooledConnection: A Throwable occurred while trying to reset the typeMap property of our Connection to Collections.EMPTY_MAP!
com.sybase.jdbc3.utils.UnimplementedOperationException: The method com.sybase.jdbc3.jdbc.SybConnection.setTypeMap(java.util.Map) has not been completed and should not be called.
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseRuntimeException(ErrorMessage.java:957)
at com.sybase.jdbc3.utils.Debug.notImplemented(Debug.java:387)
at com.sybase.jdbc3.jdbc.SybConnection.setTypeMap(SybConnection.java:2010)
at com.mchange.v2.c3p0.impl.NewPooledConnection.reset(NewPooledConnection.java:290)
at com.mchange.v2.c3p0.impl.NewPooledConnection.markClosedProxyConnection(NewPooledConnection.java:247)
at com.mchange.v2.c3p0.impl.NewProxyConnection.close(NewProxyConnection.java:1148)
at org.hibernate.connection.C3P0ConnectionProvider.closeConnection(C3P0ConnectionProvider.java:42)
at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:388)
at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:343)
at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:230)
at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:221)
at org.hibernate.impl.SessionImpl.afterOperation(SessionImpl.java:437)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:833)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:821)
My code seems to work though. My call to session.get(...) returns an object. Any ideas?
Regards,
Dag W.