Thursday, June 30, 2016

NoClassDefFoundError | project dependency



 CommerceSrvr  E WcsApp initialize CMN0409E: The following error occurred during processing: "{0}". java.lang.NoClassDefFoundError: com.custom.search.endeca.query.NavigationQuery
    at com.custom.mro.commerce.seo.SEORegistry.traverse(SEORegistry.java:332)
    at com.custom.mro.commerce.seo.SEORegistry.traverse(SEORegistry.java:316)
    at com.custom.mro.commerce.seo.SEORegistry.populate(SEORegistry.java:247)
    at com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry.initialize(AbstractManagedDynamicCacheRegistry.java:167)
    at com.custom.mro.commerce.seo.SEORegistry.initialize(SEORegistry.java:120)
    at com.ibm.commerce.registry.RegistryManager.initializeRegistryEntry(RegistryManager.java:140)
    at com.ibm.commerce.registry.RegistryManager.initializeRegistryEntry(RegistryManager.java:169)
    at com.ibm.commerce.registry.RegistryManager.initialize(RegistryManager.java:95)
    at com.ibm.commerce.server.WcsApp.registryInit(WcsApp.java:624)
    at com.ibm.commerce.server.WcsApp.initialize(WcsApp.java:473)
    at com.ibm.commerce.server.WebApp


Fix:
In WC->Java EE Module dependency


DataProject-->Java EE Module dependency --check EnrichedSiteSearch.jar



Sunday, May 1, 2016

Creating Custom Commerce Composer Widget

https://www.ibm.com/support/knowledgecenter/SSZLC2_8.0.0/com.ibm.commerce.pagecomposerframework.doc/tasks/tpzwidgetcreation.htm?lang=en

Create new Project and XML

C:\WCDE80\workspace\NewWidgetProject\NewWidgetPatternInputFile.xml

Replace CustmVendorName ---> name of  commerce project company name

         identifier="BrandsDisplayWidget" UIObjectName="BrandsDisplayWidget"
     displayName="Brands Display Widget" description="This widget is used to display brands in alphabetical order in brands page"
     widgetDisplayGroups=""
     widgetRestrictionGroups="" >
      
 
Right Click Run Configurations

Make sure to select the ID




Wednesday, February 17, 2016

Debugging a print issue | Chrome

To access the Rendering Settings on Chrome debugger. Enable by clicking on the drop down on extreme left icon.

When working with CSS and DIV issues, Chrome debugger is a great first step and then if the JSP has an issue with missing end DIV tags, developers need to go in and indent and figure out the missing or DIV tags.

 


Check Emulate Print media to the view the page with print media check. and you can also run javascript Jquery commands in console to find any Div with hidden elements.




You can also delete various Div classes and figure the faulty DIV.




Tuesday, February 16, 2016

Enabling SEO | Testing with IHS

To test the SEO on local, you need to have corresponding rewrites and rewrite engine turned on in
C:\IBM\HTTPServer\conf and check logs in C:\IBM\HTTPServer\conf. Also if you have multiple esites, it is important to get the virtual host for each esite and allowed host setting in wc-server.xml

<VirtualHost *:80>
RewriteEngine on

RewriteCond %{REQUEST_URI} !^/webapp.*$
RewriteCond %{REQUEST_URI} !^/wcsstore.*$

</VirtualHost>


<VirtualHost  abcd.localhost.com:80>
RewriteEngine on

RewriteCond %{REQUEST_URI} !^/webapp.*$
RewriteCond %{REQUEST_URI} !^/wcsstore.*$

</VirtualHost>

C:\Windows\System32\drivers\etc
127.0.0.1       localhost abcd.localhost.com

Command prompt: C:\>ipconfig /flushdns

In wc-server.xml find this section and enable context root.

<SEOConfiguration defaultUrl="" dynamicUrl="true" enable="true">
    <context-root-rewrite value="/" />
</SEOConfiguration>  


Tuesday, January 12, 2016

DB2 SQL Error: SQLCODE=-1476, SQLSTATE=40506, SQLERRMC=-964, DRIVER=4.12.55

While running preprocessing got the following error:

INFO: Error for batch element #1: DB2 SQL Error: SQLCODE=-1476, SQLSTATE=40506,
SQLERRMC=-964, DRIVER=4.12.55

C:\IBM\WCDE_ENT70\bin>di-preprocess.bat C:\IBM\WCDE_ENT70\search\pre-processConf
ig\MC_10001\DB2  -fullbuild true -localename en_US -force true

com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain logExitCode
INFO: The program exiting with exit code: 1.
Data import pre-processing was unsuccessful. An unrecoverable error has occurred

Fix:  DB2 transaction logs are full.

Check the file size ; Goto DB2CMD
set DB2INSTANCE=MALL
db2 get db config for mall
LOGFILSIZ 2048
Ran this command:
db2 UPDATE db cfg for mall using LOGFILSIZ 4096
Windows services DB2 : restart
After this the pre-processing was successful.