Followers

Tuesday, March 18, 2014

Updating OOB toolkit with FEP5 to FP8/FEP7
------------------------------------------------------------

  1. Apply FixPack 8

  • Installation Manager > Update
  • Select WC Developer.
  • Follow instructions

  1. Apply FEP7

  • Update RAD test server to 7.0.0.31 and developer to 7.5.5.5 iFix1 ( select IBM Software Delivery Platform , DO NOT select update all and do update). This will ask to update installation mgr to 1.7.2 also.
  • Installation Manager> Update  ( not Install as new)
  • Select WC Developer.
  • Follow Instructions



Solr Issues:
After installing FEP7 on an FEP5 toolkit that has Aurora store, you won’t see departments when to take aurora site.
You will get " The store has encountered a problem processing the last request. Try again later. If the problem persists, contact your site administrator."
This means Solr is not indexed properly.


Solution:

            Stop server and run setupSearchIndex.

         (Build search index for the new languages:  )   
Stop server.
DELETE folder -  C:\WCDE_ENT70\search\solr\home\MC_10001

cd C:\WCDE_ENT70\components\foundation\subcomponents\search\bin>
>setupSearchIndex.bat -masterCatalogId 10001
( warnings are ok .. Make sure wc-search.xml is generated in C:\WCDE_ENT70\workspace\WC\xml\config\com.ibm.commerce.catalog-ext and Search\xml\config\com.ibm.commerce.catalog-ext)

Start server
>di-preprocess.bat C:\WCDE_ENT70\search\pre-processConfig\MC_10001\DB2 -onelevel true

>di-buildindex.bat -masterCatalogId 10001
   
Issues:
1) ADATTR issue while running  di-preprocess.bat

The value of a host variable is too large for its corresponding use.  Host variable=2. ERRORCODE=-4461, SQLSTATE=42815

Solution:
Edit C:\WCDE_ENT70\search\pre-processConfig\MC_10001\DB2\wc-dataimport-preprocess-attribute.xml

<_config:table definition="CREATE TABLE TI_ADATTR_0_#lang_tag# (CATENTRY_ID BIGINT NOT NULL, ATTRIBUTES VARCHAR(16000), PRIMARY KEY (CATENTRY_ID))" name="TI_ADATTR_0_#lang_tag#"/>

Change to

<_config:table definition="CREATE TABLE TI_ADATTR_0_#lang_tag# (CATENTRY_ID BIGINT NOT NULL, ATTRIBUTES CLOB, PRIMARY KEY (CATENTRY_ID))" name="TI_ADATTR_0_#lang_tag#"/>


And restart server , run di-preprocess.bat C:\WCDE_ENT70\search\pre-processConfig\MC_10001\DB2 -onelevel true   
                
2)If getting error in buildindex:
FINER: ENTRY _INFO_DI_BUILDINDEX_EXIT_FAILURE_UNRECOVERABLE_ERROR [Ljava.lang.Object;@5b825b82
Mar 18, 2014 11:34:36 AM com.ibm.commerce.foundation.dataimport.util.DataImportHelper getLocalizedMessage
FINER: RETURN Data import process was unsuccessful. An unrecoverable error has occurred.
Mar 18, 2014 11:34:36 AM com.ibm.commerce.foundation.dataimport.util.DataImportHelper printException
INFO: Data import process was unsuccessful. An unrecoverable error has occurred.
Throwable occurred: org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Server at http://localhost:80/solr returned non ok status:500, message:Internal Server Error
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:372)


Solution:
Add port 80 to C:\WCDE_ENT70\workspace\WC\xml\config\com.ibm.commerce.catalog-ext\wc-search.xml
 <_config:common-http URL="http://localhost/solr"

Change to
 <_config:common-http URL="http://localhost:80/solr"

And run preprocess and buildindex again.


