Tuesday, 3 December 2013

How to reset Admin Id password

  • Login to Org Admin (https://rigmvs111:8002/webapp/wcs/admin/servlet/ToolsLogon?XMLFile=adminconsole.AdminConsoleLogon)
  • Access Management -> Find Users
  • Populate the Login ID
  • From the dropdown - Select Ignore Case, containing  - Click on Find
  • Update the details accordingly and save.

Thursday, 14 November 2013

Steps to have IBM Installation Manager Updated with the latest Version.
 
  • Run Installation Manager.
  • Verify that updates are enabled. Open File > Preferences... > Updates and select Search for Installation Manager update.
  • Verify that service repositories are searched. Open File > Preferences... > Repositories and select Search service repositories during installation and updates.
  • On the start page of the Installation Manager, click Update.

Wednesday, 6 November 2013


Enable / Disable in LOBTools\WebContent\WEB-INF\src\lzx\commerce\shell\ConfigProperties.lzx

More details given below... 

<!---
            A flag that determines whether users should have read-only access while working on approved content.
            Set this value to "true" to prevent business users from making changes while working on approved content.

-->
        <attribute name="readOnlyOnApprovedContent" type="boolean" value="false" />
 

<!---
            The maximum number of stores to be displayed in the store selection dropdown,
            and the maximum number of store URLs to be displayed in the store preview dialog.
 -->
        <attribute name="maximumStoresInList" type="number" value="10"/>
       

Tuesday, 5 November 2013


Overview of Tealeaf

Teafleaf records what customers view on the store pages and its interaction with the store pages.

Enabling of the Tealeaf configuration can be done using the Management Center - Store Management ->Analytics

RealiTea Viewer (RTV) and Browser Based Replay (BBR) can be used to replay the recordings.

Sunday, 3 November 2013


To Refresh Resource Bundles in Websphere Commerce Without Server Re-Start

Given below is the code snippet which will allow you to change your property files and refresh them automatically without restarting your application server. 

  • Create a  JSP 'refreshBundles.jsp' and copy the below code snippet.
  • Upon doing the changes in the properties file, build the project(ctrl-b)
  • Use the URL below to invoke the JSP - 
    • http://<domain name>/webapp/wcs/stores/servlet/refreshBundles.jsp 

JSP - refreshBundles.jsp
--------------------------------------  
<%@ page import="java.util.*, java.lang.reflect.*"%>
<%--
  To refresh property files hit the following URL
  E:\IBM\WCD\workspace\Stores\WebContent\refreshBundles.jsp
 
  e.g. http://localhost/webapp/wcs/stores/servlet/refreshBundles.jsp
--%>
<%
Class klass = Class.forName("java.util.PropertyResourceBundle").getSuperclass();
Field field = klass.getDeclaredField("cache");
field.setAccessible(true);
WeakHashMap cache = (WeakHashMap)field.get(null);
cache.clear();
field.setAccessible(false);
%>
<body bgcolor="#aabbff">

<table height="500" align="center">

    <tr><td valign="middle">
        <table align="center" cellpadding="10" cellspacing="1" bgcolor="#ffffff">
            <tr><th bgcolor="#bbccff">
                Resource Bundles have been RESET!<br/>
                <%=new java.util.Date()%><br/>
                Go check now!!!
            </th></tr>
        </table>
    </td></tr>
</table>
</body>
--------------------------------------

Wednesday, 9 October 2013


To Enable SEO URL Mapping


In wc-server.xml - Update the enable="true"

<component
            compClassName="com.ibm.commerce.datatype.UrlMapperConfig"
            enable="true" name="UrlMapperConfig">
            <property UrlMapperFile="mapper/SEOUrlMapper.xml" display="false"/>
 </component>

Tuesday, 1 October 2013


Issue with Foundation-TagLib.jar causing exception while navigating the store pages.

Exception -
Error Message: JSPG0227E: Exception caught while translating /<STORENAME>/include/WebServiceeMarketingSpotDisplay.jsp: /<STORENAME>/include/WebServiceeMarketingSpotDisplay.jsp(358,3) --> JSPG0046E: Unable to locate tagfile for tag eMarketingSpotCache
Error Code: 500
Target Servlet: /<STORENAME>/include/WebServiceeMarketingSpotDisplay.jsp
Error Stack:
com.ibm.ws.jsp.translator.JspTranslationException: JSPG0227E: Exception caught while translating /
<STORENAME>/include/WebServiceeMarketingSpotDisplay.jsp:
     /
<STORENAME>/include/WebServiceeMarketingSpotDisplay.jsp(358,3) --> JSPG0046E: Unable to locate tagfile for tag eMarketingSpotCache
    
     at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.getTagInfo(ValidateVisitor.java:1906)
     at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.visitCustomTagStart(ValidateVisitor.java:273)
     at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:366)
     at com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:419)
     at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:234)
     at com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:216)
     at com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.java:127)
     at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTranslatorUtil.java:254)
     at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile(JspTranslatorUtil.java:121)
     at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.translateJsp(AbstractJSPExtensionServletWrapper.java:557)


