Atomikos Forum |
|
Can i use Oracle 9 driver with Atomikos 3.4? Test that i ran with sun jdk1.5, oracle 9 driver and oracle 10g database failed with HeurisitcExcpetion.
I might need to use Oracle 9 driver because with oracle 10 and 11 driver, the batch process (using Spring Batch) failed after inserting about 30,000 records at the commit interval of 100. There were few post online about this error to which one of the suggestions was to use oracle 9 driver........ The error was java.lang.AbstractMethodError: sun/util/calendar/AbstractCalendar.getFixedDate(Lsun/util/calendar/CalendarDate;)J at sun.util.calendar.ZoneInfo.getOffset(ZoneInfo.java:391) at oracle.jdbc.driver.DateCommonBinder.zoneOffset(OraclePreparedStatement.java:15494) at oracle.jdbc.driver.DateCommonBinder.setOracleCYMD(OraclePreparedStatement.java:15632) at oracle.jdbc.driver.TimestampBinder.bind(OraclePreparedStatement.java:15857) at oracle.jdbc.driver.OraclePreparedStatement.setupBindBuffers(OraclePreparedStatement.java:2911) at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:2190) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3334) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3423) Environment that this error occurred on: IBM JDK 5 Spring Batch 1.1.1.RELEASE Oracle 10g database Oracle 10 or 11 driver for JDK 5 Thank you.
This is an incompatibility between different oracle jars in your classpath. Quoting Sun's docs:
AbstractMethodError: "Thrown when an application tries to call an abstract method. Normally, this error is caught by the compiler; this error can only occur at run time if the definition of some class has incompatibly changed since the currently executing method was last compiled."
In that case, i think this error should have occurred for the first insert statement. However, the error occurred after 30,000 records got inserted and committed.
Will there be any compatibility issues if i use Oracle 9i driver with Atomikos? At present, with Oracle 9 driver i am getting com.atomikos.datasource.ResourceException: resume for XID 192.168.214.135.tm0000100054192.168.214.135.tm1 raised -3: the XA resource detected an internal error at com.atomikos.datasource.xa.XAResourceTransaction.resume(XAResourceTransaction.java:620) at com.atomikos.datasource.xa.session.BranchEnlistedStateHandler.<init>(BranchEnlistedStateHandler.java:32) at com.atomikos.datasource.xa.session.NotInBranchStateHandler.checkEnlistBeforeUse(NotInBranchStateHandler.java:32) at com.atomikos.datasource.xa.session.TransactionContext.checkEnlistBeforeUse(TransactionContext.java:60) at com.atomikos.datasource.xa.session.SessionHandleState.notifyBeforeUse(SessionHandleState.java:151) at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(AtomikosConnectionProxy.java:160) at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:100) at $Proxy6.createStatement(Unknown Source) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:390) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:522) at org.springframework.jdbc.core.simple.SimpleJdbcTemplate.update(SimpleJdbcTemplate.java:237) |