Issue Details (XML | Word | Printable)

Key: LEP-7331
Type: Bug Bug
Status: Reopened Reopened
Priority: Minor Minor
Assignee: SE Support
Reporter: Minhchau Dang
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Old Liferay Portal (Use Liferay Portal Standard Edition)

5.1.2 upgrade fails in Oracle 10g due to parameter ordering in the Insert statement in Calendar upgrade

Created: 02/Sep/08 04:58 PM   Updated: 02/Oct/08 03:23 PM
Component/s: None
Affects Version/s: 5.1.1
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide
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

 All   Comments   Work Log   Change History   FishEye      Sort Order: Ascending order - Click to sort in descending order
Minhchau Dang added a comment - 02/Sep/08 05:26 PM - Visible to
Revision 19938:

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.

Minhchau Dang added a comment - 18/Sep/08 04:09 PM
It turns out that while the error went away, the columns weren't being properly re-ordered. Committing a proper fix.