Posts

Showing posts from July, 2018

How to create a Cronjob using Groovy script in SAP Hybris

You can skip  scenario  and  root cause  section below, if you only interested in the groovy script cronjob steps Scenario When we create the ProductReference inside the Product(for stage catalog) using Impex/API. The owning product is not getting sync when we do a catalog sync. Root Cause As per  wiki Modification time issues: Keep in mind that changing a part-of item does not mark its owning item modified automatically. To allow synchronization to schedule the owning item correctly you have to mark it modified manually, preferably inside the part-of item's business code. So here, we can write After Save Event or groovy script to update its owning item(Product) modification time. Now let's see, how can we handle this using groovy script in SAP Hybris. Solution To configure the groovy script as a cronjob, you have to create an instance of Script  - the item type where the script content is going to store. ScriptingJob  - a new ServicelayerJob i

How to Install temporary Hybris license?

LICENSE VERIFICATION HAS FAILED! Your demo/develop license has expired, it is valid only for 30 days. How to install temp SAP Hybris license? Don't worry, you can install a temporary license. To install a temporary license 1) Remove  installedSaplicenses.properties  from the license folder \hybris\config\licence 2) Go to the Platform directory and run the  ./license.sh -temp CPS_SQL  or  license.bat -temp CPS_SQL . If you are using DB other than HSQL you can choose the right command based on your DB.   Windows run  license.bat  instead of  ./license.sh OOTB HSQL DB ./license.sh -temp CPS_SQL MySQL DB ./license.sh -temp CPS_MYS Oracle DB ./license.sh -temp CPS_ORA SQL Server DB ./license.sh -temp CPS_MSS SAP Hana DB ./license.sh -temp CPS_HDB Once you install using the above command, You will get a message like First temporary license key installed. 3) Verify your license by running  ./license.sh -show , which will give you System, Hardwar

[Resolved] Cannot find CMSSite associated with current URL

Error "Cannot find CMSSite associated with current URL". This is because you are not telling Hybris which site you want to access. Let's first see all the possible solutions and then will go into other details. There are three ways to let Hybris know about the site you are trying to access 1. Pass the CMSSite ID as a request parameter Simply pass your siteID as a request parameter(?site=SiteID) in your first request which helps the Hybris to understand which site you are trying to access. Let's say I'm trying to access the powertools site then URL would be  https://localhost:9002/yacceleratorstorefront?site=powertools 2. Access site using  http://<siteID>.local:9001/ Access site with siteID as DNS name. You can make 127.0.0.1 host with  <siteID>.local . Let's say I want to access a powertools (It's CMSSite id for powertools), then add an entry like  127.0.0.1 powertools.local  in your host file and then access your site using http:/