I'm having trouble getting Hibernate to work with the emulated datasource and connections provided by Oracle 9iAS v9.0.3. I've got a data-source.xml that contains this within the <data-sources> tag:
Code:
<data-source
name="SQLServerDB"
class="com.evermind.sql.DriverManagerDataSource"
location="jdbc/core/3PC-DS"
xa-location="jdbc/xa/3PC-DS"
ejb-location="jdbc/3PC-DS"
connection-driver="com.inet.tds.TdsDriver"
username="XXXXX"
password="XXXXX"
url="jdbc:inetdae7:3pc-db1?database=3pc"
>
<description>Datasource used by 3pc</description>
</data-source>
Which works fine for querying the database. However, when I try to do something that does a 'save' of an object I always get an AbstractMethodError like so:
Code:
java.lang.AbstractMethodError: com.evermind.sql.OrionCMTConnection.prepareStatement(Ljava/lang/String;I)Ljava/sql/PreparedStatement;
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 net.sf.hibernate.util.GetGeneratedKeysHelper.prepareStatement(GetGeneratedKeysHelper.java:39)
at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:246)
at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:61)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:525)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:432)
at net.sf.hibernate.impl.ScheduledIdentityInsertion.execute(ScheduledIdentityInsertion.java:29)
at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:932)
at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:857)
at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:775)
I'd really like to get Hibernate working with the Oracle 9iAS data sources so that we can ask our users to create just one virtual server datasource and all our EARs/WARs simply look that up rather than having to edit some file within the classpath to point it to the right DB.
Has anyone managed to get this configuration working?[/code]