3) CommonsHttpSolrServer  solr issue:
[3/18/14 14:21:58:554 EDT] 00000035 webapp        E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[/Aurora/Widgets/Search/Search.jsp]: com.ibm.ws.jsp.JspCoreException: JSPG0049E: /Aurora/Widgets/Search/Search.jsp failed to compile :

JSPG0225E: An error occurred at line: 20 in the statically included file: /Aurora/Widgets/Search/JSTLEnvironmentSetupExtForSearch.jspf
JSPG0093E: Generated servlet error from file: /Aurora/Widgets/Search/Search.jsp

C:\WCDE_E~1\wasprofile\temp\localhost\server1\WC\Stores.war\Aurora\Widgets\Search\_Search.java : 12 : Only a type can be imported. org.apache.solr.client.solrj.impl.CommonsHttpSolrServer resolves to a package

JSPG0225E: An error occurred at line: 39 in the statically included file: /Aurora/Widgets/Search/JSTLEnvironmentSetupExtForSearch.jspf
JSPG0093E: Generated servlet error from file: /Aurora/Widgets/Search/Search.jsp

C:\WCDE_E~1\wasprofile\temp\localhost\server1\WC\Stores.war\Aurora\Widgets\Search\_Search.java : 249 : CommonsHttpSolrServer cannot be resolved to a type

JSPG0225E: An error occurred at line: 40 in the statically included file: /Aurora/Widgets/Search/JSTLEnvironmentSetupExtForSearch.jspf
JSPG0093E: Generated servlet error from file: /Aurora/Widgets/Search/Search.jsp

C:\WCDE_E~1\wasprofile\temp\localhost\server1\WC\Stores.war\Aurora\Widgets\Search\_Search.java : 250 : CommonsHttpSolrServer cannot be resolved to a type



Solution:


Update your storefront JSP files:
  1. Open the following file:
    For the Aurora starter store:
  1. Find the following snippet:
    <%@ page import="org.apache.solr.client.solrj.impl.CommonsHttpSolrServer" %>
  2. Replace it with the following snippet:
    <%@ page import="org.apache.solr.client.solrj.impl.HttpSolrServer" %>
  3. Find the following snippet:
    if(solrServer instanceof CommonsHttpSolrServer ){
                serverURL = ((CommonsHttpSolrServer )solrServer).getBaseURL();
  4. Replace it with the following snippet:
    if(solrServer instanceof HttpSolrServer){
                serverURL = ((HttpSolrServer)solrServer).getBaseURL();
  5. Save your changes and close the file.








Thursday, April 4, 2013

Solr with Remote DB.

Solr with Remote DB.

Issue:

I tried to connect to SOLR ( Preprocess and build index). It failed with following error.


INFO: Data import process was unsuccessful. An unrecoverable error has occurred.
Throwable occurred: org.apache.solr.client.solrj.SolrServerException: org.apache.commons.httpclient.ConnectTimeoutException: The host did not accept the connection within timeout of 100 ms
                at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:480)
                at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:246)
                at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:105)
                at com.ibm.commerce.foundation.dataimport.process.util.SolrUtil.makeDataImportNoCleanCommand(SolrUtil.java:301)
                at com.ibm.commerce.foundation.dataimport.process.DataImportProcessorMain.fullDataImport(DataImportProcessorMain.java:1379)
                at com.ibm.commerce.foundation.dataimport.process.DataImportProcessorMain.executeDIH(DataImportProcessorMain.java:759)
                at com.ibm.commerce.foundation.dataimport.process.DataImportProcessorMain.main(DataImportProcessorMain.java:312)


Then I tried to increase timeout like this:
C:\WCDE_ENT70\bin> di-buildindex.bat -masterCatalogId 10001 -solrConnTimeout 15000

Then I got:
org.apache.solr.client.solrj.SolrServerException: java.net.ConnectException: Connection refused: connect

SOLUTION:

Connection setting in DB for SOLR was wrong in remote DB ( which is running in Linux)
I have to update the tables SRCHCONF and SRCHCONFEXT to point it to local toolkit server.