Resolution - Verify "wcf.tld" within Foundation-TagLib.jar at IBM\WCD\workspace\Stores\WebContent\WEB-INF\lib

Tuesday, 24 September 2013


To change the Heap Configuration - to avoid out of memory issue during enable of Websphere  features 

  • Edit the file <DRIVE>:\IBM\eclipse\IBMIM.ini;
  • Add the heap max size according to the local resources (for example -Xmx512M will reserve 512MB for the heap)
  • Save the file
  • Restart the Installation Manager and run the enable all features task

How to check Websphere Commerce and Application version

To validate the Commerce and Application Version - use versionInfo.bat located in the below locations..

IBM\WCD\bin\versionInfo.bat
IBM\WCD\wasprofile\bin\versionInfo.bat

To switch to Oracle thin client - Websphere Mass Load Utility.

The massload utility must be using the thick client during instance creation and the migration process. By Default, the massload utility uses the Oracle thick JDBC client. To change the massload utility to use the Oracle thin JDBC client:

Steps -
  •     Extract DbConnectionImplIDProperty.properties from the following file:
    •     WCDE_installdir\workspace\wc\lib\loader\dbconnect.zip
  •     Open DbConnectionImplIDProperty.properties
  •     Locate the following text: ConnectStringID = jdbc:oracle:oci8:@
  •     Change the text to - jdbc:oracle:thin:@hostname:port:SID.
  •     Save your changes.
Logging and Tracing in Management Center



  • Open WebSphere Commerce Developer and switch to the Package Explorer view.
  • Right-click LOBTools and click Properties. Select OpenLaszlo Settings.
  • Clear the Enable the debug console check box. Click Apply.

URL - debugger enable
https://host_name:8000/lobtools?logger.display=true

https://host_name:8000/lobtools?logger.display=true&logger.enabled=true&logger.bufferSize=500&logger.Interval=30&logger.level=ALL&logger.components=com.company.component1,com.company.component2

Component Log Levels   
    com.ibm.commerce.lobtools.foundation.view
    com.ibm.commerce.lobtools.foundation.model
    com.ibm.commerce.lobtools.foundation.service
    com.ibm.commerce.lobtools.foundation.util
    com.ibm.commerce.lobtools.foundation.shell

Use the Debug.debug() method to print messages in the debugger console.
Publishing in WCS RAD does not respond and stops with Out of Memory Error after this message..


Problem -
[9/24/13 10:33:47:402 SGT] 0000001d ModelMgr      I   WSVR0801I: Initializing all server configuration models
[9/24/13 10:34:39:326 SGT] 0000001d WorkSpaceMana A   WKSP0500I: Workspace configuration consistency check is disabled.



Screenshot -
 

Resolution -
  • Delete the existing server instance and re-create it.
  • Right click on the server instance in the Servers tab and delete it.
  • Once Step a is complete, Right click on the same window select New ->Server ->Websphere Application Server v7.0 -> Next -> Select WC and click on ADD All -> Finish
  • Start the server.
  • Upon successful, Publish the code.

Troubleshooting OutOfMemoryError during publishing the application in toolkit


Steps -
  1. Start your test server.
  2. Log on to the WebSphere Administration Console.
  3. Select Servers > Server Types > WebSphere application servers > server1 > Java and Process Management > Process definition > Java Virtual Machine
  4. Change the value of the Maximum heap size field. For example, change the value from 512 to 1024.
  5. Save your changes, then restart your test server.
  6. Republish the application.

Monday, 23 September 2013

Feature enablement hangs at refreshProject task in toolkit


In the enableFeature.log, the log file ends with the following messages:
importCMC:

Logs -
  [delete] Deleting 2032 files from F:\IBM\WCDE_E~1\workspace\LOBTools
  [delete] Deleted 266 directories from F:\IBM\WCDE_E~1\workspace\LOBTools
    [copy] Copying 4050 files to F:\IBM\WCDE_E~1\workspace\LOBTools
[projectImport] projectName=LOBTools projectLocation=null
[projectImport] project.refresh
[projectImport]  (Begin)
[projectImport] ... subtask: Refreshing '/LOBTools'.
[projectImport]  (Done)
refreshProject:



 

Comment out '<CleanOpenLaszloIndex projectName="LOBTools" /> ' in toolkitWorkspaceTask.xml, as a workaround
E:\IBM\WCDE_ENT70\components\common\xml\toolkitWorkspaceTask.xml

<antcall target="refreshProject" />
<!-- Clean openlaszlo index for LOBTools project -->
<if>
 <or>
  <equals arg1="${featureIdLowercase}" arg2="fep0"/>
  <equals arg1="${featureIdLowercase}" arg2="fep1"/>
  <equals arg1="${featureIdLowercase}" arg2="fep2"/>
 </or>
 <else>
  <!-- If FEP3 or higher, clean openlaszlo index for LOBTools project
-->
   <CleanOpenLaszloIndex projectName="LOBTools" />
 </else>
</if>


