Saturday, April 30, 2011

Punchout with Commerce systems

Punchout is a common paradigm called for sharing catalog and transfer cart at run time between different systems procurement and e-commerce systems.

Different 3rd party systems popular for PunchOut
e.g. Ariba Supplier Network, Oracle Fulfillment, SMAPS

There are 2 ways to communicate, I have used point to point and using Ariba supplier network.

cXML is used for communication. (Commerce eXtensible Markup Language) is a protocol intended for communication of business documents between e-commerce and procurement applications. It is really easy to understand and use.

Punch out on Ariba: You need to configure in the admin tool
administration->configuration->electronic order routing
catalogs->create punchout Only

Integrating WCS with various Punchout system is very interesting. Will do a another blog on the details.

Friday, April 29, 2011

Create custom Registry for Performance\Store configuration

Creating registry is a great alternate solution for things you can not cache using dynacache. Another purpose would be to store configuration data for store. If you use registry, you don't need a server restart and org admin console provides a nice interface to refresh registry. You can load the registry on server start and connect a table to the registry and if you need to add stuff dynamically, you would need a registry refresh from admin console.

Add the Registry entry into wc-server.xml

name="CustomConfigRegistry" regClassName="com.vendor.registry.CustomConfigRegistry"/>

public class CustomConfigRegistry implements Registry {
private static final String CLASSNAME = "CustomConfigRegistry";
private static CustomConfigRegistry singleton = new CustomConfigRegistry();
private Timestamp lastRefreshTimeStamp = null;
private final int INITIAL_CACHE_SIZE = 20000;

private Hashtable configCache = null;

public CustomConfigRegistry () {}

public void initialize() throws Exception {
singleton = this;
configCache = new Hashtable(INIT_CACHE_SIZE);

public static CustomConfigRegistry getInstance() {
return singleton;

public boolean enabled() {
return (singleton != null && configCache != null);

public void refresh() throws Exception {
if (getCacheSize() > 0) {
System.out.println(" [CustomConfigRegistry] cache size = " + getCacheSize());
configCache = new Hashtable(INIT_CACHE_SIZE);
lastRefreshTimeStamp = new Timestamp(System.currentTimeMillis());

public int getCacheSize() {
if (enabled()) {
return configCache.size();
} else {
return -1;

public void performLogic(){

Login to Admin Console->Registry->check the CustomConfigRegistry registry and update.
Directly refresh

Sunday, April 17, 2011

Toolkit eclipse crash | recovery

Command-line arguments: -plugincustomization C:\RAD601\eclipse\default\plugin_customization.ini -showlocation

!ENTRY org.eclipse.osgi Apr 17, 2011 21:50:00.278
!MESSAGE An error occured while automatically activating bundle
org.eclipse.core.resources (262).
org.osgi.framework.BundleException: Exception in org.eclipse.core.internal.compatibility.PluginActivator.start() of bundle org.eclipse.core.resources.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator
( at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start
( at org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLocalClass

If you experience the above problem, it is because of either your windows got restarted without closing the eclipse properly or if you are using ant and there is a resource blocked by another program or sometimes just random.


1. Deleting those two files in workspace metadata folder

2. Once you delete those files and stat toolkit, you will see all the projects would disappear from workspace. Delete wasprofile directory under and
Run setup.bat from TOOLKIT_HOME\bin

3. Make sure your DB is pointed to right DB. Start server and publish.

4. Get all the latest files from SVN\CVS if you have a build script just run that.

Friday, April 1, 2011

Contract Locking Issue | Delete corrupt entries from CMMETADATA

    Run the following SQL statement:

    select * from cmmetadata where member_id = 4666666666666660075

    delete these records.from the results of the above statement. managingLock Entry
    [5/27/10 14:18:14:925 PDT] 00000035 WC_CONTRACT > lockIfNoExistingLock Entry
    [5/27/10 14:18:14:925 PDT] 00000035 WC_CONTRACT 3 lockIfNoExistingLock Lock is found for contractId=3555555555555568075 TCType=1349592408, [action = U | memberId = 4666666666666660075 | workspace = null | taskgroup = null | task = null | locking policy =]
    [5/27/10 14:18:14:925 PDT] 00000035 WC_CONTRACT < lockIfNoExistingLock Exit
    [5/27/10 14:18:14:925 PDT] 00000035 WC_CONTRACT > renewLockIfUserIsLockOwner Entry
    [5/27/10 14:18:14:925 PDT] 00000035 WC_CONTRACT 3 renewLockIfUserIsLockOwner Lock owner is different from the requestor ID for contractId=3555555555555568075 TCType=1349592408
    [5/27/10 14:18:14:925 PDT] 00000035 WC_CONTRACT < renewLockIfUserIsLockOwner Exit
    [5/27/10 14:18:14:925 PDT] 00000035 WC_CONTRACT > checkLockOwnerLastLogonTime Entry