-
Type:
Bug
-
Status: Closed
-
Resolution: Won't Fix
-
Affects Version/s: 6.2.10 EE GA1, 6.2.X EE
-
Fix Version/s: None
-
Labels:None
-
Fix Priority:3
-
Git Pull Request:
Description:
Liferay permits up to 4000 characters in a varchar2 field but Oracle 11g and 12c default to a 4000 byte limit. If multi-byte characters are used as input, an exception like the following can be encountered:
14:38:56,542 ERROR [http-bio-8443-exec-39][JDBCExceptionReporter:234] ORA-01461: can bind a LONG value only for insert into a LONG column 14:38:56,544 ERROR [http-bio-8443-exec-39][DefaultTransactionExecutor:93] Application exception overridden by commit exception org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [update User_ set uuid_=?, companyId=?, createDate=?, modifiedDate=?, defaultUser=?, contactId=?, password_=?, passwordEncrypted=?, passwordReset=?, passwordModifiedDate=?, digest=?, reminderQueryQuestion=?, reminderQueryAnswer=?, graceLoginCount=?, screenName=?, emailAddress=?, facebookId=?, ldapServerId=?, openId=?, portraitId=?, languageId=?, timeZoneId=?, greeting=?, comments=?, firstName=?, middleName=?, lastName=?, jobTitle=?, loginDate=?, loginIP=?, lastLoginDate=?, lastLoginIP=?, lastFailedLoginDate=?, failedLoginAttempts=?, lockout=?, lockoutDate=?, agreedToTermsOfUse=?, emailAddressVerified=?, status=? where userId=?]; SQL state [72000]; error code [1461]; Could not execute JDBC batch update; nested exception is org.hibernate.QueryTimeoutException: Could not execute JDBC batch update at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:645) at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:793)
Steps to Reproduce:
1. Configure Liferay Portal 6.2 EE to use Oracle Database.
2. Navigate to Control Panel > Server Admin > Script.
3. Create a user via the User menu with the screen name "omniadmin".
4. Run the attached Groovy Script which attempts to set user comments
Expected:
Since less than 4000 characters are used, the user's comments will be updated.
Actual:
User comments are not updated because Oracle is using a byte limit, not a character limit.
Additional Testing:
6.2.x: a7857fd6e0c7b232782d2f7e5e7265ff6354070b
Issue reproduced in branch.
Master: 8f319fe5b2a8d505f89b09ad6ec49e3eefed52f5
Cannot test in Master; Master is not compatible with Oracle.
- is duplicated by
-
LPS-69033 Post-Upgrade Fix for DXP to handle Multi-byte characters in Liferay with an Oracle DB
- Closed