Tuesday, 18 March 2014

Error on executing versionInfo.bat


Unable to run versionInfo.bat  ? similar error as below.



C:\IBM\WCDE_ENT70\bin>versionInfo.bat
WVER0010I: Copyright (c) IBM Corporation 2002, 2005; All rights reserved.
WVER0011I: WebSphere Application Server Release 6.0
WVER0012I: VersionInfo reporter version 1.15.3.4, dated 11/12/08

--------------------------------------------------------------------------------
IBM WebSphere Application Server Product Installation Status Report
--------------------------------------------------------------------------------

Report at date and time 2014-03-05 11:55:48+0530

Installation
--------------------------------------------------------------------------------
Product Directory C:\IBM\WCDE_E~1
Version Directory C:\IBM\WCDE_E~1\properties\version
DTD Directory C:\IBM\WCDE_E~1\properties\version\dtd
Log Directory C:\IBM\WCDE_E~1\logs
Backup Directory C:\IBM\WCDE_E~1\properties\version\update\backup
TMP Directory C:\Users\ADMINI~1\AppData\Local\Temp
java.lang.NullPointerException
        at com.ibm.websphere.product.WASProduct.loadVersionInfo(WASProduct.java:2214)
        at com.ibm.websphere.product.WASProduct.getVersionInfo(WASProduct.java:2143)
        at com.ibm.websphere.product.WASProduct.getPlatform(WASProduct.java:968)
        at com.ibm.websphere.product.VersionInfo.printReport(VersionInfo.java:1091)
        at com.ibm.websphere.product.VersionInfo.runReport(VersionInfo.java:870)
        at com.ibm.websphere.product.VersionInfo.runReport(VersionInfo.java:802)
        at com.ibm.websphere.product.VersionInfo.runReport(VersionInfo.java:737)
        at com.ibm.websphere.product.VersionInfo.main(VersionInfo.java:468)
        at com.ibm.websphere.product.VersionInfo.main(VersionInfo.java:300)
        at com.ibm.commerce.install.internal.utils.WCVersionInfo.main(WCVersionInfo.java:56
WVER0004E: Error writing version report to Standard Output: java.lang.NullPointerException



 Somehow you have managed to get the contents of the below folder to be deleted.
C:\IBM\WCDE_ENT70\properties\version\.. . 

This is where websphere commerce will refer to inorder to figure out the current status of the product installation. 

Details of the current version installed are contained in the NIFStack .

C:\IBM\WCDE_ENT70\properties\version\update\backup\NIFStack.xml 

It containes info on the apars installed , current Fixpack level , feature pack level , history , product ids etc.

Solution:
Try to copy the entire properties folder from a colleague who has installed the product with similar settings and is at the same fixpack and featurepack level as you are on. I am not sure there is another way.

Do not proceed with apars installation or any other upgradation until you fix this NIFStack.xml issue. 

How to escalate a Credit card/ Banking Dispute

There are many instances when you are lured by a customer service executive into signing up for a credit card / opening a bank account on the promise of a few goodies.

But most of these too good to be true schemes end up with the bank creating problems either by charging some a fee under a miscellaneous  column.

It gets worse when the call center does not help.

The best way out is to complain to the RBI ombudsman.

https: //secweb.rbi.org.in/BO/precompltindex.htm

Wednesday, 12 March 2014

Start and Stop Hybris Server. & Server Console Logs.

I could not find this in the documentation.unfortunately. Its Pretty basic though.

This is how one can start and stop the Hybris server instead of killing the process in the task manager :-) or doing a Ctrl +C and then Y  . on the Console.

On Command Prompt .. Navigate to  Installation Directory . viz. E:hybris\bin\platform

The following arguments can be passed to hybrisserver.bat .

catalina.bat [hybris mode]
Usage:  catalina.bat ( commands ... )
commands:
  run               Start Tomcat in the current window
  start             Start Tomcat as windows service
  stop              Stop Catalina

At Cmd prompt

to Start : >hybrisserver.bat -start    ( Start as a Windows Service ) .In This case You will need to seperately open the Logs.

to Stop  : >hybrisserver.bat -stop

Console Logs Path .

E:\hybris\log\tomcat\console-20140312.txt   ( Wierd that it is a text file  and not a .log file )

It is impossible to debug Hybris looking at logs in the console.

Sunday, 2 March 2014

Getting Started with Hybris.

It was Quite Difficult to get my hands on the Hybris software and finally the documentation was lacking so very much  and I could hardly find any help available .googling..

Registering on the Hybris site is a big pain.  You have to wait months until  receive an approval e-Mail. I guess this is to keep most people out.
So you will have to either get it from a friend , who already has it , or wait it out ..

Once you have downloaded the  hybris-commerce-suite  .
Follow the steps mentioned in the wiki.
The extracted folder will have something like below. 



