Technote

(troubleshooting)
New promotions are not saved after migrating
Problem(Abstract)
You migrate to WebSphere Commerce version 5.6, or higher, from WebSphere Commerce 5.5 or lower. After migrating, you attempt to create a new promotion and see the following errors in the SystemOut.log

[9/28/05 17:27:46:014 EDT] 3020625e WebGroup I SRVE0180I:
[CommerceAccelerator] [/webapp/wcs/tools] [Servlet.LOG]:
/tools/epromotion/RLProdPromoBXGY.jsp: init
[9/28/05 17:27:57:592 EDT] 3072225e CommerceSrvr E
com.ibm.commerce.marketing.promotion.integration.dependency.EproUtil
getStoreId CMN0411E: The following Finder Exception occurred during
processing: "javax.ejb.ObjectNotFoundException".
[9/28/05 17:27:57:655 EDT] 3072225e CommerceSrvr E
com.ibm.commerce.marketing.promotion.integration.dependency.EproUtil
getStoreId CMN0411E: The following Finder Exception occurred during
processing: "javax.ejb.ObjectNotFoundException".
[9/28/05 17:27:57:671 EDT] 3072225e CommerceSrvr E
com.ibm.commerce.marketing.promotion.integration.dependency.EproUtil
getStoreId CMN0411E: The following Finder Exception occurred during
processing: "javax.ejb.ObjectNotFoundException".
[9/28/05 17:27:57:811 EDT] 3072225e CommerceSrvr E
com.ibm.commerce.tools.epromotion.commands.CreateRLPromotionCmdImpl
createPXPromotionBean() CMN0409E: The following error occurred during
processing:
com.ibm.commerce.marketing.promotion.persistence.PersistenceCreateException:


COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0407N
Assignment of a NULL value to a NOT NULL column "TBSPACEID=2, TABLEID=502,
COLNO=9" is not allowed. SQLSTATE=23502

[9/28/05 17:27:57:827 EDT] 3072225e CommerceSrvr E
com.ibm.commerce.tools.epromotion.commands.CreateRLPromotionCmdImpl
performExecute CMN0409E: The following error occurred during processing:
com.ibm.commerce.exception.ECSystemException.
[9/28/05 17:27:58:577 EDT] 3072225e CommerceSrvr E
com.ibm.commerce.tools.epromotion.commands.RLPromotionSaveControllerCmdImpl
redirect rlPromotionNotSaved
Cause The promotion engine is new starting in WebSphere Commerce 5.6, so any older version of WebSphere Commerce would not have the database entries to support this new promotion engine. When migrating an existing store, these tables are not populated with the default setup information required to create a promotion. Resolving the problem Load the store with the default promotion data required to create a new promotion using the following steps.

  1. Copy the following files into your file system:



    The example commands below assume that you copied the files to g:\

  2. Update the promotions.xml to reflect the database name that you are using for your WebSphere Commerce instance. Replace the default database name of mall with your database name:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE mall SYSTEM "promotions.dtd">
    <mall>

    <!-- Create 3 groups of promotions this store will support -->
    <px_group
    px_group_id="@px_group_id_1"

    ...
    ...

    </mall>

  3. Find and replace the 'place holder' variables in the promotions.xml with values relevant for your specific store.

    @storeent_id_1
    This is the store ID of the store for which you cannot create a promotion.

    ou=&ORGENTITYNAME;,&ORGANIZATION_DN;
    This is the distinguished name (DN). It should be exactly the DN of the orgentity that the Store belongs to. You can find this using the following SQL statement, where storeent_id is your store ID:
    select dn from orgentity, storeent where storeent_id=storeent_id and orgentity_id=storeent.member_id

    &STORE_IDENTIFIER;
    This is the exact value of the identifier column of the STOREENT table for your store ID. You can find this using the following SQL statement, where storeent_id is your store ID:
    select identifier from storeent where storeent_id=storeent_id;

  4. ID Resolve your promotions.xml file using the idresgen utility:
    http://publib.boulder.ibm.com/infocenter/wc56help/index.jsp?topic=/com.ibm.commerce.data.doc/refs/rmlidres.htm

    For example:
    idresgen -dbname mall -dbuser wcsadmin -dbpwd password -infile g:\promotions.xml -outfile g:\promotions_idgen.xml

  5. Load the ID generated XML file using the massload utility:
    http://publib.boulder.ibm.com/infocenter/wc56help/index.jsp?topic=/com.ibm.commerce.data.doc/refs/rmlload.htm

    For example:
    massload -dbname mall -dbuser wcsadmin -dbpwd password -infile g:\promotions_idgen.xml


At each step, review the trace.txt and messages.txt files for any errors.
Cross Reference information
Segment Product Component Platform Version Edition
Commerce WebSphere Commerce Professional Edition Migration AIX, i5/OS, Linux, Solaris, Windows 5.6, 5.6.1, 5.6.1.1, 5.6.1.2, 5.6.1.3, 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4, 5.6.1.4
Commerce WebSphere Commerce Business Edition Migration AIX, i5/OS, Linux, Solaris, Windows 5.6, 5.6.1, 5.6.1.1, 5.6.1.2, 5.6.1.3, 5.6.1.4 Business Edition
Commerce WebSphere Commerce - Express Migration i5/OS, Linux, Windows 5.6, 5.6.1, 5.6.1.1, 5.6.1.2, 5.6.1.3, 5.6.1.4, 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4 Express
Commerce WebSphere Commerce Developer Enterprise Migration Windows 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4 Enterprise
Commerce WebSphere Commerce Developer Business Edition Migration Windows 5.6, 5.6.1, 5.6.1.1, 5.6.1.2, 5.6.1.3, 5.6.1.4 Developer Business Edition
Commerce WebSphere Commerce Developer Professional Edition Migration Windows 5.6, 5.6.1, 5.6.1.1, 5.6.1.2, 5.6.1.3, 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4 Developer Professional Edition
Commerce WebSphere Commerce Developer Express Migration Windows 5.6, 5.6.1, 5.6.1.1, 5.6.1.2, 5.6.1.3, 5.6.1.4, 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4 Developer Express
   

Document Information

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