Posts

Showing posts from February, 2018

How to configure MySQL Connector in SAP Hybris ?

Hybris OOTB shipped with HSQL DB, If you want to configure MySQL as Hybris DB then follow the below steps and you go!!
Download MySql connector (.jar), as it is not shipped with Hybris OOTB suiteCopy downloaded connector (.jar) file to ${HYBRIS_BIN_DIR}/platform/lib/dbdriverdirectory Add below properties to your local.properties file db.url=jdbc:mysql://hostname:port/dbName?useConfigs=maxPerformance&characterEncoding=utf8&useSSL=false db.driver=com.mysql.jdbc.Driver db.username=root db.password=password

How to debug Hybris application?

As Hybris runs in builin server, you can debug it as Remote Java Application from Eclipse
start the server with hybrisserver.bat debug (In windows) or ./hybrisserver.sh debug (In Linux)Import all required extensions in eclipseOpen any Java file (cartPageController.java)Open Run > Debug Configurations (shortcut: Alt + r + b)check for Remote Java Application in your left panel of popupRight click on Remote Java Applicaiton and click on newCreate a new configuration by clicking on ApplyClick on Debug to start your debug mode

Configure Apache web server for SAP Hybris - CentOS 7

Configure Apache Virtual Hosts - CentOS 7 This article shows you How I installed and setup Apache web server for my development environment, which is pointing to my backend Application server using proxy.
Install the Apache web server Update your packages on centos 7. sudo yum update Install Apache sudo yum install httpd Start the service sudo service httpd start
Set up Apache server Apache can be configured by httpd.conf file, which also includes all files present under conf.d folder, so let's create .conf file under conf.d folder. sudo vim /etc/httpd/conf.d/webserver.conf Past the code and change configuration based on your requirement, here I need to call App server on HTTPS also don't want SSL handshake.

Apache Mod_proxy '[Error] (13)Permission Denied' Error on RHEL

Apache Mod_proxy '[Error] (13)Permission Denied' Error on RHEL
I go above error when I have installed Apache web server and setup virtual host on CentOS 7. [error] (13)Permission denied: proxy: AJP: attempt to connect to 10.x.x.x:9002 (host.domain.com) failed By looking at error, I started seaching for permission issue and how to resolve it. But finally, I came across a blog which also mentioned the same issue. With help of it, I came to know this is because of SELinux, which ship by default with CentOS. Due to that httpd processes can't make an outbound connection.


This command helps me to fix it. /usr/sbin/setsebool httpd_can_network_connect 1
Once my system rebooted, I again get into the same issue. The reason behind above command has not persisted the changes. To make it persist you need to pass -p /usr/sbin/setsebool -P httpd_can_network_connect 1

How to prevent the system initialization in the Hybris HAC?

Lock the system initialization: You can avoid accidental initialization or update the system by locking those options from HAC. Now when we really want to perform this operation we can unlock it and use the functionality.

To lock the system for initialization and update add the unlocking (system.unlocking.disabled=true) properties to your local.properties file and rebuild your system. Unlock the system initialization: Let's you want to perform an update system from HAC but that option is locked. Don't worry, you can easily unlock it without restarting the system and perform an operation. Set system.unlocking.disabled to false (HAC>configuration)Go to /hac/platform/init, Click on Unlock.Wiki reference
Block/Redirect URL from the webserver: In case, your business stakeholder wants to block initialization and update system from HAC. The idea here is to change its request mapping.

If you have a web server in place for admin console, You can block or redirect /hac/platform/initURL …

Customer specific pricing in the SAP Hybris

How to create customer specific price in SAP Hybris using UserPriceGroup?

1. Create UserPriceGroup INSERT_UPDATE UserPriceGroup ; code[unique=true] ; name[lang=en] ; group1 ; "Group 1" ; group2 ; "Group 2" 2. Assign userPriceGroup to PriceRow  # Macros / replace yourProductCatalog name $productCatalog=yourProductCatalog $catalogVersionStaged=catalogversion(catalog(id[default=$productCatalog]),version[default='Staged'])[unique=true,default='$productCatalog:Staged'] INSERT_UPDATE PriceRow ; product(code, $catalogVersionStaged)[unique=true] ; currency(isocode)[unique=true] ; price ; net[unique=true,default=false] ; ug(code)[allownull=true] ; unit(code)[default=pieces] ; PRODUCT-1 ; CAD ; 93.60 ; false ; group1 ; …