WebSphere Commerce 7 | Queries | Enable/Disable Site Administrators

Here are few queries related to enabling/disabling Site Administrators in WebSphere Commerce,

-- Query to check Site Admins
select u1.users_id, status, plcyacct_id, logonid, u2.REGISTERTYPE, u2.dn, u2.REGISTRATION from userreg u1, users u2 where u1.users_id = u2.users_id and u2.REGISTERTYPE not in ('R', 'G');

-- Disable all Site Admins
update userreg set status = 0 where logonid in (select logonid from userreg u1, users u2 where u1.users_id = u2.users_id and u2.REGISTERTYPE not in ('R', 'G'));

-- Enable all Site Admins
update userreg set status = 1 where logonid in (select logonid from userreg u1, users u2 where u1.users_id = u2.users_id and u2.REGISTERTYPE not in ('R', 'G'));

-- Disable Site Admin
update userreg set status = 0 where logonid = 'siteadmin'

-- Enable Site Admin
update userreg set status = 1 where logonid = 'siteadmin'

WebSphere Commerce 7 | Setting up New Stores | Queries for setting new LANGUAGE & CURRENCY

If you wanted to setup a new store which supports the LANGUAGE and CURRENCY,  which is not supported by Out of Box WebSphere Commerce then you need to setup this new LANGUAGE and CURRENCY.

Here are tables associated with LANGUAGE,
 - LANGUAGE
 - LANGPAIR
 - LANGUAGEDS
 

Here are tables associated with CURRENCY,
 - SETCURR
 - SETCURRDSC
 - CURFORMAT
 - CURFMTDESC


For example, if you wanted to setup new language_id "en_UK" and currency as "EUR", here are the queries,
 

-- Setting new languages
insert into LANGUAGE values (-24, 'en_UK', 'en', 'UK', null, 'UTF-8', 'iso-8859-1', null);

insert into LANGPAIR(storeent_id, language_id, language_id_alt, sequence) values (-1, -24, -1, 100.0);

insert into LANGUAGEDS(language_id, description, language_id_desc) values (-24, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-23, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-22, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-21, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-20, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-10, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-9, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-8, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-7, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-6, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-5, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-4, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-3, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-2, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-1, 'United Kingdom English', -24);

-- Setting new currencies

insert into SETCURR (setccurr, setccode, setcexp) values ('EUR', 604, -2);
insert into SETCURRDSC (setccurr, language_id, description) values ('EUR', -1, 'Euro');
insert into SETCURRDSC (setccurr, language_id, description) values ('EUR', -24, 'Euro');
insert into CURFORMAT (storeent_id, setccurr, roundingmultiple,numbrusg_id, roundingmethod, decimalplaces, minapproveamount) values (-1,'EUR', 1, -1,'R', 2, NULL);
insert into CURFMTDESC (storeent_id, NUMBRUSG_ID, setccurr, language_id, currencysymbol, customizedcurrstr, currencyprefixpos, currencysuffixpos, displaylocale, currencyprefixneg, currencysuffixneg, radixpoint, groupingchar, numberpattern, description) values
(-1, -1, 'EUR', -1, '€', null, '€ ', null, null, '-€ ', null, null, null, '#,##0.00', 'Euro');
insert into CURFMTDESC (storeent_id, NUMBRUSG_ID, setccurr, language_id, currencysymbol, customizedcurrstr, currencyprefixpos, currencysuffixpos, displaylocale, currencyprefixneg, currencysuffixneg, radixpoint, groupingchar, numberpattern, description) values
(-1, -1, 'EUR', -5, '€', null, '€ ', null, null, '-€ ', null, null, null, '#,##0.00', 'Euro');
insert into CURFMTDESC (storeent_id, NUMBRUSG_ID, setccurr, language_id, currencysymbol, customizedcurrstr, currencyprefixpos, currencysuffixpos, displaylocale, currencyprefixneg, currencysuffixneg, radixpoint, groupingchar, numberpattern, description) values
(-1, -1, 'EUR', -24, '€', null, '€ ', null, null, '-€ ', null, null, null, '#,##0.00', 'Euro');
commit;


-- Store related entries
insert into storelang values (-24, 10001, NULL, 1)
insert into storelang values (-24, 10051, NULL, 1)
insert into storelang values (-24, 10101, NULL, 1)