Navigate to <Directory of installation> :\..\hybris\bin\platform  , and run setantenv.bat  .
Ignore any warnings.

Run the ant build .   cmd -> ant clean all . ( This takes a bit of time . )

Now you can start the Hybris Server. 

Run the Hybris Server.  hybrisserver.bat . 

Error : 
Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine 



In case you end up with this error.
Navigate to <directory>:\..\hybris\bin\platform\tomcat\conf   and update the 

xMx -  maximum size of the memory allocation pool and 
XX:MaxPermSize  - initial size that will be allocated during startup of the JVM

 Here is what I have configured. 

wrapper.java.additional.1=-Xmx1G
wrapper.java.additional.2=-XX:MaxPermSize=512M  


Hope this helps. 

Once the Server is Up . 


Server Admin Console ( Hybris Admin Console )  : http://localhost:9001/ 

Id/ Pass : admin/nimda . 

CMS Manager : cmsmanager/1234   - http://localhost:9001/cmscockpit/login.zul


 There you go on with checking out Hybris. 

Features and Options Seems very less compared to Websphere Commerce , but then again this is still evolving. 
 

Monday, 6 January 2014

Building Search Indexes in Websphere Commerce


Websphere commerce has been providing apache solr  embedded on the WAS server as aembedded search engine with the WCS e-commerce solution.
Websphere Commerce Search Engine was started as a part of Feature Pack 2.
  • WebSphere Commerce Version 7 Feature Pack 2
  • Websphere Commerce Version 7 Feature Pack 3  
  Enablement of the Search Feature .
Incase the Feature was not enabled as a part of the Feature Pack installation, the same can be enabled by doing the following.
 enableFeature.bat -DfeatureName=foundation [-DsolrHome=solrhome]



Setting up the solr Search locally .
  1. Navigate to the following directory:
 Run the search index setup utility:
setupSearchIndex.bat -action action-masterCatalogId masterCatalogId [-indextype indextype] [-solrhome solrhome][-setupWebContent true | false] [-indexsubtype indexsubtype]

setupSearchIndex.bat -action action-masterCatalogId masterCatalogId [-indextype indextype] [-solrhome solrhome][-setupWebContent true | false] [-indexsubtype indexsubtype]

setupSearchIndex.bat -masterCatalogId masterCatalogId  ( This will suffice on a Local Developer Machine ).

Sample Logs
=================================================================
WebSphere Commerce Search Index Setup Utility
=================================================================

Utility started at 2013-09-20 12:30:32
Configuration initialization started at 2013-09-20 12:30:32
Configuration initialization finished at 2013-09-20 12:30:33
Database initialization started at 2013-09-20 12:30:33
Database initialization finished at 2013-09-20 12:30:34
Initialization completed in 2.332 seconds.
Build and execute process job started at 2013-09-20 12:30:34


**************************************************************
Started configuring WebSphere Commerce for Solr cores
**************************************************************
Master Catalog Id: 10051
Index Type: CatalogEntry
Languages: [en_US, fr_FR, de_DE, it_IT, es_ES, pt_BR, zh_CN, zh_TW, ru_RU, ko_
, ja_JP, ro_RO, pl_PL]
**************************************************************

--- Started configuring pre-process. ---
--- Finished configuring pre-process. ---

--- Started configuring attribute dictionary. ---
--- Finished configuring attribute dictionary. ---

--- Started configuring classic attribute. ---
--- Finished configuring classic attribute. ---

--- Started configuring delta update. ---
--- Finished configuring delta update. ---

--- Started configuring wc-search.xml. ---
--- Finished configuring wc-search.xml. ---


**************************************************************
Finished configuring WebSphere Commerce for Solr cores
**************************************************************




**************************************************************
Started configuring WebSphere Commerce for Solr cores
**************************************************************
Master Catalog Id: 10051
Index Type: CatalogGroup
Languages: [en_US, fr_FR, de_DE, it_IT, es_ES, pt_BR, zh_CN, zh_TW, ru_RU, ko_
, ja_JP, ro_RO, pl_PL]
**************************************************************

--- Started configuring pre-process. ---
--- Finished configuring pre-process. ---

--- Started configuring delta update. ---
--- Finished configuring delta update. ---

--- Started configuring wc-search.xml. ---
--- Finished configuring wc-search.xml. ---


**************************************************************
Finished configuring WebSphere Commerce for Solr cores
**************************************************************



**************************************************************
Started setup for Solr cores
**************************************************************
Master Catalog Id: 10051
Index Type: CatalogEntry
Languages: [en_US, fr_FR, de_DE, it_IT, es_ES, pt_BR, zh_CN, zh_TW, ru_RU, ko_
, ja_JP, ro_RO, pl_PL]
**************************************************************

--- Started checking directories for setup Solr cores. ---
--- Finished checking directories for setup Solr cores. ---

