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.


Saturday, December 12, 2015

Issue with migrating BPEL from Orace SOA 11g to Oracle SOA 12C - An unexpected Server error has occurred in JDeveloper

Issue with migrating  BPEL from Orace SOA 11g to Oracle SOA 12C - An unexpected Server error has occurred in JDeveloper

Issue:

Trying to migrate some composites from Oracle SOA 11.1.1.5 to 12c. But after I load the project in JDeveloper 12c, its throwing the error "An unexpected Server error has occurred in JDeveloper" and its giving the options like 1)"save all files and exit" 2) Exit without saving 3) continue.

Selected “continue" option and after that tried opening "*.BPEL" file and its completely blank and also all the wires were disappeared from "Composite.xml".

1) Open your SOA project in JDeveloper version 11.1.1.5 and create the SAR ( deployable ) file into your deploy folder. ( Ex: scaSample_rev001.jar )

2) Close the JDeveloper 11.1.1.5 and now open JDeveloper 12c ,

3) File -> Import -> select "SOA Archive Into SOA Project" -> OK -> Next -> Composite Archive Browse to the above SAR file created ( Ex: scaSample_rev001.jar )

4) The composite.xml  and BPEL file will show the content now


Extension function error: Method not found 'setFlowInstanceTitle – Oracle SOA 12C(12.1.3)

Extension function error: Method not found 'setFlowInstanceTitle – Oracle SOA 12C(12.1.3)

We were getting the below exception while trying to set the title for composite instance in 12.1.3

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/<https://urldefense.proofpoint.com/v2/url?u=http-3A__schemas.xmlsoap.org_soap_envelope_&d=AwMFAw&c=4ZIZThykDLcoWk-GVjSLm9hvvvzvGv0FLoWSRuCSs5Q&r=8qQMQBAbDh32F7DyV0m3CH9kXdKLrWigXrO0p0cWQEir0H7fTd2J8_NC1cElkvWv&m=dRon_z2evK4VjWGP0oY9FibkrtcDAvecx7CgL26qjC0&s=7zNuyckO1P0yz595V1RJcVFjt7td9IRnkJf6OEWgRdE&e=>">
  <env:Header>
     <tracking:faultId xmlns:tracking="http://oracle.soa.tracking.core.TrackingProperty<https://urldefense.proofpoint.com/v2/url?u=http-3A__oracle.soa.tracking.core.trackingproperty_&d=AwMFAw&c=4ZIZThykDLcoWk-GVjSLm9hvvvzvGv0FLoWSRuCSs5Q&r=8qQMQBAbDh32F7DyV0m3CH9kXdKLrWigXrO0p0cWQEir0H7fTd2J8_NC1cElkvWv&m=dRon_z2evK4VjWGP0oY9FibkrtcDAvecx7CgL26qjC0&s=DwqbKOWHhDFBuDf9yc8Ur29O_D7KfSBO_exS-pWTjNE&e=>">10002</tracking:faultId>
  </env:Header>
  <env:Body>
     <env:Fault>
        <faultcode>env:Server</faultcode>
        <faultstring>An error occurs while processing the XPath expression; the expression is oraext:setFlowInstanceTitle("Title").</faultstring>
        <faultactor/>
        <detail>
           <exception>XPath expression failed to execute.
An error occurs while processing the XPath expression; the expression is oraext:setFlowInstanceTitle("Title").
The XPath expression failed to execute; the reason was: Extension function error: Method not found 'setFlowInstanceTitle'.
Check the detailed root cause described in the exception message text and verify that the XPath query is correct.</exception>
        </detail>
     </env:Fault>
  </env:Body>
</env:Envelope>


To resolve the issue apply the patch with no 18310693.


Sunday, December 6, 2015

Configuring same short URL/Vanity URL for different sites with https – AEM/Adobe CQ5

This post will explain how to configure same short URL/Vanity URL for different sites that is accessible through https in Adobe CQ5/AEM.

Recently we had a scenario to be implemented, two different websites needs to be accessed with same URL and with https protocol.
e.g
https://example1.com/en.html
https://example2.com/en.html

Both the sites are mapped to different nodes as below

https://example1.com/en.html  --> /content/example1/en
https://example2.com/en.html --> /content/example2/en

Create the redirect rules in dispatchers, inside the corresponding virtual host (httpd.conf) to redirect the http request to https and to shorten the URL’s .

RewriteRule ^/content/example1/(.*)$  /$1 [NE,L,R=301]

RewriteCond %{HTTPS} off
RewriteRule ^/$ https:// example1.com/en.html
RewriteRule ^/en.html https:// example1.com/en.html
RewriteRule ^/en/(.*)$ https:// example1.com/en/$1

Repeat the same for example2.com and for all the dispatchers.

Mapping in publisher :

Go to <<AEM Publisher Host>>:4503/system/console/configMgr with admin credentials. Search for Apache Sling Resource Resolver, and change the value of mapping location from /etc/map to /etc/map.publish