insert into storeentds values (-24, 10001, 'Extended Sites Hub', NULL, 'Extended Sites Hub', NULL, 1);
insert into storeentds values (-24, 10051, 'CAS_AS', NULL, 'Catalog Asset Store', NULL, 1);
insert into storeentds values (-24, 10101, 'DefaultStorefrontAssetStore', NULL, 'DefaultStorefrontAssetStore Storefront Asset Store entity', NULL, 1);


-- Catalog related entries
insert into catalogdsc values (10001, -24, 'CAT_AS', NULL, 'Catalog Asset Store', NULL, NULL, 1); 

WebSphere Commerce 7 | Server failed to Publish | Pointing to Workspace outside RAD | Still points to Old Datbase

We tried to point the Workspace which is outside of RAD and copied the updated wc-server.xml from RAD to the Workspace outside of RAD.

In the updated wc-server.xml has MYNEWDATABASE. But, while starting the server, if failed as it is still trying to point to MYOLDDATABASE. When we have validated wc-server.xml, it has updated MYNEWDATABASE Details itself.

Here is the error log,

[7/7/16 18:26:44:912 IST] 00000011 SystemErr     R com.ibm.commerce.wc.appmanagement.exception.WCAppManagementException: com.ibm.websphere.ce.cm.StaleConnectionException: [jcc][t4][2057][11264][4.19.26] The application server rejected establishment of the connection.
An attempt was made to access a database, MYOLDDATABASE, which was either not found or does not support transactions. ERRORCODE=-4499, SQLSTATE=08004DSRA0010E: SQL State = 08004, Error Code = -4,499
[7/7/16 18:26:44:912 IST] 00000011 SystemErr     R     at com.ibm.commerce.wc.version.ECDatabaseVersionInfo.readSiteTable(ECDatabaseVersionInfo.java:140)
[7/7/16 18:26:44:912 IST] 00000011 SystemErr     R     at com.ibm.commerce.wc.version.ECDatabaseVersionInfo.<init>(ECDatabaseVersionInfo.java:84)
[7/7/16 18:26:44:912 IST] 00000011 SystemErr     R     at com.ibm.commerce.server.ProductInfo.getECDatabaseVersionInfo(ProductInfo.java:58)
[7/7/16 18:26:44:912 IST] 00000011 SystemErr     R     at com.ibm.commerce.server.ProductInfo.getECDBVersionInfo(ProductInfo.java:96)
[7/7/16 18:26:44:912 IST] 00000011 SystemErr     R     at com.ibm.commerce.server.ProductInfo.getProductVersion(ProductInfo.java:75)
[7/7/16 18:26:44:912 IST] 00000011 SystemErr     R     at com.ibm.commerce.server.WcsApp.configInit(WcsApp.java:736)
[7/7/16 18:26:44:912 IST] 00000011 SystemErr     R     at com.ibm.commerce.server.WcsApp.initialize(WcsApp.java:465)
[7/7/16 18:26:44:912 IST] 00000011 SystemErr     R     at com.ibm.commerce.server.WebApp.init(WebApp.java:396)
[7/7/16 18:26:44:912 IST] 00000011 SystemErr     R     at com.ibm.commerce.struts.InitActionServlet.init(InitActionServlet.java:64)
[7/7/16 18:26:44:912 IST] 00000011 SystemErr     R     at javax.servlet.GenericServlet.init(GenericServlet.java:241)
...........
...........
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:585)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:461)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.rmi.iiop.ORB.process(ORB.java:533)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.CORBA.iiop.ORB.process(ORB.java:1574)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2956)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2823)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:65)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1656)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R Caused by: com.ibm.websphere.ce.cm.StaleConnectionException: [jcc][t4][2057][11264][4.19.26] The application server rejected establishment of the connection.
An attempt was made to access a database, MYOLDDATABASE, which was either not found or does not support transactions. ERRORCODE=-4499, SQLSTATE=08004DSRA0010E: SQL State = 08004, Error Code = -4,499
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:44)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at java.lang.reflect.Constructor.newInstance(Constructor.java:516)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapExceptionHelper(GenericDataStoreHelper.java:615)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapException(GenericDataStoreHelper.java:677)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.ws.rsadapter.AdapterUtil.mapException(AdapterUtil.java:2112)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:2475)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:1639)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:2082)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1759)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2631)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1064)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:701)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:668)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:635)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     at com.ibm.commerce.wc.version.ECDatabaseVersionInfo.readSiteTable(ECDatabaseVersionInfo.java:132)
[7/7/16 18:26:44:928 IST] 00000011 SystemErr     R     ... 103 more
[7/7/16 18:26:45:755 IST] 00000011 JDBCPersister W   CNTR0031W: Error starting CMP bean WC#Enablement-RelationshipManagementData.jar#AlternativeLanguage:
 com.ibm.ejs.persistence.EJSPersistenceException: ; nested exception is:
    com.ibm.websphere.ce.cm.StaleConnectionException: [jcc][t4][2057][11264][4.19.26] The application server rejected establishment of the connection.