**************************************************************
The following languages passed directory validation:
- en_US
- fr_FR
- de_DE
- it_IT
- es_ES
- pt_BR
- zh_CN
- zh_TW
- ru_RU
- ko_KR
- ja_JP
- ro_RO
- pl_PL

The following Solr cores will setup:
- MC_10051_CatalogEntry_en_US
- MC_10051_CatalogEntry_Unstructured_en_US
- MC_10051_CatalogEntry_fr_FR
- MC_10051_CatalogEntry_Unstructured_fr_FR
- MC_10051_CatalogEntry_de_DE
- MC_10051_CatalogEntry_Unstructured_de_DE
- MC_10051_CatalogEntry_it_IT
- MC_10051_CatalogEntry_Unstructured_it_IT
- MC_10051_CatalogEntry_es_ES
- MC_10051_CatalogEntry_Unstructured_es_ES
- MC_10051_CatalogEntry_pt_BR
- MC_10051_CatalogEntry_Unstructured_pt_BR
- MC_10051_CatalogEntry_zh_CN
- MC_10051_CatalogEntry_Unstructured_zh_CN
- MC_10051_CatalogEntry_zh_TW
- MC_10051_CatalogEntry_Unstructured_zh_TW
- MC_10051_CatalogEntry_ru_RU
- MC_10051_CatalogEntry_Unstructured_ru_RU
- MC_10051_CatalogEntry_ko_KR
- MC_10051_CatalogEntry_Unstructured_ko_KR
- MC_10051_CatalogEntry_ja_JP
- MC_10051_CatalogEntry_Unstructured_ja_JP
- MC_10051_CatalogEntry_ro_RO
- MC_10051_CatalogEntry_Unstructured_ro_RO
- MC_10051_CatalogEntry_pl_PL
- MC_10051_CatalogEntry_Unstructured_pl_PL

**************************************************************

--- Started copying Solr core files. ---
--- Finished copying Solr core files. ---

--- Started configuring DIH (wc-data-config.xml). ---
--- Finished configuring DIH (wc-data-config.xml). ---

--- Started registering Solr core in solr.xml. ---
--- Finished registering Solr core in solr.xml. ---


**************************************************************
Started setup for Solr cores
**************************************************************
Master Catalog Id: 10051
Index Type: CatalogGroup
Languages: [en_US, fr_FR, de_DE, it_IT, es_ES, pt_BR, zh_CN, zh_TW, ru_RU, ko_
, ja_JP, ro_RO, pl_PL]
**************************************************************

--- Started checking directories for setup Solr cores. ---
--- Finished checking directories for setup Solr cores. ---

**************************************************************
The following languages passed directory validation:
- en_US
- fr_FR
- de_DE
- it_IT
- es_ES
- pt_BR
- zh_CN
- zh_TW
- ru_RU
- ko_KR
- ja_JP
- ro_RO
- pl_PL

The following Solr cores will setup:
- MC_10051_CatalogGroup_en_US
- MC_10051_CatalogGroup_fr_FR
- MC_10051_CatalogGroup_de_DE
- MC_10051_CatalogGroup_it_IT
- MC_10051_CatalogGroup_es_ES
- MC_10051_CatalogGroup_pt_BR
- MC_10051_CatalogGroup_zh_CN
- MC_10051_CatalogGroup_zh_TW
- MC_10051_CatalogGroup_ru_RU
- MC_10051_CatalogGroup_ko_KR
- MC_10051_CatalogGroup_ja_JP
- MC_10051_CatalogGroup_ro_RO
- MC_10051_CatalogGroup_pl_PL

**************************************************************

--- Started copying Solr core files. ---
--- Finished copying Solr core files. ---

--- Started configuring DIH (wc-data-config.xml). ---
--- Finished configuring DIH (wc-data-config.xml). ---

--- Started registering Solr core in solr.xml. ---
--- Finished registering Solr core in solr.xml. ---

Build and execute process job finished at 2013-09-20 12:30:46

Program exiting with exit code: 0.
Search index setup successfully completed without errors.

Utility stopped at 2013-09-20 12:30:46
Total running time is 13.37 seconds.



After you set up the search index structure for a specific master catalog, you must preprocess the search index data.

2. di-preprocess.bat full-path [-fullbuild true | false] [-localename localename] [-onelevel true | false] [-multithread true | false]

eg :

 di-preprocess.bat  C:\WCDE_ENT70\search\pre-processConfig\MC_10051\Cloudscape

The Directories would have formed if the Search index setup had run successfully with exit code 0.


Sample Logs

