Thursday, August 13, 2015

Avoid dataload failure in ibm wcs


Many time while doing dataload, It get fail at some time for key constrant. How we can avoid it:--


1. Open wc-loader-XXXXX.xml file
2. Search for - <_config:BusinessObjectMediator

3. Get the className, And exyend the class.

4. Override transform method as below. Same way you can get catentry details in catch part.





@Override
protected void transform(Object catalogEntryNoun, boolean deleteFlag)
throws DataLoadException {
// TODO Auto-generated method stub


try{
super.transform(catalogEntryNoun, deleteFlag);
}catch (Exception e) {
TableDataObject.findByPrimaryKey(getAttrID(), null);

System.out.println("Attribute exception"+catalogEntryNoun.toString());
// TODO: handle exception
}



5. Update your loader xml file classname with newly created class and rerun.


Now it will load all data without failure. Some conflich data will go in cath part.

No comments:

Post a Comment