Error due to missing table space in JCR database

When i was executing ConfigEngine.sh database-transfer to transfer data from derby to DB2 data based it was failing with this error


action-switch-database:
Sat May 16 20:17:54 EDT 2009

action-create-jcrls-tables:
Sat May 16 20:17:54 EDT 2009
[echo] Calling cmcfgdbu to create LS tables
[echo] In case of error, refer to /software/WebSphere/wp_profile/ConfigEngine/log/JCRDB61.log
[java] com.ibm.cm.dbutil.ICMDBUtilsException: Fail to create database
[java] 2009-05-16 20:18:01 cmcfgdbu: ERROR ->Fail to create database
[java] at com.ibm.cm.dbutil.ICMConfigureLSDB.createDB(ICMConfigureLSDB.java:337)
[java] at com.ibm.cm.dbutil.ICMConfigureLSDB.configureLSDB(ICMConfigureLSDB.java:1193)
[java] at com.ibm.cm.dbutil.ICMConfigureLSDB.start(ICMConfigureLSDB.java:1860)
[java] at com.ibm.cm.dbutil.cmcfgdbu.startSilentMode(cmcfgdbu.java:162)
[java] at com.ibm.cm.dbutil.cmcfgdbu.startConfig(cmcfgdbu.java:275)
[java] at com.ibm.cm.dbutil.cmcfgdbu.main(cmcfgdbu.java:291)

BUILD FAILED
/software/WebSphere/wp_profile/ConfigEngine/base_dynamic.xml:821: The following error occurred while executing this line:
/software/WebSphere/wp_profile/ConfigEngine/config/actions/db_cfg_mgr.xml:290: The following error occurred while executing this line:
/software/WebSphere/PortalServer/jcr/prereq.jcr/config/includes/jcr_cfg.xml:117: The following error occurred while executing this line:
/software/WebSphere/PortalServer/jcr/prereq.jcr/config/includes/jcr_cfg.xml:1005: The following error occurred while executing this line:
/software/WebSphere/PortalServer/jcr/prereq.jcr/config/includes/jcr_cfg.xml:1069: The following error occurred while executing this line:
/software/WebSphere/PortalServer/jcr/prereq.jcr/config/includes/jcr_cfg.xml:3924: Java returned: 202
Total time: 6 minutes 53 seconds
isIseries currently set to: null
uploading registry
CELL: spinfotech
Websphere:_Websphere_Config_Data_Type=Registry,_Websphere_Config_Data_Id=cells/spinfotech|registry.xml#Registry_1242441339497,_WEBSPHERE_CONFIG_SESSION=anonymous1242519482288


This is what the stack trace looked like like in the JCRDB61.log file.


2009-05-16 20:18:00 cmcfgls: TRACE -> - getDBOperations()
2009-05-16 20:18:00 cmcfgls: Creating Server database
2009-05-16 20:18:00 cmcfgls: TRACE -> + createDB()
2009-05-16 20:18:00 cmcfgls: Starting database creation
2009-05-16 20:18:00 cmcfgls: TRACE -> + connectToDB()
2009-05-16 20:18:00 cmcfgls: TRACE -> dbJDBCDriverType 4
2009-05-16 20:18:00 cmcfgls: TRACE -> conString jdbc:db2://dbserver.wpcertification.com:50000/JCRDB61
2009-05-16 20:18:00 cmcfgls: TRACE -> loading jdbc driver : com.ibm.db2.jcc.DB2Driver
2009-05-16 20:18:00 cmcfgls: TRACE -> Connecting jdbc:db2://dbserver.wpcertification.com:50000/JCRDB61
2009-05-16 20:18:01 cmcfgls: TRACE -> Connected jdbc:db2://dbserver.wpcertification.com:50000/JCRDB61
2009-05-16 20:18:01 cmcfgls: TRACE -> - connectToDB()
2009-05-16 20:18:01 cmcfgls: Creating DB2 Content Manager tables
2009-05-16 20:18:01 cmcfgls: TRACE -> + executeSQL()
2009-05-16 20:18:01 cmcfgls: TRACE -> source --> /software/WebSphere/wp_profile/PortalServer/jcr/config/icmplsct.ddl
2009-05-16 20:18:01 cmcfgls: DEBUG -> Executing:
CREATE TABLE jcr.ICMSTADMINDOMAINS ( DOMAINID INTEGER NOT NULL, PRIMARY KEY (DOMAINID) ) IN ICMSFQ04

2009-05-16 20:18:01 cmcfgls: ERROR ->Fail to execute:
CREATE TABLE jcr.ICMSTADMINDOMAINS ( DOMAINID INTEGER NOT NULL, PRIMARY KEY (DOMAINID) ) IN ICMSFQ04