update SRCHCONF set config='IndexScopeTag=0,SearchServerPort=80,SearchServerName=localhost,PreProcessConfigDirectory=C:\WCDE_E~1\search\pre-processConfig\MC_10001\DB2' where indextype='CatalogEntry';

update SRCHCONF set config='IndexScopeTag=1,SearchServerPort=80,SearchServerName=localhost,PreProcessConfigDirectory=C:\WCDE_E~1\search\pre-processConfig\MC_10001\DB2\CatalogGroup' where indextype='CatalogGroup';

update SRCHCONFEXT set config ='SearchServerPort=80,SearchServerName=localhost';


Restarted server and it worked. Earlier these config values were pointing to wrong servers ( Linux machines).

Server and port names should match with workspace\WC\xml\config\com.ibm.commerce.catalog-fep\wc-search.xml

Wednesday, March 6, 2013

Restore DB instance

Commands used  to restore WCD2 to WCD1 for a new DB2 instance

  • ​​​db2 restore database WCD2 from /db2backup/WCD1/backup on /db2/WCD1 into WCD1   

(or)
db2 restore db wcd2 from /db2backup/WCD1/backup on /db2/WCD1 into WCD1 logtarget /tmp     

  • db2 rollforward db wcd1 to end of logs and stop overflow log path (/tmp) noretrieve

How to configure your WebSphere Commerce instance to point to a new database (DB2)

   Refer: http://www-01.ibm.com/support/docview.wss?uid=swg21252738

   
  •  Make a backup of this file:
    /opt/IBM/WebSphere/CommerceServer70/instances/comm01/xml <instanceName>.xml
    and save it as
    /opt/IBM/WebSphere/CommerceServer70/instances/comm01/xml <instanceName>.xml.original​
  • Edit the DB name key in your <instanceName>.xml (comm01​.xml):
     <Database>
          <DB DBAHomeDir=""
              DBAName=""
              DBAPwd=""
              DBHost="myhost.ibm.com"
              DBMSName="DB2"
              DBNode="mynode"
              DBServerPort=""
              DBUserHomeDir=""
              DBUserID="myuserid"
              DBUserPwd="Minsq+r9JqRrQSWb4dmuWQ=="
              DefaultLang=""
              JDBCDriverType="native"
              OraUserID=""
              RemoteDB="false"
              RunDB2SG="false"
              ServiceName=""
              StagingEnable="false"
              active="true"
              name="MyDBName" />
        </Database>
  • Save your changes.
         
  • Stop and restart your servers. 
  • After above step we need to update EAR as per below notes.
               http://pic.dhe.ibm.com/infocenter/wchelp/v6r0m0/index.jsp?topic=%2Fcom.ibm.commerce.admin.doc%2Fconcepts%2Fccmxml.htm

               http://pic.dhe.ibm.com/infocenter/wchelp/v6r0m0/index.jsp?topic=%2Fcom.ibm.commerce.admin.doc%2Frefs%2FrcmUpdateEAR.htm​


          /opt/IBM/WebSphere/CommerceServer70/bin
          [wasadmin@nrnlx447 bin]$ ./config_ant.sh -DinstanceName=comm01 UpdateEAR
     
     This should update wc-server.xml file but didn't work so has to update it manually as mentioned in next step.
    • Go to was admin console and update database connections manually.
           ​Resources > JDBC > JDBC providers
            

           Click on WebSphere Commerce Search DB2 JDBC Provider comm01 > Click DataSources under Additional Properties.
           

             Again click on WebSphere Commerce Search DB2 DataSource comm01 from the datasources list > Configuration Page will be opened
             Edit the DB nodes to desired values, apply and save.

           
             Repeat this for rest of the JDBC providers for comm01.
             Restart server.

EJB Deploying error in QuickBuild


EJB Deploying error in QuickBuild

   Error
