Tuesday, September 16, 2014

APAR information on WCS

versioninfo.sh file will provide you the feature pack fix pack information about your WCS installation. But how to get the APAR installed in a particular WCS installation? There are couple of ways you can check this

  • historyInfo.sh file will provide you all the installation/uninstall information about the fix pack feature pack and APARs
  • The file NIFStack.xml will contain the information about the apars installed. The location of the file is /instances//properties/version/update/backup/NIFStack.xml.
  • More information about the APAR installation will be there in /logs/update/APAR_name.install 
 

Monday, September 15, 2014

IHS Access Log for WebSphere Commerce sites

While doing the production server trouble shooting for many of the issues, the investigation starts from the IHS access logs. But the default IHS log configuration will not give you enough details for troubleshooting and diagnose the root cause server. It will be more complicated when there is a cache layer exists as well. The following log level will give you all the information needed for trouble shooting. The log will provide the output in a csv format so that it will be easier for further processing if needed

LogFormat  "\"%h\",\"%{%Y-%m-%d-%H.%M.%S.000000}t\",%p,\"%H\",\"%m\",\"%U\",\"%q\",%>s,\"%b\",\"%{WAS}e\",%D,\"%{CACHED_RESPONSE}o\"" common

h - Client IP
t - Access Time
p - Port
H - Protocol
m - Request method
U - URL without query String
q - Query String
>s - Status of the request
b - size of response in bytes
{WAS}e - Name of the WAS server
D - Time taken to serve request in micro seconds
{CACHED_RESPONSE}o - The request served from dyna cashe or not

If we want to shoe the request and response cookie values then we could use the following parameter for a short period of time

{Cookie}i - Cookie request header
{Set-Cookie}o - Cookie with response

Reference : http://www.ibm.com/developerworks/library/co-websphere-access-feature/
http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#formats

Monday, June 16, 2014

Facebook integration in WCS 7.0

The following step by step instructions will help some one to integrate facebook with WCS Aurora store
  • Open Store Management Tool from Management Center
  • Select the store in which you want to enable face book and open the store via double clicking
  • Select Configuration tab
  • Check the check box named "Facebook Integration" and save
  • The next step is to register the site to face book. If you don't have a facebook developer a/c please register as a developer first
  • Then "Create Application" button in the Facebook developer page and provide the details(You can create 'N' number of applications for each environments like testing,uat prod etc)
  • It will create the AppID. Add the generated to the WCS Database via providing the sql insert into storeconf(STOREENT_ID,NAME,VALUE) values (10001,'wc.facebook.application_id', 'fb_app_id_returned');
  • In the settings session on the Apps session of the Facebook developer page, select the Settings. Then press the "Add Platform" button and select type of application as website
  • The system ask you to enter the url enter http://localhost/webapp/wcs/stores/servlet/en/aurora as the url and press Save changes
  • Restart the server
  • Now when you are going to the storefront you will see the "Connect to Facebook" link the header session
  • You can see the statistics in the Dashboard page of Facebook developer
Reference : http://www-01.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.aurora-starterstore.doc/concepts/csmsocfbint_aurora.htm?lang=en

Wednesday, February 6, 2013

Making An Attribute As NonFacetable in WCS

In Pr-Feature pack 5 of V7 to making an attribute as non facetable you need to do the following steps.
  • UPDATE ATTR SET searchable=0 WHERE attr_id =?(ideally this is the only step the business user makes via management center. But this change will not make the attribute as non facetable)
  • DELETE FROM ATTRDICTSRCHCONF WHERE ATTR_ID = ?(The mapping between attribute and search schema)
  •  DELETE FROM SRCHATTRPROP WHERE SRCHATTR_ID in (SELECT  SRCHATTR_ID FROM SRCHATTR WHERE IDENTIFIER LIKE ?(Table defining the search index attribute like facet, rank, sort etc..)
  •  DELETE FROM SRCHATTR WHERE IDENTIFIER = ? 
If you are using Feature pack 5 of V7 along with the above you need to do the following steps as well
  • UPDATE ATTR SET facetable=0 WHERE attr_id=?
  • DELETE FROM SRCHATTR WHERE SRCHATTR_ID IN (SELECT SRCHATTR_ID FROM FACET WHERE ATTR_ID =? )
  • DELETE FROM FACET WHERE ATTR_ID = ?

Thursday, January 10, 2013

Enable SQL logging in websphere commerce

Follow the steps to enable SQL logging in WCS
  • Log in to WAS Administrative console
  • Select Troubleshooting->logs and trace->server1->change log details levels
  • Expand element com.ibm.ejs.persistences.* & enable all Messages and traces for com.ibm.ejs.persistence.EJSDBCFinder and com.ibm.ejs.persistence.EJSJDBCPersister

Tuesday, October 9, 2012

Enabling the PC Keyboard in Android Emulator

By default the PC Keyboard is not enabled in Android Emulator and it is a pain to use the emulator keyboard. To enable the PC keyboard in emulator you can do the following steps
  • Go to the directory /.android/avd/.avd/ in my case it was C:\Documents and Settings\db2inst1\.android\avd\JellyBean.avd
  • Open the file config.ini
  • Add an entry in the file hw.keyboard=yes
  • Save the file and restart the emulator. Now the PC key board is enabled

Changing hosts file in Google Android Emulator

Now a days lots of our developers are coming with the same question as how do they change the host file in android. So I thougt that it is worth sharing the steps
  • Start Android Virtual Device(AVD) from AVD manager via checking on the check boxes "Launch from Snapshot" &"Save to Snapshot on". Otherwsie the changes you will make via following the process will be ignored and it will take the default host file entries.
  • Run Android\android-sdk-windows\platform-tools\adb remount to make the image as writable
  • Run Android\android-sdk-windows\platform-tools\adb pull /system/etc/hosts c:\android to copy the hosts file to the machine
  • After making changes to the hosts file put it back to android via running Android\android-sdk-windows\platform-tools\adb push c:\android\hosts /system/etc
  • Note that 127.0.0.1 ip will be pointing to the emulator device and 10.0.2.2 will point to the computer where emulator is installed