SAP Hybris Assisted Service Module (ASM) - can't generate component

最后都变了- 提交于 2020-06-16 05:27:33

问题


I've installed and tested ASM on my localhost successfully (we use Hybris 1811). Then I wanted to transfer it on our dev server (actually it was only changes in localextensions.xml and regenerated extensionsinfo.xml), so in extensionsinfo.xml of my storefront there is the addon registrated like this:

<requires-extension name="assistedservicestorefront "/>

But it doesn't generate files in views:

[DefaultCMSComponentRendererRegistry] Error processing component tag. currentComponent [AssistedServiceComponentModel (8796814312508@2)] exception: 
File [&#47;WEB-INF&#47;views&#47;responsive&#47;cms&#47;assistedservicecomponent.jsp] not found

I've imported the same .impex file as in the manual for installing ASM (from help.hybris.com) and as on the localhost (cms-content.impex to include component and Jsp).

Even though I run update in HAC, I tried to sync content catalog. I checked extensions in HAC, it contains same ASM extensions as on my local machine: assistedservicefacades, assistedserviceservices, assistedservicestorefront. When I checked the backoffice, the component with that ID is really there and it's in online catalog.

How do I make those files to generate? Or should I somehow override them with my custom views? But I think it would be bad approach.

UPDATE: I also tried to add this entry to project.properties of my storefront:

sikob2cstorefront.additionalWebSpringConfigs.assistedservicestorefront=classpath\:/assistedservicestorefront/web/spring/assistedservicestorefront-web-spring.xml

but then I got the error loading beans:

Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultStorefrontTenantDefaultFilterChainList': Post-processing of FactoryBean's singleton object failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AssistedservicestorefrontFilterListMergeDirective' defined in class path resource [assistedservicestorefront/web/spring/assistedservicestorefront-web-spring.xml]: Cannot resolve reference to bean 'assistedServiceFilter' while setting add; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'assistedServiceFilter' defined in class path resource [assistedservicestorefront/web/spring/assistedservicestorefront-web-spring.xml]: Cannot resolve reference to bean 'assistedServicePathRestrictionEvaluator' while setting bean property 'assistedServicePathRestrictionEvaluator'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'assistedServicePathRestrictionEvaluator' available

回答1:


# Install assistedservicestorefront
# Replace Mystorefront with your storefront extension name
ant addoninstall -Daddonnames="assistedservicestorefront" -DaddonStorefront.yacceleratorstorefront="Mystorefront"

I think you have missed installing the assistedservicestorefront addon or if you've already installed then check whether below changes have taken place on your server.

addoninstall command makes below changes

  • Adds assistedservicestorefront into extensioninfo.xml of your storefront extension

    like <requires-extension name="assistedservicestorefront "/>

  • Generate a new project.properties file from project.properties.template inside assistedservicestorefront, which has following entries.

Replace yacceleratorstorefront with your storefront extension name in the below property.

#Specifies the location of the spring context file added automatically to the global platform application context.
assistedservicestorefront.application-context=assistedservicestorefront-spring.xml

yacceleratorstorefront.additionalWebSpringConfigs.assistedservicestorefront=classpath:/assistedservicestorefront/web/spring/assistedservicestorefront-web-spring.xml


assistedservicestorefront.javascript.paths.mobile=/responsive/common/js/assistedservicestorefront.js;/responsive/common/js/jquery.tablesorter.pager.js;/responsive/common/js/jquery.tablesorter.min.js;/responsive/common/js/Chart.min.js;/responsive/common/js/asm.storefinder.js
assistedservicestorefront.javascript.paths.responsive=/responsive/common/js/assistedservicestorefront.js;/responsive/common/js/jquery.tablesorter.pager.js;/responsive/common/js/jquery.tablesorter.min.js;/responsive/common/js/Chart.min.js;/responsive/common/js/asm.storefinder.js

assistedservicestorefront.css.paths.mobile=/responsive/common/css/assistedservicestorefront.css;/responsive/common/css/storeFinder.css;/responsive/common/css/customer360.css
assistedservicestorefront.css.paths.responsive=/responsive/common/css/assistedservicestorefront.css;/responsive/common/css/storeFinder.css;/responsive/common/css/customer360.css

assistedservicestorefront.redirect.customer_and_cart=/cart
assistedservicestorefront.redirect.customer_only=/my-account
assistedservicestorefront.redirect.error=/
assistedservicestorefront.redirect.order=/my-account/order/%s

assistedservicestorefront.deeplink.link=/assisted-service/emulate

cscokpit.assistedservice.deeplink=true
assistedservicestorefront.profile.cookie.name=profile.tracking.pause

#AIF AJAX call timeout in milliseconds
assistedservicestorefront.aif.timeout=7000

So if you don't want to run addoninstall command in each environment then you can manually do these two changes. You can refer to the generated project.properties file inside your addon and copy all those properties to your storefront's project.properties or local.properteis file and commit the changes.



来源:https://stackoverflow.com/questions/56489757/sap-hybris-assisted-service-module-asm-cant-generate-component

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!