com.ibm.cm.dbutil.ICMDBUtilsException: DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704, SQLERRMC: ICMSFQ04
at com.ibm.cm.dbutil.ICMDBUtilsCommon.executeSQL(ICMDBUtilsCommon.java:875)
at com.ibm.cm.dbutil.ICMDBUtilsCommon.executeSQL(ICMDBUtilsCommon.java:768)
at com.ibm.cm.dbutil.ICMConfigureLSDB.createDB(ICMConfigureLSDB.java:321)
at com.ibm.cm.dbutil.ICMConfigureLSDB.configureLSDB(ICMConfigureLSDB.java:1193)
at com.ibm.cm.dbutil.ICMConfigureLSDB.start(ICMConfigureLSDB.java:1860)
at com.ibm.cm.dbutil.cmcfgdbu.startSilentMode(cmcfgdbu.java:162)
at com.ibm.cm.dbutil.cmcfgdbu.startConfig(cmcfgdbu.java:275)
at com.ibm.cm.dbutil.cmcfgdbu.main(cmcfgdbu.java:291)
com.ibm.cm.dbutil.ICMDBUtilsException: DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704, SQLERRMC: ICMSFQ04
at com.ibm.cm.dbutil.ICMDBUtilsCommon.executeSQL(ICMDBUtilsCommon.java:903)
at com.ibm.cm.dbutil.ICMDBUtilsCommon.executeSQL(ICMDBUtilsCommon.java:768)
at com.ibm.cm.dbutil.ICMConfigureLSDB.createDB(ICMConfigureLSDB.java:321)
at com.ibm.cm.dbutil.ICMConfigureLSDB.configureLSDB(ICMConfigureLSDB.java:1193)
at com.ibm.cm.dbutil.ICMConfigureLSDB.start(ICMConfigureLSDB.java:1860)
at com.ibm.cm.dbutil.cmcfgdbu.startSilentMode(cmcfgdbu.java:162)
at com.ibm.cm.dbutil.cmcfgdbu.startConfig(cmcfgdbu.java:275)
at com.ibm.cm.dbutil.cmcfgdbu.main(cmcfgdbu.java:291)
com.ibm.cm.dbutil.ICMDBUtilsException: Fail to create database
at com.ibm.cm.dbutil.ICMConfigureLSDB.createDB(ICMConfigureLSDB.java:337)
at com.ibm.cm.dbutil.ICMConfigureLSDB.configureLSDB(ICMConfigureLSDB.java:1193)
at com.ibm.cm.dbutil.ICMConfigureLSDB.start(ICMConfigureLSDB.java:1860)
at com.ibm.cm.dbutil.cmcfgdbu.startSilentMode(cmcfgdbu.java:162)
at com.ibm.cm.dbutil.cmcfgdbu.startConfig(cmcfgdbu.java:275)
at com.ibm.cm.dbutil.cmcfgdbu.main(cmcfgdbu.java:291)


I did some googling and it seems that this problem is because i did not execute these configuration commands on my JCR database

db2 "CONNECT TO JCRDB61 USER jcr"
db2 "CREATE BUFFERPOOL ICMLSFREQBP4 SIZE 1000 PAGESIZE 4 K"
db2 "CREATE BUFFERPOOL ICMLSVOLATILEBP4 SIZE 8000 PAGESIZE 4 K"
db2 "CREATE BUFFERPOOL ICMLSMAINBP32 SIZE 8000 PAGESIZE 32 K"
db2 "CREATE BUFFERPOOL CMBMAIN4 SIZE 1000 PAGESIZE 4 K"
db2 "CREATE REGULAR TABLESPACE ICMLFQ32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('ICMLFQ32') BUFFERPOOL ICMLSMAINBP32"
db2 "CREATE REGULAR TABLESPACE ICMLNF32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('ICMLNF32') BUFFERPOOL ICMLSMAINBP32"
db2 "CREATE REGULAR TABLESPACE ICMVFQ04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('ICMVFQ04') BUFFERPOOL ICMLSVOLATILEBP4"
db2 "CREATE REGULAR TABLESPACE ICMSFQ04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('ICMSFQ04') BUFFERPOOL ICMLSFREQBP4"
db2 "CREATE REGULAR TABLESPACE CMBINV04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('CMBINV04') BUFFERPOOL CMBMAIN4"
db2 "CREATE SYSTEM TEMPORARY TABLESPACE ICMLSSYSTSPACE32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('icmlssystspace32') BUFFERPOOL ICMLSMAINBP32"
db2 "CREATE SYSTEM TEMPORARY TABLESPACE ICMLSSYSTSPACE4 PAGESIZE 4 K MANAGED BY SYSTEM USING ('icmlssystspace4') BUFFERPOOL ICMLSVOLATILEBP4"

db2 "DISCONNECT jcrdb"
db2 "TERMINATE"


These commands are explained in more details on Creating Remote database page.

After executing these set of commands i re-executed the database-transfer configuration command and that problem seems to be solved now. The DB transfer is still going on but i passed the step where it failed last time

No comments: