Thursday, October 1, 2015

IBM Websphere Commerce Version 8.0 Announced !!

Exciting news for Websphere Commerce developers. Big news items.

    DHTML
    Open Source Spring framework.
    IBM Customer Service
    Management Center UI revamped.
    Upgraded RAD 9.5, WAS , DB2

As per IBM, these are 2 big modules in the new Version 8.0. Along with upgrades to application server and stack.

IBM Customer Service for WebSphere Commerce Version 8.0 delivers enhancements to Customer Service for WebSphere Commerce that offer a better customer service and support experience. The customer service representative (CSR) can utilize the same buying experience that customers use to provide assistance with site activities, for example, assist customers to manage their cart content and assist with the checkout process. As a part of the buying experience, the CSR can look up customer accounts and orders, and help customers with their account management. Customer Service for WebSphere Commerce is a separately purchased solution for

WebSphere Commerce V8.0 clients. IBM Management Center for WebSphere Commerce In Version 8.0, the Management Center is updated to use Dynamic HTML (DHTML) and the open source Spring Framework. This update makes it easier for developers to customize and embed custom tools in the Management Center. With DHTML, Management Center is no longer dependent on AdobeTM Flash technology, and developers who customize the Management Center can now view their changes IBM United States Software Announcement 215-305 IBM is a registered trademark of International Business Machines Corporation 2 without first compiling their code. Additionally, the Management Center user interface now has a new look.

    Ref: http://www-01.ibm.com/common/ssi/rep_ca/5/897/ENUS215-305/ENUS215-305.PDF
    

Sunday, September 13, 2015

SEO | XML | SitemapGenerate


You can create a sitemaps job using the Scheduler in the Administration Console. Create a new schedule job SitemapGenerate  with parameters

example:
storeId=10501&catalogId=10051&sitemapView=SEOSiteMapView&storeType=MHS&uploadXMLToEAR=true&compareFiles=true

In toolkit the files are generated at the following location with pattern sitemap_10501.
C:\IBM\WCDE_ENT70\workspace\Stores\WebContent

The command calls SEOSitemap.jsp which internally calls the category\subcategory\PDP and all other content that needs to be added to the sitemap_storeID.xml e.g. sitemap_105010.xml.

Do not added HTML comments into the JSPs. Specially more important for JSPs used b the SEO process since these would be reflected in the SEO xml's generated.
Also do not miss to add the correct pageType for SEO friendly URLs.

Custom URL contents to be included in the Sitemap, a SEOSitemapExt.jsp is included under Stores/WebContent/AuroraStorefrontAssetStore. This file is imported at the end of SEOSitemap.jsp which generates all the urls to be included in the index by the search engine
The constructedUrlCounter and urlCounter variables need to be updated for each added URL
URLs to the sitemap by defining one or more ...

Friday, May 15, 2015

WC_PERSISTENT | SESSION TIMEOUT !! 30 MINUTES DEFAULT




WC_PERSISTENT cookie is used to track session management in websphere commerce and session timeout is managed in WAS console. This is for global flag. If you want to enable them at the store level, this can be set using at STORE table by setting column PERSISTENTSESSION for corresponding store.


Dynacache on off | from WAS Console

On toolkit, Right click on server1-->

WAS console and remove check box on Enable servlet caching to turn off dynacache, and click apply  , save and restart server.

Saturday, May 9, 2015

Access your AWS linux instance from windows

The traditional SSH into Unix is not supported directly. You need to generate a pair of RSA keys and add public key to EC2 to login.

