Elastic APM agent breaks SAP Commerce (Hybris) application.
Most of the application works fine after adding the agent, but the Hybris backoffice application is broken. The Hybris backoffice application uses the ZK Framework and after adding the agent, a lot of components cant resolved anymore.
Java version: Oracle JDK 11.0.6
Kibana version:7.6.1
Elasticsearch version:7.6.1
APM Server version:7.6.1
APM Agent language and version:Java elastic-apm-agent-1.14.0
Log/Errors:
First Error (Server Error 500):
SEVERE: Servlet.service() for servlet [zkLoader] in context with path [/backoffice] threw exception
com.hybris.cockpitng.util.zip.UnsupportedZipEntryException: ZipEntry with name: 'cockpitng/widgets/actions/salesunitcreateaction/definition.xml' is not supported!
From JavaDoc:
SafeZipEntry class that prevents Zip Slip vulnerability by disallowing ZipEntries with names that target outside directory, eg. ../foo.txt. In such cases de.hybris.platform.util.zip.UnsupportedZipEntryException is thrown.
After reloading the page (errors seems to be related to the first one as definitions can't be loaded):
2020-04-09 00:14:36.381 [hybrisHTTP4] WARN co.elastic.apm.agent.impl.ElasticApmTracer - Max spans (500) for transaction '' 00-0c11cfbe9f2643e3001d6ec85c821dd9-1a03f39f5ab70b84-01 (5505b7a3) has been reached. For this transaction and possibly others, further spans will be dropped. See config param 'transaction_max_spans'.
ERROR [hybrisHTTP4] [DefaultWidgetInstanceService] Unable to load widget definition for code com.hybris.ruleenginebackoffice.listeners.swapcomplete
ERROR [hybrisHTTP4] [DefaultWidgetInstanceService] Unable to load widget definition for code de.hybris.platform.promotionenginebackoffice.treenodeselector
ERROR [hybrisHTTP4] [DefaultWidgetInstanceService] Unable to load widget definition for code de.hybris.platform.promotionenginebackoffice.treenodeselector
ERROR [hybrisHTTP4] [DefaultWidgetInstanceService] Unable to load widget definition for code com.hybris.cockpitng.initScriptingAdvancedSearch
ERROR [hybrisHTTP4] [DefaultWidgetInstanceService] Unable to load widget definition for code com.hybris.cockpitng.initScriptingAdvancedSearch
ERROR [hybrisHTTP4] [DefaultWidgetInstanceService] Unable to load widget definition for code com.hybris.cockpitng.initDpdAdvancedSearch
ERROR [hybrisHTTP4] [DefaultWidgetInstanceService] Unable to load widget definition for code com.hybris.cockpitng.initDpdAdvancedSearch