db2ibm-mobilefirstworklight-server

Worklight Application server creation Build failed due to DB2 pagesize


I am creating Application server in Worklight 6.1 in server with WL db as DB2 which throws below error and fails with the build. The DB2 error mentioned is increase the pagesize of DB2 database. But how to increase the pagesize in DB2.

[configuredatabase]       [sql] SQL:  CREATE TABLE APP_ACTIVITY_REPORT (ID BIGINT NOT NULL, ACTIVITY CLOB(1M), ACTIVITY_TIMESTAMP TIMESTAMP, ADAPTER VARCHAR(254), DEVICE_ID VARCHAR(254), DEVICE_MODEL VARCHAR(254), DEVICE_OS VARCHAR(254), ENVIRONMENT VARCHAR(254), GADGET_NAME VARCHAR(254), GADGET_VERSION VARCHAR(254), IP_ADDRESS VARCHAR(254), PROC VARCHAR(254), SESSION_ID VARCHAR(254), SOURCE VARCHAR(254), USER_AGENT VARCHAR(254), LONGITUDE DOUBLE, LATITUDE DOUBLE, POS_USER_TIME TIMESTAMP(3), WIFI_APS VARCHAR(4000), WIFI_CONNECTED_SSID VARCHAR(32), WIFI_CONNECTED_MAC CHAR(20), WIFI_USER_TIME TIMESTAMP(3), APP_CONTEXT VARCHAR(4000), PRIMARY KEY (ID))
[configuredatabase] 

BUILD FAILED
[configuredatabase] C:\Users\ADMINI~1\AppData\Local\Temp\wla6314449573\configure.xml:1927: The following error occurred while executing this line:
[configuredatabase] C:\Users\ADMINI~1\AppData\Local\Temp\wla6314449573\configure.xml:3236: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-286, SQLSTATE=42727, SQLERRMC=16384;ADMIN, DRIVER=4.13.127

Solution

  • The instructions for creating the worklight database with the 32K pagesize are at this link . The Worklight version is higher but the Db2 details for creating the database are the same. To drop your existing database use (on Microsoft Windows) , terminate all Worklight applications and services, then Start > Run > db2cwadmin.bat > db2 drop database wladmin. You can then recreate the database with the 32K pagesize.

    If you don't want to drop your current database, you can also manually create a 32k pagesize bufferpool with the create bufferpool statement, and then manually create a 32k pagesize tablespace using the create tablespace statement and associating it with the 32k bufferpool. Refer to the online Db2 Knowledge Center for details of those statements. However, the best approach is to drop and recreate the database to avoid potential problems during upgrades of Worklight.