Oracle 10g is picky about the ordering of parameters in insert statements, and wants all CLOBs/BLOBs to be at the end:
http://forums.oracle.com/forums/thread.jspa?threadID=415560
However, in the 5.1.2 upgrade, we're generating the SQL manually for the Calendar table upgrade, and the "recurrence" column isn't the last column. So when we run the 5.1.2 update on Oracle 10g, we get the following stack trace:
Caused by: java.sql.BatchUpdateException: ORA-24816: Expanded non LONG bind data supplied after actual LONG or LOB column
at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10768)
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
at com.liferay.portal.upgrade.util.BaseUpgradeTableImpl.repopulateTableRows(BaseUpgradeTableImpl.java:530)
at com.liferay.portal.upgrade.util.BaseUpgradeTableImpl.repopulateTable(BaseUpgradeTableImpl.java:507)
at com.liferay.portal.upgrade.util.BaseUpgradeTableImpl.updateTable(BaseUpgradeTableImpl.java:371)
at com.liferay.portal.upgrade.v5_1_2.UpgradeCalendar.doUpgrade(UpgradeCalendar.java:63)
at com.liferay.portal.upgrade.v5_1_2.UpgradeCalendar.upgrade(UpgradeCalendar.java:48)
... 32 more
When setColumns() is called in BaseUpgradeTableImpl, determine a parameter ordering that puts CLOBs at the end of the insert statement, and use this ordering when the table update script is executed.