An attempt was made to access a database, MYOLDDATABASE, which was either not found or does not support transactions. ERRORCODE=-4499, SQLSTATE=08004DSRA0010E: SQL State = 08004, Error Code = -4,499

    at com.ibm.ejs.persistence.EJSJDBCPersister.initialize(EJSJDBCPersister.java:392)
    at com.ibm.ejs.persistence.EJSJDBCPersister.create(EJSJDBCPersister.java:220)
    at com.ibm.ws.cpi.JDBCPersisterFactoryImpl.create(JDBCPersisterFactoryImpl.java:119)
    at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.createCMP11Persister(EJBMDOrchestrator.java:1241)
    at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.finishBMDInit(EJBMDOrchestrator.java:1544)
    at com.ibm.ws.runtime.component.EJBContainerImpl.finishDeferredBeanMetaData(EJBContainerImpl.java:5066)
    at com.ibm.ws.runtime.component.EJBContainerImpl.initializeDeferredEJB(EJBContainerImpl.java:4875)
    at com.ibm.ejs.container.HomeOfHomes$1.run(HomeOfHomes.java:408)
    at com.ibm.ejs.container.HomeOfHomes$1.run(HomeOfHomes.java:406)
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
    at com.ibm.ejs.container.HomeOfHomes.getHome(HomeOfHomes.java:405)
    at com.ibm.ejs.container.HomeOfHomes.internalCreateWrapper(HomeOfHomes.java:1003)
    at com.ibm.ejs.container.EJSContainer.createWrapper(EJSContainer.java:5024)
    at com.ibm.ejs.container.WrapperManager.faultOnKey(WrapperManager.java:545)
    at com.ibm.ejs.util.cache.Cache.findAndFault(Cache.java:498)
    at com.ibm.ejs.container.WrapperManager.keyToObject(WrapperManager.java:489)
................
................

   
While debugging the issue, we have noticed the following file has MYOLDDATABASE details. After updating resources.xml, clean publish, it started working fine,   
WC/META-INF/ibmconfig/cells/defaultCell/applications/defaultApp/deployments/defaultApp/resources.xml

WebSphere Commerce 7 | Management Center | Failed to load the Catentries on select of Category in the Left navigation tree

After migrating new stores, few configurations didn't loaded properly. And, on click on Category in the left navigation tree of the Catalog Management of the Management Center, it is throwing the following exception,

