Saturday, January 27, 2018

How to integrate Adobe Experience Manager(AEM) and SAP Hybris through OOB connector

How to integrate Adobe Experience Manager(AEM) and SAP Hybris through OOB connector


This post explains the detailed steps for AEM and Hybris integration through OOB connector. AEM comes with default Hybris connector and sample demo site(should be downloaded via package manager), the steps covered in the post is for integrating AEM 6.3 with Hybris 6.1 but the same steps works for other AEM and Hybris versions with minimal changes.

AEM Configuration:


Install JDK 8
Install AEM 6.3 server
Install cq-geometrixx-all-pkg-5.10.68.zip, cq-geometrixx-hybris-content-6.3.2.zip and cq-hybris-content-6.3.2.zip packages from package share (I am considering geo-metrixx for demo, we.retail should be the recommended one in AEM 6.3)

aem-hybris-integration-packages

Change the Hybris server version in "Day CQ Commerce Hybris Configuration", ignore to default value if the specified version is not listed.

aem-hybris-integration-hybris-version

Change the Hybris OAuth endpoint in "Hybris OAuth Handler" based on the Hybris version, /authorizationserver/oauth/token for Hybirs 6 and later and /rest/oauth/token for earlier Hybris versions   - This step can be ignored for AEM 6.3 as the connectes defaults the values based on the Hybris version selected in the previous step.

aem-hybris-integration-OAuth-url

If the OAuth URL is not configured with correct value then the below exception will be displayed in error log

com.adobe.cq.commerce.hybris.impl.OAuthHandler Server did not respond with 2xx -> authentication failed.



Friday, December 18, 2015

How to configure Caching algorithm for better performance in Hybris platform?

How to configure Caching algorithm for better performance in Hybris platform?

In local.properties file add/change the values of the following properties.

#Possible vales are FIFO(default), LRU and LFU. Default value is FIFO
cache.evictionpolicy=FIFO
#Possible vales are FIFO (default), LFU and LRU. Default value is FIFO
regioncache.entityregion.evictionpolicy=FIFO

#Possible vales are FIFO (default), LFU and LRU. Default value is FIFO
regioncache.typesystemregion.evictionpolicy=FIFO

#Possible vales are FIFO (default), LFU and LRU. Default value is FIFO
regioncache.querycacheregion.evictionpolicy=FIFO

Change the algorithm to either LFU or LRU based on your requirements for better performance.


How to disable all the cron jobs in Hybris platform?

How to disable all the cron jobs in Hybris platform


In local.properties file change the cronjob.timertask.loadonstartup property to false

cronjob.timertask.loadonstartup=false

Add the property if it is not there already.

This flag will not allow the system to start the cron jobs automatically after server restart.


Tuesday, January 27, 2015

How to configure Hybris Server to use Oracle Data Base

How to configure Hybris Server to use Oracle Data Base

The following steps can be followed to configure the Hybris server to use Oracle database.

Configure database user:

Login to Oracle database and create the required user and provide the grants.
create user <username> identified by <password> default tablespace <table space name> temporary tablespace <table space name>;
grant connect, resource to <username>;

Configure Hybris server

Copy the oracle driver (e.g. ojdbc6.jar) to /hybris/bin/platform/lib/dbdriver

Go to /hybris/config and edit local.properties by adding the following:
db.url=jdbc:oracle:thin:Username/password//servername:port-id/database name
db.driver=oracle.jdbc.OracleDriver
db.username=xxxxxxx
db.password=xxxxxxx

Verify the configuration details and initialize

Access the Hybris server URL and check the following details:
                   a) Database Name displayed
                   b) User name Displayed
                   c) Database Driver Displayed.
                   d) Check for the default objects (e.g. product, cart etc) already selected.

Click on initialize button on the top of the page. It will take some time and initialize all the tables, table spaces and schemas required.

After successful completion of initialization the server gets automatically restarted, or else it will display errors which need to be rectified.