Technote

(troubleshooting)
StagingCopy fails with java.lang.NullPointerException in the console
Problem(Abstract)
You run the StagingCopy utility. The utility fails, but you do not see errors in the StagingCopy log. You see a java.lang.NullPointerException in the console where you ran the script.
Symptom
When stagingcopy fails, there are no errors in the stagingcopy log.

The last entry in the log may be similar to this :

TimeStamp: 2007-08-23 15:20:44.047
Thread ID: <Thread-0>
Class: MerchantCopy
Method: copyMerchantTables
Severity: 4
Message Text: CMN4547S: The Stage Copy utility copied table "profnvstrg" successfully.

However looking in the console where the script was called from, an exception similar to the following can be found:

java.lang.NullPointerException
at java.lang.Throwable.<init>(Throwable.java:180)
at java.lang.Exception.<init>(Exception.java:29)
at java.lang.NullPointerException.<init>(NullPointerException.java:32)
at com.ibm.commerce.stagingcopy.getRecordInfo(Copy.java:503)
at com.ibm.commerce.stagingcopy.copyOneTable(Copy.java:146)
at com.ibm.commerce.merchantCopy.copyMerchantTables(MerchantCopy.java:761)
at com.ibm.commerce.stagingcopy.stageCopy(StagingCopy.java:1347)
at com.ibm.commerce.stagingcopy.main(StagingCopy.java:666)

Cause From the StagingCopy log you see the last table processed was profnvstrg (in the above example).
* The list of tables to be processed is listed in order within the following tables:

Site data: STGSITETAB
Merchant data: STGMERTAB
Mixed site and merchant: STGMRSTTAB

The ID's across the three tables are shared. Looking across the three tables, the table following PROFNVSTG is SCHCONFIG. Therefore the tool has failed copying the SCHCONFIG table.

There are two known issues when copying the SCHCONFIG table,

1. The table references the MEMBER table, so needs to handle the case where scheduled jobs are owned by a user other than -1000 (as stagingcopy does not copy user data).

2. A NullPointerException occurs when the StagingCopy tries to handle the SCHCONFIG error. Resolving the problem The problem (APAR IZ01938) is resolved in Fix Pack 3 (5.6.1.3) or newer for 5.6.1 and Fix Pack 4 (6.0.0.4) or newer for 6.0. You can obtain the Fix Packs or newer ones from the WebSphere Commerce Fixes by version page.
Cross Reference information
Segment Product Component Platform Version Edition
Commerce WebSphere Commerce Enterprise Utilities/Tools AIX, Linux, Solaris, Windows 6.0
Commerce WebSphere Commerce Business Edition Utilities/Tools AIX, Linux, Solaris, Windows 5.6.1
Commerce WebSphere Commerce Developer Enterprise Utilities/Tools Windows 6.0
Commerce WebSphere Commerce Developer Business Edition Utilities/Tools Windows 5.6.1
Commerce WebSphere Commerce Developer Professional Edition Utilities/Tools Windows 5.6.1, 6.0
Commerce WebSphere Commerce Developer Express Utilities/Tools Windows 5.6.1, 6.0
   

Document Information

Current web document: http://www.ibm.com/support/docview.wss?uid=swg21269823