[7/5/16 14:09:05:685 IST] 00000057 CommerceSrvr  E com.ibm.commerce.productset.commands.util.TPCUtil myFindZeroLevelTPCByCatalogIdAndStoreId CMN0411E: The following finder exception has occurred during processing: "javax.ejb.ObjectNotFoundException: catalogGroupId=". javax.ejb.ObjectNotFoundException: catalogGroupId=
    at com.ibm.ejs.container.EJSHome.activateBean_Common(EJSHome.java:2097)
    at com.ibm.ejs.container.EJSHome.activateBean(EJSHome.java:1890)
    at com.ibm.commerce.catalog.objects.EJSJDBCPersisterCMPCatalogGroupTradingPositionRelBean_3868bf7b.findByPrimaryKey(EJSJDBCPersisterCMPCatalogGroupTradingPositionRelBean_3868bf7b.java:468)
    at com.ibm.commerce.catalog.objects.EJSCMPCatalogGroupTradingPositionRelHomeBean_3868bf7b.findByPrimaryKey(EJSCMPCatalogGroupTradingPositionRelHomeBean_3868bf7b.java:132)
    at com.ibm.commerce.catalog.objects.EJSRemoteCMPCatalogGroupTradingPositionRelHome_3868bf7b.findByPrimaryKey(EJSRemoteCMPCatalogGroupTradingPositionRelHome_3868bf7b.java:123)
    at com.ibm.commerce.catalog.objects._CatalogGroupTradingPositionRelHome_Stub.findByPrimaryKey(_CatalogGroupTradingPositionRelHome_Stub.java:415)
    at com.ibm.commerce.catalog.objects.CatalogGroupTradingPositionRelAccessBean.instantiateEJB(CatalogGroupTradingPositionRelAccessBean.java:246)
    at com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean._instantiate(AbstractEntityAccessBean.java:174)
    at com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean.refreshCopyHelper(AbstractEntityAccessBean.java:309)
    at com.ibm.commerce.catalog.objects.CatalogGroupTradingPositionRelAccessBean.refreshCopyHelper(CatalogGroupTradingPositionRelAccessBean.java:320)
    at com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean.__getCache(AbstractEntityAccessBean.java:101)
    at com.ibm.commerce.catalog.objects.CatalogGroupTradingPositionRelAccessBean.getTradingPositionIdInEJBType(CatalogGroupTradingPositionRelAccessBean.java:398)
    at com.ibm.commerce.productset.commands.util.TPCUtil.myFindZeroLevelTPCByCatalogIdAndStoreId(TPCUtil.java:444)
    at com.ibm.commerce.productset.commands.util.TPCUtil.access$9(TPCUtil.java:425)
    at com.ibm.commerce.productset.commands.util.TPCUtil$MyFindZeroLevelTPCByCatalogIdAndStoreId.generateCacheableData(TPCUtil.java:211)
    at com.ibm.commerce.datatype.AbstractFinderResult.invokeFinder(AbstractFinderResult.java:622)
    at com.ibm.commerce.datatype.CacheableFinderResult.invokeFinder(CacheableFinderResult.java:195)
    ...........
    ...........
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:600)
    at com.ibm.commerce.foundation.internal.client.taglib.config.GetDataConfig$DataTypeConfig.invokeClientFacadeMethod(GetDataConfig.java:899)
    at com.ibm.commerce.foundation.internal.client.taglib.GetDataHandler.execute(GetDataHandler.java:744)
    at com.ibm.commerce.foundation.internal.client.taglib.GetDataTag.doTag(GetDataTag.java:388)
    at com.ibm._jsp._GetCatalogEntryOfferPrice._jspService(_GetCatalogEntryOfferPrice.java:147)
    at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    ..........
    ..........


After that, I have noticed somehow CATEGORY and TRADEPOSCN relationship was missing in the Database.

Here is the query to insert the CATEGORY and TRADEPOSCN relationship

insert into catgrptpc values(
    (select catalog_id from catalog where identifier='Aurora CAS'),
    0,
    (select tradeposcn_id from tradeposcn where name='Aurora ProductsPriceList'),
    (select storeent_id from storeent where identifier='aurora'),
    0
); 


After the insert, it started working fine.

WebSphere Commerce 7 | Management Center | Failed to change the Store from top right dropdown

After publishing new stores, I did some configuration changes. Later, when I tried change the store in the Management Center in the top right dropdown, it is throwing the following exception,

