History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: UP-1977
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Eric Dalquist
Reporter: Eric Dalquist
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
uPortal

Empty Portlet Preferences fail on Oracle

Created: 21/Mar/08 03:41 PM   Updated: 18/Apr/08 10:55 AM
Component/s: Database
Affects Version/s: 3.0.0-RC2
Fix Version/s: 3.0.0-RC3

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
Trying to store a portlet preference with an empty name fails on Oracle as the column is marked not-null since Oracle treats "" as null.

     [java] Caused by: java.sql.BatchUpdateException: ORA-01400: cannot insert NULL into ("UPORTAL25"."UP_PORTLET_PREF"."NAME")
     [java] at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)
     [java] at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9119)
     [java] at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
     [java] at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
     [java] at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
     [java] ... 87 more

 All   Comments   Work Log   Change History      Sort Order:
Eric Dalquist [21/Mar/08 03:46 PM]
Resolved by adding user types for string text and string fields that quotes all strings being stored. This results in empty strings being quoted and so not stored as null.

NOTE. Developers working with uPortal 3.0 to this point will need to export their data before doing this update and then import it after doing the update or all portlet preference retrieval operations will fail.