Steps -

  • Stop the feature enablement process.
  • Take the backup of toolkitWorkspaceTask.xml. Open the file toolkitWorkspaceTask.xml.
  • Remove this line:
    • <!-- If FEP3 or higher, clean openlaszlo index for LOBTools project -->
    • <CleanOpenLaszloIndex projectName="LOBTools" />
  • After you have removed the line, run the enablement script again.
  • enableFeature.bat -DfeatureName=<feature name> -DcontinueOnSQLError=continue
  • In Rational Application Developer, click the LOBTools project . Go to project > clean. This step ensures that files from previous Feature Pack level are no longer indexed
  •  Revert back the changes in toolkitWorkspaceTask.xml.

Tuesday, 17 September 2013




Logging and Tracing EJB and Prepared SQL Statements

*=info:enable.trace.log.*=all:com.ibm.ws.rsadapter.jdbc.*=all:EJBContainer=all:PMGR=all


How to install and enable Cache monitor in the developers environment
  • Open the WebSphere Application Server Administration Console.
  • Click Applications > New Application.
  • In the New Application window, click New Enterprise Application.
  • Click Browse and locate the CacheMonitor.ear file in the WAS_installdir/installableApps directory. Click Next.
    •     E:\IBM\SDP\runtimes\base_v7\installableApps\CacheMonitor.ear
  • Select Detailed- Show all installation options and parameters, and click Next on the "Preparing for the application installation" window.
  • You will receive an application security warning. Select continue.
    •  Select the installation options, accept the default values, and click Next.
    • Map the modules to the servers,Check the box beside the Dynamic Cache Monitor module, and click Apply.
  • Click Next until Step 6 or click on Step 6.
  • In Step 6: Map virtual hosts for Web modules, check the box beside the Dynamic Cache Monitor Web module and select one of the following:
    • WC_defaulthost
  • Go to Step 8: Map security roles to users or groups.
  • Click Next for the Summary window, accept the default values, and click Finish.
  • Click Save.
  • Use the WebSphere Application Server Administrative console to start the cache monitor.
    • Click Applications > Application Types > WebSphere enterprise applications.
    • Check the box next to Dynamic Cache Monitor, and click Start.
  • Access the Web Application at https://localhost:8002/cachemonitor/

Monday, 16 September 2013


Logging and Tracing BOD request and response along with SQL queries.

*=info:enable.trace.log.*=all:com.ibm.commerce.foundation.server.command.bod=all:com.ibm.commerce.foundation.server.services.dataaccess=all:com.ibm.ws.sdo.mediator.jdbc*=all

WCS Useful links

Stores- http://<hostname>/webapp/wcs/stores/servlet/<store name>/index.jsp
CMC- https://<hostname>:8000/lobtools
Accelerator- https://<hostname>:8000/accelerator
Admin console https://<hostname>:8002/adminconsole
Orgadminconsole-  https://<hostname>:8004/orgadminconsole
Workspace Admin - http://<hostname>/webapp/wcs/wkspcadmin/servlet/ToolsLogon?XMLFile=workspaceadmin.WorkspaceAdminLogon

Thursday, 12 September 2013


To Create a Command Context Object for a Class

Syntax
ContextHelper.createCommandContext(((BusinessContextInternalService)BusinessContextServiceFactory.getBusinessContextService()).getActivityToken()), null);
How to load the data into the custom table using the Catalog Upload option in Management Center 


Make use of the  TableObjectMediator to load the data into the Custom Table.

 <_config:BusinessObjectMediator className="com.ibm.commerce.foundation.dataload.businessobjectmediator.TableObjectMediator"/> </_config:BusinessObjectBuilder>
 WCS7 Migration tips -

By default, the massload utility uses the Oracle thick JDBC client. To change the massload utility to use the Oracle thin JDBC client:

Note: The massload utility must be using the thick client during instance creation and the migration process. The bootstrap data gets processed during these processes.

  •     Extract DbConnectionImplIDProperty.properties from the following file:
    •         WC_installdir/lib/loader/oracle/dbconnect.zip
    •         WebSphere Commerce Developer - WCDE_installdir\workspace\wc\lib\loader\dbconnect.zip
  •     Open DbConnectionImplIDProperty.properties in a text editor.
  •     Locate the following text: ConnectStringID = jdbc:oracle:oci8:@
    •     Note: By default, the dbconnect.zip compressed file does not contain this text string. When the setdbtype utility script runs to switch the database type to an Oracle database, this compressed file is replaced. The compressed file is replaced with a version that contains the property information for Oracle databases. When this script runs, the dbconnect.zip compressed file with the Oracle information is copied from the following directory:
    •         WC_installdir/wc.ear.ext/oracle/loader
    •         WCDE_installdir\wc.modules\loader\oracle
  •     Change the text to match the following text: ConnectStringID = jdbc:oracle:thin:@ If you are using the massload stand-alone utility use: jdbc:oracle:thin:@hostname:port:SID.
  •     Save your changes.
  •     Add the updated DbConnectionImplIDProperty.properties file to the WC_installdir/lib/loader/oracle/dbconnect.zip file. Overwrite the existing file in the archive.
  •     Copy dbconnect.zip and paste it one directory level higher. For example, in this example, it would go in the WC_installdir/lib/loader folder.