[7/1/16 19:52:28:176 IST] 0000005f EJBMDOrchestr A   CNTR0098I: Container-managed pre-find persistent store synchronization disabled for bean: "WC#Enablement-RelationshipManagementData.jar#CurrencyDescription".
[7/1/16 19:52:28:506 IST] 0000005f CommerceSrvr  E com.ibm.commerce.datatype.AbstractFinderResult invokeFinder CMN0409E: The following error occurred during processing: "An invalid XML character (Unicode: 0x1a) was found in the element content: ". java.lang.RuntimeException: An invalid XML character (Unicode: 0x1a) was found in the element content:
    at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl$Escape.convert(XMLSaveImpl.java:2945)
    at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.getDatatypeValue(XMLSaveImpl.java:2754)
    at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveDataTypeSingle(XMLSaveImpl.java:1531)
    at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1118)
    at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XMLSaveImpl.java:2458)
    at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSaveImpl.java:1032)
    at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSaveImpl.java:918)
    at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany(XMLSaveImpl.java:2178)
    at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1386)
    at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XMLSaveImpl.java:2458)
    at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeTopObject(XMLSaveImpl.java:617)
    at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.traverse(XMLSaveImpl.java:549)
    at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:233)
    at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:203)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:993)
    at com.ibm.commerce.foundation.common.util.sdo.SDOHelper.convertObjectToEmfXmlByteArray(SDOHelper.java:1076)
    at com.ibm.commerce.infrastructure.facade.server.commands.cache.OnlineStoreCache$FetchNounUsingDataServiceFacade.generateCacheableData(OnlineStoreCache.java:318)
    at com.ibm.commerce.datatype.AbstractFinderResult.invokeFinder(AbstractFinderResult.java:622)
    at com.ibm.commerce.datatype.CacheableFinderResult.invokeFinder(CacheableFinderResult.java:195)
    at com.ibm.commerce.dynacache.commands.AbstractFinderResultCache.myInvokeFinder(AbstractFinderResultCache.java:1506)
    at com.ibm.commerce.dynacache.commands.AbstractFinderResultCache.invokeFinder(AbstractFinderResultCache.java:1154)
    at com.ibm.commerce.dynacache.commands.AbstractDistributedMapCache$Cache.getOrPut(AbstractDistributedMapCache.java:522)
    at com.ibm.commerce.dynacache.commands.AbstractDistributedMapCache$Cache.access$3(AbstractDistributedMapCache.java:509)
    at com.ibm.commerce.dynacache.commands.AbstractDistributedMapCache.getOrPut(AbstractDistributedMapCache.java:285)
    at com.ibm.commerce.infrastructure.facade.server.commands.cache.OnlineStoreCache.fetchOnlineStore(OnlineStoreCache.java:493)
    at com.ibm.commerce.infrastructure.facade.server.commands.cache.OnlineStoreCache.getOnlineStore(OnlineStoreCache.java:529)
    at com.ibm.commerce.infrastructure.facade.server.commands.FetchOnlineStoreCmdImpl.performExecute(FetchOnlineStoreCmdImpl.java:123)
    at com.ibm.commerce.foundation.internal.server.command.impl.CommandTarget.executeCommand(CommandTarget.java:66)
    at com.ibm.websphere.command.TargetableCommandImpl.execute(TargetableCommandImpl.java:139)
    at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:138)
    at com.ibm.commerce.foundation.server.command.bod.AbstractGetBusinessObjectDocumentCmdImpl.performExpression(AbstractGetBusinessObjectDocumentCmdImpl.java:309)
    at com.ibm.commerce.foundation.server.command.bod.AbstractGetBusinessObjectDocumentCmdImpl.performExecute(AbstractGetBusinessObjectDocumentCmdImpl.java:158)

   

When I tried to debug the issue, I have noticed STOREENTDS.DESCRIPTION table has some Junk Characters. After resetting them, It started working fine.

Here are few list of tables that needs to be validated, if you are facing the same kind of issue,
 - STOREENTDS
 - STORECONF
 - STADDRESS

WebSphere Commerce 7 | List of Interview topics at a glance

Here is my long time pending task :)

From couple of months, I was trying of drafting the list of topics which are useful for cracking the WebSphere Commerce interviews.

Downloadable version,  WebSphere Commerce 7 Topics

Feel free to add the missing topics in the comments sections so that, I will updated the same to the document.

WebSphere Commerce 7 | Payment Instructions are Failing | NullPointerException on "createPaymentInstruction"

In my toolkit, few of the data got corrupted and when I try to test the payment pages, it is throwing the following exception,