22:33:28,395 INFO  - [wsejbd​eploy] Throwable occurred: java.lang.NoSuchFieldError: com/ibm/datatools/internal/core/util/EngineeringOptionID.GLOBAL_VARIABLE
22:33:28,395 INFO  - [wsejbdeploy]     at com.ibm.datatools.db2.luw.ddl.LUWDdlGenerator$SingletonOptionDependency.getSingletonObject(LUWDdlGenerator.java:2414)
22:33:28,395 INFO  - [wsejbdeploy]     at com.ibm.datatools.db2.luw.ddl.LUWDdlGenerator.getAllContainedDisplayableElementSetDepedency(LUWDdlGenerator.java:1602)

  Cause

     This is a known issue cause by two old data tool plugins that existed in "deploytools/itp/plugins/" directory:
  • com.ibm.datatools.core_3.0.101.v200811190853.jar
  • org.eclipse.datatools.modelbase.sql.query_1.0.1.v200811050430.jar

  Resolving the problem

  1. Remove the old data tool plugins 
  • ​Navigate to "deploytools/itp/plugins/" directory
  • Back up the following jar files
    • com.ibm.datatools.core_3.0.101.v200811190853.jar
    • ​org.eclipse.datatools.modelbase.sql.query_1.0.1.v200811050430.jar
  • Remove the jar files from step #2 in the "deploytools/itp/plugins/" directory
  • Navigate to "/opt/IBM/WebSphere/AppServer/deploytool/itp/configuration" 
  • Back up the "/configuration" directory
  • Delete all the files and directories within "/configuration" directory
  1. Note: Except "config.ini" if present. 
Run wcbd-build again and verify the result.

Thursday, February 28, 2013

WCS Trobleshooting Tips - WC Publishing failed.

WCS Trobleshooting Tips - WC Publishing failed.

    Error:
The publish encountered some problems and the application may not have been installed or it may have been successfully installed but was unable to start. View the Details to display the exceptions and server logs that occurred during the publish.  
    Solution:

  • Remove WC projects from server using add/remove projects. 
  • Stop server and close RAD
  • Delete all files from following locations ( Please have a back up of these files before deleting)
​- WCDE_installdir/wasprofile/config/cells/localhost/cus
- WCDE_installdir/wasprofile/config/cells/localhost/blas
- WCDE_installdir/wasprofile/wstemp
- WCDE_installdir/wasprofile/temp
- WCDE_installdir/wasprofile/config/temp​

  • ​Open RAD and start server, then add WC.
  •  If adminstrative console is not coming up you may have to reinstall it. Try opening adminstrative console from server > Adminstration > Run Administrative Console.


      
  • Steps for installing server admin console​ ( server should be running)

  1. Open cmd prompt as adminstrator
  2. Navigate to C:\WCDE_ENT70\wasprofile\bin>
  3. For uninstalling​ wasadmin issue following command   C:\WCDE_ENT70\wasprofile\bin>​ wsadmin.bat -f deployConsole.py remove     
  4. For installing wasadmin issue following command C:\WCDE_ENT70\wasprofile\bin>​ wsadmin.bat -f deployConsole.py install
  5. Successfully installed screen
       

        After this step do a complete clean and build , remove wc , stop server, start server , add wc project.

Friday, June 10, 2011

Common Commands used in Member Module




Address:
-AddressAdd   :  Adds new entry in address table
-AddressDelete :  Deletes entry from address table
-AddressUpdate :   Updates specified address by creating a copy of address with updated values and make old one Temporary –‘T’
-AddressCheck :   Checks if user has at least one permanent address

Registration CMDs:
-  UserRegistrationAdd  :
-  Creates a store user.
- Information for new users is stored in the MEMBER, USERS, USERREG, MBRREL, MBRROLE, USERPROF, BUSPROF, USERDEMO, ADDRESS, and ADDRBOOK database tables.


-  UserRegistrationUpdate :  Updates registered user information. User should be logged in.

Logon and Logoff Cmds:
-          Logon – Logs user in
-          Logoff  - Log off user
-          ResetPassword -  Forgot password flow, tries to reset password by proving logon id and challenge answer.