Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
I have just tried upgrading from Hibernate 3.0.5 to Hibernate 3.1, and ran into an issue with the Weblogic 8.1 MSQL driver. The specific problem relates to method Hibernate calls in order to retrieve primary keys generated by MSQL. In 3.0.5 Hibernate called Connection.prepareStatement(String, int) which is supported by the Weblogic MSQL driver. In Hibernate 3.1 this has changed to Connection.prepareStatement(String, String[]) which is not supported by the driver: an SQLException is thrown stating the method is not supported.
Anyone have a similar issue?
Hibernate version:
Hibernate 3.1
Weblogic version:
Weblogic 8.1 SP5
Mapping documents:
Not relevant.
Code between sessionFactory.openSession() and session.close():
not relevant.
Full stack trace of any exception that occurs:
Quote:
Caused by: java.sql.SQLException: [BEA][SQLServer JDBC Driver]Unsupported method: Connection.prepareStatement
at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
at weblogic.jdbc.base.BaseConnection.prepareStatement(Unknown Source)
at weblogic.jdbc.wrapper.JTSConnection_weblogic_jdbc_sqlserver_SQLServerConnection.prepareStatement(Unknown Source)
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:324)
at org.hibernate.util.GetGeneratedKeysHelper.prepareStatement(GetGeneratedKeysHelper.java:45)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:435)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:93)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1948)
Name and version of the database you are using:
MSQL Server 2000
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: