Wednesday, September 10, 2014

Oracle ATG commerce integration with Endeca search

     Exploring new software and tool is always exciting and fun way to learn new stuff. With ATG Commerce v11 Oracle has replaced ATG Search with Endeca search.  I have tried to list out all the steps involved in this integration and focused to highlight the issues/errors I faced with their resolutions. So lets dive in -  

   Installation requirements with download links –
a.      Download and install Java 7 or higher,  I am using jdk 7 update 45 , set the environment variable ( JAVA_HOME = D:\Java\jdk1.7.0_45 )
b.     Install application server of your choice – I have used JBoss Enterprise Application Platform - Version 6.1.0.GA  , you can Download from Jboss site.

c.      Installing Oracle XE 11g  - Download from Oracle website and accept all the default settings.
After you install Oracle XE then create following schemas which will be used at the time of ATG configuration via CIM.

create user crs_switching_a identified by crs_switching_a;
grant connect, resource, dba to crs_switching_a;

create user crs_switching_b identified by crs_switching_b;
grant connect, resource , dba to crs_switching_b;

create user crs_publishing identified by crs_publishing;
grant connect, resource,dba to crs_publishing;

create user crs_production identified by crs_production;
grant connect, resource,dba to crs_production;

commit;

You also need JDBC driver jar , this will be needed later when we do Database configuration in CIM. You can download the jar from Oracle site. I am using ojdbc6.jar , you can use higher versions as well.

d.     Go to https://edelivery.oracle.com and download ATG frameworks and Endeca frameworks (version 11.1)
Downloads for ATG –
Oracle Commerce Platform 11.1
Oracle Commerce ReferenceStore 11.1

Downloads for Endeca search –
Oracle Endeca MDEX Engine 6.5.1
Oracle Endeca Platform Services 11.1.0
Oracle Endeca Tools and Frameworks 11.1.0
Oracle Endeca Content Acquisition System 11.1.0

     Installing Endeca Commerce with Experience Manager  -
Goto http://docs.oracle.com/cd/E51272_02/Common.110/pdf/GettingStarted.pdf  and follow instructions given in chapter 3 and chapter 5 in this guide for Endeca installation and configuration.
Please note we are installing Endeca first as its not dependent on ATG installation. We want to make sure Endeca is working fine before moving to ATG installation and configuration.
You can avoid Developer studio installation as its not needed for this integration.

After a successful installation you can see following services installed. Make sure all 3 Endeca services are started as shown below.



You will also see following folders in your d:\Endeca folder after all Endeca related installation.



Time to validate our Endeca installation – If you have followed all the instructions then your Discover Electronics reference is ready to validate.
Visit - http://localhost:8006/discover/  and you should see the below page


Note: To see workbench screen goto http://localhost:8006/

Installing ATG commerce and reference st -
Now we need to install ATG platform first and then reference store . Visit this link http://docs.oracle.com/cd/E41069_01/CRS.11-0/ATGCRSInstall/html/s0101introduction01.html   for step by step installation guide. 

During installation setup will ask for Jboss and Java path – Specifiy your local folder path where you have installed them. Please note the port I have used here is 8180. 


Just to mention, I have avoided using 8080 as Oracle XE is listening to this port so avoid using.
I am using following ports throughout all installations and configurations here.
8180 for Store
8280 for Publishing
8380 for SSO

Dont forget to set environment variable DYNAMO_HOME = D:\ATG\ATG11.1\home

 Configuring ATG environment using CIM  -
Once ATG platform and CRS installation is completed in step # 3 then we need to launch CIM.  Open a command prompt , navigate to D:\ATG\ATG11.1\home\bin  and run cim.bat
Here mainly you are going to configure following items – I suggest you follow CIM response given in any of the two links provided in the Reference section below. It has all the detailed CIM responses.
  • Set the Administrator Password
  • Product Selection – select 9 as it will select all essentials items to install. further  in AddOns choose *** Single Sign On (SSO)  ***
  • Database Configuration
  • Configure OPSS Security
  • Application Assembly and Deployment

After all the above configurations we are left with following –

a.     Start all the server instance like store , publishing and SSO. Use below commands

               D:\jboss-eap-6.1\bin>standalone.bat --server-config=ATGProduction.xml -b 0.0.0.0
               D:\jboss-eap-6.1\bin>standalone.bat --server-config=ATGPublishing.xml -b 0.0.0.0
               D:\jboss-eap-6.1\bin>standalone.bat --server-config=ATGSSO.xml -b 0.0.0.0

b.      You need to perform a full deployment in BCC – follow direct link for this task here - http://docs.oracle.com/cd/E41069_01/CRS.11-0/ATGCRSInstall/html/s0213configuringandrunningafulldeploy01.html
              If you face issues in accessing BCC then check below troubleshoot section for help.

c.       Ideally after successful full deployment the system should build the index. To verify goto http://localhost:8280/dyn/admin/nucleus/atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin
and check the indexing job status. If its in PENDING or CANCELLED state then you need to manually invoke “Baseline Index”


d.      Once index is completed we finally need to promote the commerce reference store content . please follow instructions here to invoke promote_content - http://docs.oracle.com/cd/E41069_01/CRS.11-0/ATGCRSInstall/html/s0215promotingthecommercereferencesto01.html

e.     Its time now to finally hit the store URL and explore CRS store - http://localhost:8180/crs/storeus



 Common errors troubleshoot –

  • If you get following error while accessing BCC then read solution –  
      Error /atg/portal/framework/PortalObjectResolver      No root community folder for portal 'default' 
      Solutions – Its due to missing BIZUI data, follow below url and see the last section about 
  • You may encounter ORA-01658 error -
       Error - ORA-01658: unable to create INITIAL extent for segment in tablespace LARGE_ 
       Solution - Its due to the fact that Oracle failed to find sufficient contiguous space to allocate   
       INITIAL extent for segment being created. Visit this link for solution -    
  • If you encounter any connection related error - 
       Error - Caused by: java.sql.SQLException: Listener refused the connection with the following  
        error: ORA-12519, TNS:no appropriate service handler found 
       Solution - I increased timeout setting in the pulishing server configuration, also make sure your  
        DB is up and running.
  • You may not be able to login to BCC until you login to SSO (http://localhost:8380/sso/login) . Make sure you run the SSO instance like you start your store or publishing servers.

           References  -
a.      http://iam-saminda.blogspot.co.uk/2013/06/oracle-ecommerce-atg-102.html  - One of the best written blog which details ATG 10 integration with Endeca search.
b.     http://internetmarketing-readme.pricemaniacs.com/oracle-commerce-v11-step-by-step-cim-responses  - Blog lists all the CIM response for ATG environment configuration using CIM.

Bonus -

> How to check the status of the Endeca Log Server -
Visit - http://localhost:15010/stats

If the Log Server is running, above URL returns a confirmation message containing the file name, number of log entries and number of errors.
If it is not running, you will see browser’s default error message.

OUTPUT -
Endeca log server is running.
log file: D:\Endeca\apps\Discover\logs\logserver_output\LogServer.2014_09_10.17_45_40
number of log entries: 9
number of errors: 0

> Anatomy of an Oracle Commerce Experience Manager Site


No comments:

Popular Posts