1

I'm trying to deploy the worklight application center for iOS on a Websphere Liberty server on Windows 8.1. But I'm getting following exception in the server logs when I try to add the IBMAppCenter.ipa via the appcenter console.

Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. {prepstmnt 1563792952 INSERT INTO APPLICATION_STORAGE (CONTENT, AP_FK) VALUES (?, ?) [params=(InputStream) java.io.ByteArrayInputStream@5987916, (null) null]} [code=1118, state=42000]

Here is the scenario to reproduce my problem:

  1. install mysql 5.6.2 via the mysql community installer
  2. install Websphere Liberty application server v8.5.5
  3. install Worklight Server v6.2
  4. generate IBMAppCenter.ipa via XCode
  5. login to the appcenterconsole and try to add the application

I tried to enable compression for table APPLICATION_STORAGE as proposed by hjpotter92 on Change limit for "Mysql Row size too large" but without any luck. Any help would be much appreciated.

EDIT

Here is the definition of the APPLICATION_STORAGE table, which causes the problem:

CREATE TABLE APPLICATION_STORAGE (ID INTEGER NOT NULL AUTO_INCREMENT, CONTENT LONGBLOB, AP_FK INTEGER, PRIMARY KEY (ID)) ENGINE = innodb;
Community
  • 1
  • 1
Hans
  • 681
  • 1
  • 9
  • 22
  • 1
    possible duplicate of [Change limit for "Mysql Row size too large"](http://stackoverflow.com/questions/15585602/change-limit-for-mysql-row-size-too-large) – M Khalid Junaid Aug 11 '14 at 14:52
  • For android I can deploy the appcenter app with no problems. – Hans Aug 11 '14 at 14:53
  • @M Khalid Junaid The question is indeed similar, I also referenced the stackoverflow ticket in my question. But the context is different; Worklight is owner of the database scheme, I should not need to alter this when I install the worklight appcenter. By the way I tried the solution proposed but this didn't work. – Hans Aug 11 '14 at 15:00
  • Hans, just as an FYI - Worklight does not own MySQL nor does it install it for you. You install it and you need to configure it if its default settings do not fit your needs. – Idan Adar Aug 12 '14 at 03:27
  • LOL, I just assumed it would work as described on the knowledge center. My needs aren't that special, I just want to install the appcenter and get it working with a hello world app on iPad. If there is some kind of custom configuration necessary to get this really simple basic POC working, it should be indicated on the IBM knowledge center. I'll post the answer if I get it working, thanks for the effort. – Hans Aug 12 '14 at 07:27
  • http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.deploy.doc/admin/t_setting_up_your_my_sql_database_manually.html?lang=en – Idan Adar Aug 12 '14 at 10:37

1 Answers1

5

Increasing the innodb_log_file_size property to 256M resolved my issue. Apparently the redo-log overwrites the most recent checkpoint for large blobs, as explained here: http://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-20.html

Important Change: Redo log writes for large, externally stored BLOB fields could overwrite the most recent checkpoint. The 5.6.20 patch limits the size of redo log BLOB writes to 10% of the redo log file size. The 5.7.5 patch addresses the bug without imposing a limitation. For MySQL 5.5, the bug remains a known limitation.

As a result of the redo log BLOB write limit introduced for MySQL 5.6, innodb_log_file_size should be set to a value greater than 10 times the largest BLOB data size found in the rows of your tables plus the length of other variable length fields (VARCHAR, VARBINARY, and TEXT type fields). Failing to do so could result in “Row size too large” errors. No action is required if your innodb_log_file_size setting is already sufficiently large or your tables contain no BLOB data. (Bug #16963396, Bug #19030353, Bug #69477)

Community
  • 1
  • 1
Hans
  • 681
  • 1
  • 9
  • 22
  • Just for my notes: on OSX with XAMPP... just use MySql workbench to change the "options" file which will plug this line into the my.cnf. However, this did not help the issue. – Dan Rosenstark Nov 24 '14 at 16:51