INFO: F:\WCDE_ENT70\search\pre-processConfig\MC_10051\Cloudscape\CatalogGroup
-dataimport-preprocess-common.xml
Sep 20, 2013 12:40:17 AM com.ibm.commerce.foundation.dataimport.preprocess.Da
mportPreProcessorMain processDataConfig(DataProcessingConfig, String)
INFO: table:
Sep 20, 2013 12:40:17 AM com.ibm.commerce.foundation.dataimport.preprocess.Ab
actDataPreProcessor populateTable(PreparedStatement, Long, Connection)
INFO: The batch is being executed...
Sep 20, 2013 12:40:17 AM com.ibm.commerce.foundation.dataimport.preprocess.Ab
actDataPreProcessor populateTable(PreparedStatement, Long, Connection)
INFO: Batch execution completed.
Sep 20, 2013 12:40:17 AM com.ibm.commerce.foundation.dataimport.preprocess.Da
mportPreProcessorMain processDataConfig
INFO: Data import pre-processing completed in 0.152 seconds for table TI_CATG
EL_3.
Sep 20, 2013 12:40:17 AM com.ibm.commerce.foundation.dataimport.preprocess.Da
mportPreProcessorMain processDataConfig(DataProcessingConfig, String)
INFO: F:\WCDE_ENT70\search\pre-processConfig\MC_10051\Cloudscape\CatalogGroup
-dataimport-preprocess-common.xml
Sep 20, 2013 12:40:17 AM com.ibm.commerce.foundation.dataimport.preprocess.Da
mportPreProcessorMain processDataConfig(DataProcessingConfig, String)
INFO: table:
Sep 20, 2013 12:40:17 AM com.ibm.commerce.foundation.dataimport.preprocess.Ab
actDataPreProcessor populateTable(PreparedStatement, Long, Connection)
INFO: The batch is being executed...
Sep 20, 2013 12:40:17 AM com.ibm.commerce.foundation.dataimport.preprocess.Ab
actDataPreProcessor populateTable(PreparedStatement, Long, Connection)
INFO: Batch execution completed.
Sep 20, 2013 12:40:17 AM com.ibm.commerce.foundation.dataimport.preprocess.Da
mportPreProcessorMain processDataConfig
INFO: Data import pre-processing completed in 0.171 seconds for table TI_DPGR
_3.
Sep 20, 2013 12:40:17 AM com.ibm.commerce.foundation.dataimport.preprocess.Da
mportPreProcessorMain processDataConfig(DataProcessingConfig, String)
INFO: F:\WCDE_ENT70\search\pre-processConfig\MC_10051\Cloudscape\CatalogGroup
-dataimport-preprocess-common.xml
Sep 20, 2013 12:40:17 AM com.ibm.commerce.foundation.dataimport.preprocess.Da
mportPreProcessorMain processDataConfig(DataProcessingConfig, String)
INFO: table:
Sep 20, 2013 12:40:20 AM com.ibm.commerce.foundation.dataimport.preprocess.Da
mportPreProcessorMain processDataConfig
INFO: Data import pre-processing completed in 2.89 seconds for table TI_CGSEO
_3_#lang_tag#.
Sep 20, 2013 12:40:20 AM com.ibm.commerce.foundation.dataimport.preprocess.Da
mportPreProcessorMain logExitCode
INFO:
The program exiting with exit code: 0.
Data import pre-processing completed successfully with no errors.

Sep 20, 2013 12:40:20 AM com.ibm.commerce.foundation.dataimport.preprocess.Da
mportPreProcessorMain logEndDateAndTime
INFO: Data import pre-processing ended:Fri Sep 20 00:40:20 IST 2013
Sep 20, 2013 12:40:20 AM com.ibm.commerce.foundation.dataimport.preprocess.Da
mportPreProcessorMain logEndDateAndTime
INFO: Data import pre-processing completed in 56.491 seconds.


Verify that the Program executed successfully.

Also, inspect the following file for errors:
To get more logging information, update the logging level from INFO to FINEST in the following file:
# Default global logging level, INFO
.level=FINEST
You can also increase the log file size and the number of log files. For example:
# Limiting size of output file in bytes:
java.util.logging.FileHandler.limit=50000000

# Number of output files to cycle through
java.util.logging.FileHandler.count=2 

Well now for the last step .

After preprocessing the search index data, you must build the search index.

Start the server.

navigate to bin folder.
run the following.

di-buildindex.bat -instance instance_name -masterCatalogId masterCatalogId [-indextype indextype] -dbuser dbuser -dbuserpwd dbuserpwd [-fullbuild true | false] [-statusInterval statusInterval] [-localename localename] [-indexSubType indexSubType] [-basePath basePath] [-storeId storeId] [-webcontentDelete true | false] [-solrConnTimeout solrConnTimeout] [-soTimeout soTimeout] [-workspace workspaceId] [-force true | false


eg:  di-buildindex.bat -masterCatalogId 10051 -basePath C:\WCDE_ENT70\workspace\StaticContent\WebContent\Madisons\StaticContent\en_US

In this case i have a seperate project StaticContent.