[4/18/16 9:53:41:332 GMT] 0000006b RemoteExcepti E   CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "createPaymentInstruction" on bean "BeanId(WC_live#Payments-Plugin-Controller.jar#PluginController, null)". Exception data: java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:877)
        at com.ibm.commerce.payments.plugincontroller.PluginController.getPlugin(PluginController.java:2908)
        at com.ibm.commerce.payments.plugincontroller.PluginController.createPaymentInstruction(PluginController.java:986)
        at com.ibm.commerce.payments.plugincontroller.beans.EJSRemoteStatelessPluginController_c947b422.createPaymentInstruction(EJSRemoteStatelessPluginController_c947b422.java:399)
        at com.ibm.commerce.payments.plugincontroller.beans._PluginController_Stub.createPaymentInstruction(_PluginController_Stub.java:2511)
        at com.ibm.commerce.payment.actions.commands.EditPaymentInstructionPolicyCmdImpl.createPaymentInstruction(EditPaymentInstructionPolicyCmdImpl.java:633)
        at com.ibm.commerce.payment.actions.commands.EditPaymentInstructionPolicyCmdImpl.performExecute(EditPaymentInstructionPolicyCmdImpl.java:244)
        at com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:157)
        at com.ibm.ws.cache.command.CommandCache.executeCommand(CommandCache.java:332)
        at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:166)
        at com.ibm.commerce.command.MeasuredCacheableCommandImpl.execute(MeasuredCacheableCommandImpl.java:63)
        at com.ibm.commerce.command.AbstractECTargetableCommand.execute(AbstractECTargetableCommand.java:199)
        at com.ibm.commerce.edp.commands.EditCmdImpl.setupAndCreatePaymentInstruction(EditCmdImpl.java:2516)
        at com.ibm.commerce.edp.commands.EditCmdImpl.addPaymentInstruction(EditCmdImpl.java:1039)
        at com.ibm.commerce.edp.commands.EditCmdImpl.processNewPIOperation(EditCmdImpl.java:1726)
        at com.ibm.commerce.edp.commands.EditCmdImpl.processIndividualPIEditOperation(EditCmdImpl.java:1706)
        at com.ibm.commerce.edp.commands.EditCmdImpl.processFG(EditCmdImpl.java:783)
        at com.ibm.commerce.edp.commands.EditCmdImpl.performExecute(EditCmdImpl.java:438)
        at com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:157)
        at com.ibm.ws.cache.command.CommandCache.executeCommand(CommandCache.java:332)
...............
...............
Caused by: com.ibm.commerce.exception.ECApplicationException: The payment system encounters an error when updating the payment instructions of order 131,006. GenericSystemError
        at com.ibm.commerce.edp.commands.PIAddCmdImpl.addPI(PIAddCmdImpl.java:502)
        at com.ibm.commerce.edp.commands.PIAddCmdImpl.performExecute(PIAddCmdImpl.java:360)
        at com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:157)
        at com.ibm.ws.cache.command.CommandCache.executeCommand(CommandCache.java:332)
        at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:166)
        at com.ibm.commerce.command.MeasuredCacheableCommandImpl.execute(MeasuredCacheableCommandImpl.java:63)
        at com.ibm.commerce.command.AbstractECTargetableCommand.execute(AbstractECTargetableCommand.java:199)
        at com.ibm.commerce.foundation.server.command.soi.MessageMappingCmdImpl.invokeCommand(MessageMappingCmdImpl.java:229)



Issue might have happened because your MERCHCONFINFO Tables doesn't have proper entries. Try to correct entries between MERCHCONF and MERCHCONFINFO Tables and it should work fine   

WebSphere Commerce 7 | Upgraded WCS 7.0.0.6 to WCS 7.0.0.7 | Fix Pack 7 | Payment Pages are Failing | CWXFR0020E, CWXFD3134E

I have upgraded my toolkit from WCS 7.0.0.6 to WCS 7.0.0.7 (Applied Fix Pack 7 - Database is DB2) and after that, payment pages are failing with the following exception,

[5/9/16 23:32:42:137 CLT] 00000024 bod   E   CWXFD3134E: Execution of get request failed. CWXFR0020E: Could not get a database connection for component com.ibm.commerce.wallet
com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException: CWXFD3134E: Execution of get request failed. CWXFR0020E: Could not get a database connection for component com.ibm.commerce.wallet
at com.ibm.commerce.foundation.server.command.bod.bom.AbstractFetchNounUsingBusinessObjectMediatorCmdImpl.performExecute(AbstractFetchNounUsingBusinessObjectMediatorCmdImpl.java:255)
at com.ibm.commerce.foundation.internal.server.command.impl.CommandTarget.executeCommand(CommandTarget.java:66)
at com.ibm.websphere.command.TargetableCommandImpl.execute(TargetableCommandImpl.java:139)


While doing the debug of the issue, I have noticed it is not pointing to my actual DB2 Database. Instead, it is pointing to Cloudscape Database.

Here is the issue,
1. Features has been enabled with FEP5 with Cloudscape
2. On top of it, setdbtype command has been run with DB2
3. Because of this, DB2 related libraries are not available in WC Project and instead, it has Cloudscape related libraries.

Resolution:
Copy all the JAR files from (DB2),
WCDE_installdir\components\foundation\wc.ear.ext\db2 to WCDE_installdir\workspace\WC

