Troubleshooting: Publishing a store archive

Recovering from a failed partial store publish attempt

If you are publishing a store archive and it fails, for example, if you run out of disk space, the following error occurs when you attempt to republish the store archive:
Errors occurred when parsing the XML file: 
/tmp/WCS9005124119155111096/SARS/Stores.war/WEB-INF/stores/MadisonsCatalog/data/../store-catalog-assets.xml. 
The error returned was: A SQL exception was caught. The error was: ORA-00001: unique constraint (WCS.I0000897) violated
The data in the database might be in an undesired state. To resolve this issue, you must clean up all the database assets that are related to the store that you were publishing before you attempt to republish the store. You can either:
  • Recommended: Revert to a previous snapshot of your database before the store publish failed, if available, or,
  • Manually clean the entries:
    1. Note your store ID, storeent ID, and member ID for the organization that owns the store:
      
      select STOREENT_ID,MEMBER_ID from STOREENT where IDENTIFIER=STORE_IDENTIFIER
      
      For example:
      
      select STOREENT_ID,MEMBER_ID from STOREENT where IDENTIFIER='Aurora'
      
    2. Delete entries from the following starter store tables that are related to your store ID or member ID:
      Note: Some of the following tables might not appear in your system. They might be tables that are added in Feature Pack releases that are not installed. You can safely skip any tables that are not found.
      • STORE
      • STOREENT
      • ORGENTITY
      • MEMBER
      • TRADEPOSCN
      • CATGRPTPC
      • STORETPC
      • POLICY
      • CURLIST
      • CURCONVERT
      • DISPENREL
      • DISPCGPREL
      • CATALOG
      • STORECAT
      • SHPARRANGE
      • SHIPMODE
      • INVADJCODE
      • EMSPOT
      • DMEMSPOTDEF
      • COLLATERAL
      • ATCHTGT
      • PX_GROUP
      • PX_POLICY
      • SEOPAGEDEF
      • SEOTOKENUSGTYPE
      • SEOURL
      • SEOURLKEYWORD
    3. Delete entries from the following sample data tables that are related to your store ID or member ID:
      • DMACTIVITY
      • CATENTRY
      • CATGROUP
      • ATTR
      • BASEITEM
      • JURSTGROUP
You can now attempt to republish the store archive.

Store publish fails with a Malformed URL Exception

If you are publishing a store archive and a space exists in the WebSphere Commerce installation directory (WC_installdir), the following error occurs:

000000cc datareader    E   IOException:unknown protocol: c
000000cc datareader    E   java.net.MalformedURLException: unknown protocol: c
	at java.net.URL.<init>(URL.java:575)
	at java.net.URL.<init>(URL.java:465)
	at java.net.URL.<init>(URL.java:414)
	at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
	at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at com.ibm.commerce.foundation.dataload.datareader.XmlReader.parseInputXMLFile(XmlReader.java:111)
	at com.ibm.commerce.foundation.dataload.datareader.AbstractXmlReader.loadInputXMLFile(AbstractXmlReader.java:281)

This error is a known issue in JDK version 1.6. To resolve this issue, update your JDK version accordingly. For more information, see Oracle Bug ID: 6506304.

Feature Pack 5 or later

ExtendedSitesV2.sar results in errors on publish

Your installation might already contain data for extended sites. However, this data must be cleared before you publish new extended sites data.

If you encounter errors when you publish an extended sites environment in a new workspace using ExtendedSitesV2.sar, you must perform the following steps:
  1. Clear the database.
  2. Create a clean installation for your workspace.
  3. Reload the bootstrap data.
  4. Apply the feature pack components.
  5. Recommended: Increase the heap size to a value greater than 512 MB for WebSphere Commerce Developer.

Publishing customized WebSphere Commerce Version 6 store archives in WebSphere Commerce Version 7

If you are publishing a custom store archive from a version of WebSphere Commerce before version 7, and publish it to a new WebSphere Commerce Version 7 installation, the following failed status is observed:

Publish failed to publish the data assets.  An error occured while executing the task com.ibm.commerce.tools.devtools.publish.tasks.massload.MassLoaderTaskCmdImpl. Refer to the following message for details and suggested action: The Loader failed to load the data from the input file D:\WCDE0910\wasprofile\logs\WCS7218965358601138671\SARS\Stores.war\WEB-INF\stores\TestStore\data\store-data-assets.resolved.xml to the database. Ensure the data contained in the input file correctly matches the database schema.
The Loader failed to load the data from the input file D:\WCDE0910\wasprofile\logs\WCS7218965358601138671\SARS\Stores.war\WEB-INF\stores\TestStore\data\store-data-assets.resolved.xml to the database. Ensure the data contained in the input file correctly matches the database schema.

SQLException
A SQL Exception was received INSERT on table 'MBRROLE' caused a violation of foreign key constraint 'F_453' for key (-6).  The statement has been rolled back. on record [mbrrole: [MEMBER_ID=7000000000000000851][ROLE_ID=-6][ORGENTITY_ID=7000000000000000851][OPTCOUNTER=0]]. [sqlcode: 20,000, sqlstate: 23503] 
<mbrrole
  member_id="7000000000000000851"
  optcounter="0"
  orgentity_id="7000000000000000851"
  role_id="-6"
>

To resolve this issue, you must remove the Store Admin role (roleId=-6) from the modelorgrole.xml and storeorgrole.xml files from your SAR file.

