If someone uses custom tomcat for hybris, be aware that latest version of Tomcat 8.5.32 is not compatible with all versions of hybris and datahub due to implementation in Tomcat of Java EE v.8 specification(EE 5.3.3), which defines that deployment should fail if the lookup element of an annotation or the lookup-name element in a deployment descriptor entry does not specify a name with an explicit java: namespace. This breakable changes was added in apache tomcat commit.
Smartedit works perfectly on local environment, but after deploying on development environment (which is deployed with CI/CD pipeline) smartedit stops responding with endless loading.
OOTB hybris provides ant unittests command to run unit and integration tests, which are pretty low level and requires additional configuration to simplify run and result collection for DevOps. Below you can find configuration for buildcallbacks.xml, which you can just copy-paste into any hybris project (version 6.0+) and significantly simplify DevOps job required for setup of CI/CD pipeline.
Starting catalog synchronization with CatalogVersionSyncJob in a bussiness process action leads to “Error in worker SyncWorker : Entity not found ( pk = 8794627343487 name = ‘de.hybris.platform.persistence.processing_CronJob’ type code = ‘501’ db table = ‘cronjobs’)”. I didn’t find a way to fix such behaviour of syncing inside business process action, but I resolved this issue by triggering event from process action and running SyncJob in event listener. For me sync performs well only via SetupSyncJobService, performing job via CatalogSynchronizationService causes exception in SyncWorker.
Sometimes simple tasks like “On base product price change also change price for all its sub products” can lead to long nights of debugging and seeking of workarounds. Sounds like this task should be easy for implementation. Create PrepareInterceptor, check if price was changed with InterceptorContext.isModified() method, iterate all sub products and put the new price.
From time to time I have been receiving from customer support service messages that filter functionality on PLP returns no results. Finally, after 1 year of such messages our QA team was able to reproduce the issue. The root of the issue is too many filters, which causes creation of very long requests, which can’t be processed by solr server. Solr server is shipped with Jetty, which has 8KB limit to URL length. You can change this limit by adding <Set name="requestHeaderSize"> 200000 </Set> to server/contexts/solr-jetty-context.xml.
After discussions with DevOps Lead and Tech Lead we decided that in our case will be better to force hybris solr client to use POST requests instead of GET and don’t change solr server OOTB settings (by default Jetty has limitation to 200KB for POST body). Unfortunately hybris doesn’t provide any configuration for such switching, and it must be done manually by overriding DefaultFacetSearchStrategy.
For frontend developers usually is not very clear how server variables are injected in JSP and what data is presented in this variables. To simplify their work could be used JSTL function, which will output server variable in json format.
I had a task to optimize user creation and storing. Before changes on each anonymous checkout a new user was creates with ID in format RANDOM_UID|USER_EMAILand we had a lot of users who used anonymous checkout more than once. After changes only one user with ID in format USER_EMAIL for all anonymous checkouts was used. As a part of the task I need to migrate all old users to new format users. First version of moigration script had an execution time took more than 3 days for processing around 7 millions of people.