WebSphere Commerce 7 | IBM HTTP Server | Steps for setting up IBM HTTP Server

Here are the steps for installing IBM HTTP Server and configuring with WebSphere Commerce,
 
  • Move all your static content (Like Images/CSS/JS etc) from Stores project and move it to a StaticWeb Project so that, it will easy to maintain the static assets separately rather than in Stores Project. Later, you can easily move these static contents from this project to your Web Server.
  • Install IBM HTTP Server with the steps mentioned in following document,
  • Update the following tags in C:\WebSphere\IHS\conf\httpd.conf to point out to StaticWeb Project, 
       <VirtualHost *:80>
       <VirtualHost *:443>
       <VirtualHost *:8006>


       Here is the snippet,
       <VirtualHost *:80>
        ServerName *
        Alias  /wcsstore  "W:\IBM\WCDE_ENT70\workspace\StaticWeb\WebContent"
        Alias  /wcs  "W:\IBM\WCDE_ENT70\workspace\CommerceAccelarator\WebContent"

        Alias  /css  "W:\IBM\WCDE_ENT70\workspace\StaticWeb\WebContent\css"
        Alias  /js  "W:\IBM\WCDE_ENT70\workspace\StaticWeb\WebContent\js"
        Alias  /icons  "W:\IBM\WCDE_ENT70\workspace\StaticWeb\WebContent\icons"
        Alias  /images  "W:\IBM\WCDE_ENT70\workspace\StaticWeb\WebContent\images"
        Alias  /contentspots  "W:\IBM\WCDE_ENT70\workspace\StaticWeb\WebContent\contentspots"

        # Example:  Turn on the rewrite engine.
        RewriteEngine On
    </VirtualHost>

    <VirtualHost *:443>
        SSLEnable
        SSLClientAuth 0
        ServerName *
        Alias  /wcsstore  "W:\IBM\WCDE_ENT70\workspace\StaticWeb\WebContent"
        Alias  /wcs  "W:\IBM\WCDE_ENT70\workspace\CommerceAccelarator\WebContent"

        Alias  /css  "W:\IBM\WCDE_ENT70\workspace\StaticWeb\WebContent\css"
        Alias  /js  "W:\IBM\WCDE_ENT70\workspace\StaticWeb\WebContent\js"
        Alias  /icons  "W:\IBM\WCDE_ENT70\workspace\StaticWeb\WebContent\icons"
        Alias  /images  "W:\IBM\WCDE_ENT70\workspace\StaticWeb\WebContent\images"
        Alias  /contentspots  "W:\IBM\WCDE_ENT70\workspace\StaticWeb\WebContent\contentspots"
    </VirtualHost>

    <VirtualHost *:8006>
        SSLEnable
        SSLClientAuth 0
        ServerName *
        Alias /wcsstore "W:\IBM\WCDE_ENT70\workspace\Stores\WebContent"
        Alias /wcs "W:\IBM\WCDE_ENT70\workspace\Stores\WebContent"
    </VirtualHost>

  • Make sure that no other application is using Port 80. You might face the following issue and here is the resolution for the same,
        http://yashodtechtalk.blogspot.in/2016/05/wcs-ibm-http-server-failed-to-start.html
  • Restart the HTTP Server
  • After doing these changes, the static content will be served from HTTP Server rather than WebSphere Application Server

WebSphere Commerce 7 | IBM HTTP Server | Failed to Start | make_sock: could not bind to address 0.0.0.0:80

I tried to setup IBM HTTP Server V7.0 by following the document,
http://www.ibm.com/developerworks/library/co-config-httpserver-was/

After the setup, when I tried to start the server, here is the error message
(OS 10048)Only one usage of each socket address (protocol/network address/port)
is normally permitted.  : make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Note the errors or messages above, and press the <ESC> key to exit.  16...

Tried multiple things to check whether any other application is running on Port 80. But I didn't noticed any application is running on Port 80.

Later noticed the issue and here it is,
In C:\WebSphere\IHS\conf\httpd.conf file, the following line got duplicated
Listen 0.0.0.0:80

After commented the duplicate line, It is working fine as expected

My Writings........

Salesforce | Administration | Email-to-Case | Create Cases using Email-to-Case

Email to Case Setup ·        Click on Email-to-Case ·         Enable the following flags, ·        Provide the Routing Addres...