If you experience problems while you are publishing a store archive:

  1. Review the following log files:
    • activity.log
    • trace.log
    • message.txt
    • trace.txt
    • For IBM i OS operating system RESWCSID.txt
    • SystemOut.log and SystemErr.log
    For more information about each log file, see Publish log files.
  2. To configure logging for the loading utilities, including increasing the logging level, see Configuring tracing and logging for the loading utilities.
  3. Enable the WC_DEVTOOLS trace log.
    1. If the problem occurred while you execute a particular task, configure tracing for the corresponding component. For example, if the contractimport or accountimport command fails, enable the corresponding component, WC_Contract.
  4. If an error occurs during the data load phase of publishing, the error displays on the Publish Details page of the Publish wizard. To view the Publish Details page for your store archive, see Viewing publish status.
WebSphere Commerce Enterprise

Republishing a contract or account

If a message in the activity.log or the Publish Details page reports a duplicate contract exception but publishing completed successfully:

  • Determine whether the contract is the same.
    • If the contract is the same, ignore the warning.
    • If the contract is different:
      1. Ensure that you changed the sequence number in the contracts.xml file to the next number in the sequence. The sequence number is a combination of the value for the majorVersionNumber and the minorVersionNumber. For example, if the majorVersionNumber="1", and the minorVersionNumber="0" change the value for the minor version number to 1. The resulting sequence number becomes 1.1. When you change the major version number and then republish the store archive, a new contract is created in the database. This new contract replaces the previous contract. If you do not change the major version number, a "contract exists" error is recorded in the logs when you republish the store archive. The contract information is not updated in the database.
      2. Import the contract. For more information, see Importing a contract.

If a message in the activity.log or the Publish Details page reports a duplicate account exception but publishing completed successfully, ignore this warning.

Publishing is successful but store does not display or does not function properly

If publish is stated to be successful, but you cannot launch the store, or the store is not functioning properly, check the activity.log file for errors.

SolarisLinuxAIXWindows

Transaction log for the database is full

If the message, Transaction log for the database is full displays in the message.txt log, you have the following options:

  • Create secondary transaction logs using the DB2 Control Center.
  • Increase the transaction log file size by completing the following steps:
    1. In a DB2 command window, type:
      db2 get db cfg for 
      databasename
      
    2. Look for the log file size (logfilsiz). After you find the log file size, type:
      db2 update db cfg for 
      databasename using 
      logfilsiz
      
      where logfilsiz is a larger number than the previous number.
    3. Restart DB2.

    OR

    1. In a DB2 command window, type:
      db2 update db cfg for 
      databasename using LOGPRIMARY 20
      
      where 20 is the number of primary logs (this number might be different for your site). Increasing the LOGPRIMARY increases your space requirement.
  • Disable summary tables. Summary tables are updated during publish, which could result in a database transaction log overflow and affect the publishing performance.
WebSphere Commerce Enterprise

Publishing a component store archive results in a duplicate store name in the Store Creation wizard

After you publish a component store archive (for example, B2BDirectHostedStorefrontAssetStore.sar, ConsumerDirectResellerStorefrontAssetStore.sar, or CatalogAssetStore.sar), you might notice duplicate store names that are displayed in the Store Creation wizard. To avoid this problem, issue the following SQL statement every time you finish publishing a component store archive:

update storeentds set displayname='
store_name'
where storeent_id=(select storeent_id from storeent where
identifier='
store_identifier')
and lang_id=-1

Where:

store_name
The name that you want to be displayed in the Store Creation wizard.
store_identifier
The value of the store identifier parameter that you provided during the publishing of the component store archive.

Removing a published store

Once you publish a store using WebSphere Commerce, store assets and database objects are saved within the WebSphere Commerce Server. If you want to remove the store, you must ensure that it is cleaned from the WebSphere Commerce system. You might want to remove a store if you encountered problems while publishing a store, or have a corrupted store. Once the store is cleaned form the WebSphere Commerce system, you can republish it.

To remove a published store that appears in WebSphere Commerce Accelerator, complete the following steps:

  1. Mark the store for deletion using the WebSphere Commerce Accelerator.
  2. Delete WebSphere Commerce objects from the database, by using the database cleanup utility:
    1. Delete store objects
    2. WebSphere Commerce Enterprise Delete contract objects
    3. Delete fulfillment center objects (a default fulfillment center is assigned to all stores, so fulfillment center objects must be removed before you can republish the store)
  3. Republish the store and test that it works
DB2AIXFeature Pack 8

Store publish fails due to small heap size

After installing the feature pack and enabling features, you attempt to publish a store, but the operation fails with an OutofMemory error that states that the heap size is too small. You might encounter an error similar to the following example:
[3/10/13 18:44:22:729 PDT] 00000103 DataImporter  E org.apache.solr.common.SolrException log Full Import 
failed:org.apache.solr.handler.dataimport.DataImportHandlerException: java.lang.OutOfMemoryError: Java heap space
	at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:669)
	at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:268)
	at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:187)
	at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:359)
	at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:427)
	at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:408)
Caused by: java.lang.OutOfMemoryError: Java heap space
	at oracle.jdbc.driver.PhysicalConnection.getByteBuffer(PhysicalConnection.java:6991)
	at oracle.jdbc.driver.OracleStatement.prepareAccessors(OracleStatement.java:895)

To resolve this issue, complete the following steps:

  1. Set the DB2 LOGFILSIZ to 2048.
    db2 update db cfg for databasename using logfilsiz 2048
    For more information about LOGFILSIZ settings, see Tuning the DB2 transaction log size
  2. Set your paging swap space to be at least 1 GB greater than the physical memory in your environment.
  3. Log on to the Administration Console.
  4. Click Server Types > WebSphere application servers.
  5. Select you server, for example server1.
  6. On the Configuration panel, in the Server infrastructure section, click Process definition.
  7. In the Additional Properties section, click Java Virtual Machine.
  8. Change the Maximum heap size to 1024M.
  9. Republish the store.