Tuesday, October 16, 2018

How to Reset wcsadmin password

In case you have issues with wcsadmin password and you want to reset the password for wcsadmin, you can follow below steps

Connect to your WCS database:

Get SALT value for wcsadmin

select SALT from userreg where logonId  in ('wcsadmin');


If you do not have decrypted values of MerchantKey, Get Merchantkey for your WCS instance

Follow link : Retrieve Merchantkey 

Go to shell/cmd prompt and change your location to Commerce installation Directory

Example: /opt/IBM/WebSphere/CommerceServer70/bin

Run below command to generate HEX value of Password

wcs_password

Sample command:

./wcs_password.sh Passw0rd 5z9f9xdf5vlz 0123456789abcdef


Your output will be

IBM*

Licensed Materials - Property of IBM

5697-A16

(C) Copyrights by IBM and by other(s) 1978, 1997.  All Rights Reserved.

* Trademark of International Business Machines Corp.

=== Encrypted Password ===

ASCII Format: NCduuFlez5a0rxBfxY+Kef+kDsV1FEaJ3Opy6IzY8PI=
Hex Format: 4E43647575466C657A3561307278426678592B4B65662B6B447356314645614A334F707936497A593850493D

Get the HEX value of Password and update it in userreg table

update userreg set logonpassword ='4E43647575466C657A3561307278426678592B4B65662B6B447356314645614A334F707936497A593850493D' where logonId = 'wcsadmin';

commit;

In case you get, your account is disabled message, enable your user account by running:

update userreg set status =1 where logonId ='wcsadmin';

commit;

WebSphere commerce Retrieve MerchantKey


There are multiple ways to retrieve MerchantKey of WCS instance. Below is one of the easiest way to retrieve it.

In order to retrieve MerchatKey for WCS, you can create a test jsp. and put below content in the JSP:

<%@ page import="com.ibm.commerce.util.nc_crypt" %>
Encrypted Value of Merchant Key: <%=com.ibm.commerce.server.WcsApp.configProperties.getValue("Instance/MerchantKey")%>
Plain text (Decrpyted Value) Merchant Key: <%=nc_crypt.decrypt(com.ibm.commerce.server.WcsApp.configProperties.getValue("Instance/MerchantKey"), null)%>

Make sure that newly created JSP is directly accessible. 
If you do not want to create a new JSP, just embedd these 3 lines of code in any JSP which you can render on webpage.


Sunday, January 14, 2018

WebSphere Commerce 7 Enterprise Developer - FEP6 to FEP8 Upgrade

Below are the steps for Upgrading your Websphere Commerce Developer Enterprise Edition from Version 7 FEP6 to WCS 7 FEP8.

Step 1: Download WCS Fix pack 9 and Feature Pack 8

Fix Pack 9 can be downloaded from Fix central

https://www-945.ibm.com/support/fixcentral/ 

WebSphere Commerce Fix central


Download appropriate FIX pack

Websphere commerce Fix Pack 9



Feature Pack can be downloaded from IBM Software Access Catalog

Login with your IBM credentials (having partnerworld access) and download CN2BJML



Step 2: Upgrade your IBM installation Manager to latest version



In case it asks to update your IBM password for secure storage, please enter them


Once your IBM installation manger is updated, please update your WAS to latest version.

Step 3: Upgrade your WAS to version 7.0.0.0.43, From installation manger select the WAS version to be updated

Websphere commerce Update Fix Pack 9 and FEP8
Successful update for WAS



Step 4: Update Fix pack to 9 and Feature pack to 8. From Installation manger, point to the repository of Fix Pack 9 and FEP 8 and click on update.



Select all Features which you want to update in FEP 8.

Successful update will show:


Congratulations you have updated your WCS from FEP 6 to FEP 8

Step 5: Validate the udpate:

1. Through command
2. Through Database Query

Through Command

Ensure your RAD is not in  use
Open command prompt and change working directory to /bin e.g. W:/IBM/WCDE_ENT/bin
Run command checkEnablementStatus.bat

Checkenablementstatus

Verify enableFeature.log to check whether features are enabled or not. All enabled features show show that it is enabled in Database as well as EAR.

Sample: If management-feature Feature is enabled, log file will show:

CheckPrereqInDB:
[CheckFeaturePrerequisite] Feature foundation is enabled in EAR.
[CheckFeaturePrerequisite] Feature foundation is enabled in DB.

CheckFeature:
     [echo] ------------------------------------------------------
     [echo] Feature           - INSTALLED -        - DB -        - EAR -
     [echo] ------------------------------------------------------
     [echo] foundation        7.0.8.0        7.0.8.0        7.0.8.0
     [echo] ------------------------------------------------------
[forEachTask] featureName: management-center


Through SQL:

Open command prompt
Change working directory to /bin e.g. W:/IBM/WCDE_ENT/bin
If you are using derby database
Connect to database
                 ij.bat
                 connect '..\db\mall';
run query to get data from site table
                 select * from site;


Result of query: Ensure that below results are shown:

for COMPNAME BASE, fix pack should have a value of 9.


For all enabled features ensure that MOD values is 8



Congratulations!! , you have updated your WCS from FEP6 to FEP8.


Troubleshooting

Exceptions encountered during Upgrade:

Exception 1: Upgrade keeps failing complaining because of below error:

Install, com.ibm.ws.install.ni.ismp.actions.InstallNIFMaintenance, err, com.ibm.ws.install.ni.framework.NIFException: Invalid entry path: workspace/CommerceAccelerator/WebContent/WEB-INF/lib/Foundation-TagLib.jar/META-INF/wcf.tld

Resolution:

Copy Foundation-TagLib.jar file from Stores\WebContent\WEB-INF\lib and past it to 
CommerceAccelerator\WebContent\WEB-INF\lib

Exception 2: Upgrade keeps failing complaining because of below error:

Install, com.ibm.ws.install.ni.ismp.actions.InstallNIFMaintenance, err, Invalid entry path: starterstores/AddOnFeatures/MadisonsMobile.sar/StoreAssetsDir/mobile/ShoppingArea/CatalogSection/SearchSubsection/CatalogSearchResultOnlyDisplay.jspf

Resolution:

Exception states that under starterstores, some files are missing. Copy Starterstores folder from another installation of WCS FEP 6 to your folder