I've never seen this problem before, but it looks like Oracle doesn't like
the idea of calling

Connection.setTransactionIsolation()

after callong

Connection.setAutocommit(false)

This is not a problem for other platforms, but I will swap the order
anyway...

----- Original Message -----
From: "Laurent Vanzeune" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 9:14 PM
Subject: [Hibernate] HELP: Hibernate and Oracle


>
> Hi,
>
> Hibernate: 1.1.8
> Oracle: 9.0.1i
>
> I first tested my code against SQL Server then I also need tom make it
work
> under Oracle. When using oracle, and DBCP as connection provider (if set
to
> C3PO or driver manager it works fine), I received the following exception:
> [INFO] Environment - -Hibernate 1.1.6 (?? Release doc says 1.1.8 ??)
> [INFO] Environment - -loaded properties from resource hibernate.properties
> [INFO] Environment - -using java.io streams to persist binary types
> [INFO] Environment - -JVM proxy support: true
> [INFO] Dialect - -Using dialect: cirrus.hibernate.sql.OracleDialect
> [INFO] ConnectionProviderFactory - -Initializing connection provider:
> cirrus.hibernate.connection.DBCPConnectionProvider
> [INFO] DBCPConnectionProvider - -DBCP using driver:
> oracle.jdbc.driver.OracleDriver at URL:
> jdbc:oracle:thin:@localhost:1521:ORACLE
> [INFO] DBCPConnectionProvider - -Connection properties: {user=****,
> password=****}
> [INFO] DBCPConnectionProvider - -JDBC isolation level: READ_COMMITTED
> [INFO] SessionFactoryImpl - -JDBC result set fetch size: 25
> [INFO] SessionFactoryImpl - -Use outer join fetching: false
> [WARN] JDBCExceptionReporter - -SQL Error: 1453, SQLState: 72000
> [ERROR] JDBCExceptionReporter - -ORA-01453: SET TRANSACTION must be the
> first instruction of the transaction
>
> java.sql.SQLException: ORA-01453: SET TRANSACTION must be the first
> instruction of the transaction
>
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
> at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
> at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
> at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
> at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
> at
>
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047
> )
> at
>
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
> at
>
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
> :2709)
> at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:854)
> at
>
oracle.jdbc.driver.OracleConnection.setTransactionIsolation(OracleConnection
> .java:1634)
> at
>
org.apache.commons.dbcp.DelegatingConnection.setTransactionIsolation(Delegat
> ingConnection.java:240)
> at
>
org.apache.commons.dbcp.DelegatingConnection.setTransactionIsolation(Delegat
> ingConnection.java:240)
> at
>
cirrus.hibernate.connection.DBCPConnectionProvider.getConnection(DBCPConnect
> ionProvider.java:41)
> at
>
cirrus.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:149)
> at
>
cirrus.hibernate.impl.DatastoreImpl.buildSessionFactory(DatastoreImpl.java:3
> 23)
> at
>
cirrus.hibernate.impl.DatastoreImpl.buildSessionFactory(DatastoreImpl.java:3
> 14)
> at
>
com.source.frk.dao.persistence.hibernate.HibernateDAO.getSessionFactoryInsta
> nce(HibernateDAO.java:44)
> at
>
com.source.frk.dao.persistence.hibernate.HibernateDAO.openSession(HibernateD
> AO.java:113)
> at
>
com.source.task.elimination.dao.persistence.hibernate.FinancialInstitutionHi
>
bernateDAO.insertFinancialInstitutionData(FinancialInstitutionHibernateDAO.j
> ava:47)
> at
>
com.source.task.elimination.test.FinancialInstitutionTest.testCrud(Financial
> InstitutionTest.java:166)
> at java.lang.reflect.Method.invoke(Native Method)
> at junit.framework.TestCase.runTest(TestCase.java:166)
> at junit.framework.TestCase.runBare(TestCase.java:140)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:131)
> at junit.framework.TestSuite.runTest(TestSuite.java:173)
> at junit.framework.TestSuite.run(TestSuite.java:168)
> at junit.textui.TestRunner.doRun(TestRunner.java:74)
> at junit.textui.TestRunner.run(TestRunner.java:200)
> at
>
com.source.task.elimination.test.FinancialInstitutionTest.main(FinancialInst
> itutionTest.java:28)
> [WARN] SessionFactoryImpl - -Could not obtain connection metadata
> <java.sql.SQLException: ORA-01453: SET TRANSACTION must be the first
> instruction of the transaction
> >
> [INFO] SessionFactoryImpl - -Use scrollable result sets: true
> [INFO] SessionFactoryImpl - -Transaction strategy:
> cirrus.hibernate.transaction.JDBCTransactionFactory
> [INFO] SessionFactoryImpl - -echoing all SQL to stdout
> [WARN] SessionFactoryObjectFactory - -no JDNI name configured
> [INFO] SessionFactoryImpl - -Query language substitutions: {false=0,
no='N',
> yes='Y', true=1}
> [INFO] SessionFactoryImpl - -Query language imports: cirrus.hibernate.test
> [WARN] JDBCExceptionReporter - -SQL Error: 1453, SQLState: 72000
> [ERROR] JDBCExceptionReporter - -ORA-01453: SET TRANSACTION must be the
> first instruction of the transaction
>
> [WARN] JDBCExceptionReporter - -SQL Error: 1453, SQLState: 72000
> [ERROR] JDBCExceptionReporter - -ORA-01453: SET TRANSACTION must be the
> first instruction of the transaction
>
> F.[WARN] JDBCExceptionReporter - -SQL Error: 1453, SQLState: 72000
> [ERROR] JDBCExceptionReporter - -ORA-01453: SET TRANSACTION must be the
> first instruction of the transaction
>
> [WARN] JDBCExceptionReporter - -SQL Error: 1453, SQLState: 72000
> [ERROR] JDBCExceptionReporter - -ORA-01453: SET TRANSACTION must be the
> first instruction of the transaction
>
> Any idea ... thanks in advance!
>
> L.
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> hibernate-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to