On your windows instance: You have to the following steps. Putty does not support the private key format (.pem) generated by Amazon EC2 so you have to generated keys using Git Bash and then convert them into keys in PuttyGen.

  • PuTTY does not natively support the private key format (.pem) generated by Amazon EC2. 

  • Install Putty (Download). 
  • Install PuttyGen, (Download).
  • Download and Install Git Bash (Download link)
  • Open Git Bash --It opens a console
  • Run the following command ssh-keygen -t rsa 
           Generating public/private rsa key pair.
              Enter file in which to save the key (/c/Users/admin/.ssh/id_rsa):
    • The above process generates a public key and a private key.
    • Open puttyGen and load private key and save private key. 
    • Open putty and in settings -->SSH->Auth--Add your private key




    Monday, April 27, 2015

    SSL HANDSHAKE FAILURE | Signer Certificate retrieve from port


    CWPKI0022E: SSL HANDSHAKE FAILURE:  A signer with SubjectDN "CN=localhost, O=IBM, C=US" was sent from target host:port "localhost:443".  The signer may need to be added to local trust store "C:/IBM/WCD70_2/wasprofile/config/cells/localhost/nodes/localhost/trust.p12" located in SSL configuration alias "NodeDefaultSSLSettings" loaded from SSL configuration file "security.xml".  The extended error message from the SSL handshake exception is: "PKIX path building failed: java.security.cert.CertPathBuilderException: unable to find valid certification path to requested target".
    00000053 SystemOut     O
    00000053 SystemOut     O CWPKI0022E: SSL HANDSHAKE FAILURE:  A signer with SubjectDN "CN=localhost, O=IBM, C=US" was sent from target host:port "localhost:443".  The signer may need to be added to local trust store "C:/IBM/WCD70_2/wasprofile/config/cells/localhost/nodes/localhost/trust.p12" located in SSL configuration alias "NodeDefaultSSLSettings" loaded from SSL configuration file "security.xml".  The extended error message from the SSL handshake exception is: "PKIX path building failed: java.security.cert.CertPathBuilderException: unable to find valid certification path to requested target".
    00000053 SystemOut     O
    00000053 SystemOut     O
    00000053 SystemOut     O CWPKI0428I: The signer might need to be added to the local trust store. You can use the Retrieve from port option in the administrative console to retrieve the certificate and resolve the problem. If you determine that the request is trusted, complete the following steps: 1. Log into the administrative console.  2. Expand Security and click SSL certificate and key management. Under Configuration settings, click Manage endpoint security configurations. 3. Select the appropriate outbound configuration to get to the (cell):localhost:(node):localhost management scope. 4. Under Related Items, click Key stores and certificates and click the NodeDefaultTrustStore key store. 5. Under Additional Properties, click Signer certificates and  Retrieve From Port.  6. In the Host field, enter localhost in the host name field, enter 443 in the Port field, and localhost_cert in the Alias field. 7. Click Retrieve Signer Information.  8. Verify that the certificate information is for a certificate that you can trust. 9. Click Apply and Save.
    00000053 SystemOut     O
    00000053 ExtendedInfo  I   CWXFR9010I: Extended information : [URL=https://localhost:8006/webapp/wcs/preview/servlet/static/helloworld/dewalt] [parameters=deleteCartCookie=true  ] [userId=-1002]
    00000053 LoggingHelper E /GenericJSPPageError.jsp - java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.j: PKIX path building failed: java.security.cert.CertPathBuilderException: unable to find valid certification path to requested target
                                     javax.servlet.jsp.JspException: java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.j: PKIX path building failed: java.security.cert.CertPathBuilderException: unable to find valid certification path to requested target
        at com.ibm.commerce.foundation.internal.client.taglib.RESTTag.myExecute(RESTTag.java:1238)
        at com.ibm.commerce.foundation.internal.client.taglib.RESTTag.execute(RESTTag.java:1067)
        at com.ibm.commerce.foundation.internal.client.taglib.RESTTag.doEndTag(RESTTag.java:537)

    Goto Admin console -->Security section and
    SSL certificate and key management > Key stores and certificates > NodeDefaultTrustStore > Signer certificates
    Retrieve from port

    Thursday, April 9, 2015

    Catalog uploads(file upload) in Management Center | does not work in Firefox | CatalogEntrySEO

    If you have done this in the past , you would know but there are no error messages in firefox and catalog uploads in management center (File upload) does not work. It works in IE but you need to every time click on settings and click Compatibility view settings and add localhost



    E.g  If you want to upload for CatalogEntrySEO
    File first 2 lines in the file to upload:
    CatalogEntrySEO,,,,,,
    PartNumber,LanguageId,URLKeyword,PageTitle,MetaDescription,ImageAltText,Delete

    Settings for maxError and commit counts are defined at:
    C:\IBM\WCDE_ENT70\workspace\WC\xml\config\com.ibm.commerce.catalog\dataload\wc-dataload.xml
    You can also define them at individual load item level.



    Tuesday, March 31, 2015

    Solr PreProcessing Error | SYS_C00151674 | Debugging

    com.ibm.commerce.foundation.dataimport.preprocess.CatalogHierarchyDataPreProcessor determineCatalogEntriesForCatalog(Connection connection, String catalogID)
    INFO: The catalog with ID: 10051 contains 174468 catalog entries.
     com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain processDataConfig(DataProcessingConfig, String)
    INFO: ORA-00001: unique constraint (SYS_C00151674) violated


    If any of these 2 queries finds rows, that would be a good pointer and backup deletes and run the delete's and try again.

    Rule 1: In Master catalog, you should always have 1 catalog entry belong to 1 master catalog category and CMC and dataload enforces that but if the data is loaded through another channel, this could happen.

    1) To identify if there is a catalog entry that has more than one parent category, run the following SQL query against the database:
    select catentry_id, catgroup_id from catgpenrel where catentry_id in (select catentry_id from catgpenrel where catalog_id = group by catentry_id having count(catentry_id) > 1)
    where is the catalog ID value for which di-preprocess is being run.

    The above query will provide a list of catalog entry IDs and the categories that they are mapped to if they are mapped to more than one category in the master catalog ID.
     e.g.
    select catentry_id, catgroup_id from catgpenrel
    where catentry_id in (select catentry_id from catgpenrel where catalog_id = 10051 group by catentry_id having count(catentry_id) > 1);

    Rule 2: You should have always 1 parent category for each master catalog category.
    2) To identify if the issue is caused by a category having multiple parent categories in the master catalog, run the following SQL query against the database:
    select catgroup_id_parent, catgroup_id_child from catgrprel where catalog_id = and catgroup_id_child in (select catgroup_id_child from catgrprel where catalog_id = group by catgroup_id_child having count(catgroup_id_child) > 1)
    e.g.
    select catgroup_id_parent, catgroup_id_child from catgrprel where catalog_id = 10051 and
    catgroup_id_child in (select catgroup_id_child from catgrprel where catalog_id = 10051
    group by catgroup_id_child having count(catgroup_id_child) > 1);

    More Logging: Edit the logging.properties file:

        Runtime location: WC_installdir/instances/ instance_name/xml/config/dataimport/logging.properties
        Toolkit location: WCDE_INT70\workspace\WC\xml\config\dataimport\logging.properties
        Verify that .level=FINEST and java.util.logging.FileHandler.level=FINEST
        Verify that java.util.logging.FileHandler.limit=80000000
        Verify that java.util.logging.FileHandler.count=10 

    Wednesday, March 4, 2015

    Solr Build index fails | would not provide error information | run solr direct

    Last I encountered an error where running build-index from toolkit would give the following 2 lines but it wouldn't rebuild index and do nothing.
    The program exiting with exit code: 0.
    Data import process completed successfully with no errors.


    If you need to directly run index on SOLR server: This is the command
    http://localhost/solr/MC_10051_CatalogEntry_en_US/dataimport?command=full-import

    To Monitor:
    http://localhost/solr/MC_10051_CatalogEntry_en_US/dataimport?command=status

    Once I ran directly on SOLR, full-import, it gave the errors.
    In this particular case, it gave heap error and had to increase 512 MB to 1024 MB in WAS admin console.

    Sunday, March 1, 2015

    IBM CMC | Approved Content error on read-only mode | Working on Approved content selection

    When trying to edit content in CMC, the default mode is read-only and it requires clicking the gear icon on the menu to work on Approved content. Find below screenshots, below click




    Thursday, January 8, 2015

    Finally Enabling multiple logon for the same user | Available from Fix pack 9


    This was something that was not available for a long time but with the new fix pack. This is available. I might have an old blog where i had mentioned, it was not available in the previous versions.

    Many WebSphere Commerce websites are using REST services to serve both mobile and desktop pages then it's important to allow multiple logon for the same user from different channels in a simple way. To activate this feature a specific tag should be added to the wc-server.xml in the SessionManagement section

    <allowmultiplelogonforsameuser display="false" enabled="true"></allowmultiplelogonforsameuser>

    Tuesday, January 6, 2015

    Performance Improvements StringBuilder and ArrayList and HashMap

    Use StringBuilder if Synchronization is not required.

    I have used StringBuffer when performing concatenations on string and is far better than using Immutable Strings in Java but if you don't need the synchronization, which most likely could be the case so use StringBuilder

    Quote from StringBuilder API:
    This class [StringBuilder] provides an API compatible with StringBuffer, but with no guarantee of synchronization. This class is designed for use as a drop-in replacement for StringBuffer in places where the string buffer was being used by a single thread (as is generally the case). Where possible, it is recommended that this class be used in preference to StringBuffer as it will be faster under most implementations.

    Using ArrayList vs LinkedList

    LinkedList is great when you don't know the size of the list as it helps.

    The default initial capacity of an ArrayList is pretty small (10 from Java 1.4 - 1.7).
    But since the underlying implementation is an array, the array must be re-sized if you add a lot of elements.
    To avoid the high cost of resizing when you know you're going to add a lot of elements, construct the ArrayList with a higher initial capacity. What's important is to initialize the list when you know upfront the size of the ArrayList and if it is going to be more than 10

    List catalogDataVOList = new ArrayList<CatalogDataVO>((int) resultCount);

    Reference: http://stackoverflow.com/questions/322715/when-to-use-linkedlist-over-arraylist

    Use HashMap vs Hashtable:
    If Synchronization is not required use HashMap, Hashtable is a syncrhonized version and typically non synchronized objects perform better.