cancel
Showing results for 
Search instead for 
Did you mean: 

Migration from 5.7 to 6.2

Former Member
0 Kudos

I have created a custom addon in 5.7 named customacceleratorstorefrontcommons to customise some files present in acceleratorstorefrontcommons like bruteforceattaccounter, storefrontauthenticationsuccesshandler and AddressForm. We copied the same bean id(wherever required) to our addon's spring.xml or storefronts spring-security-config.xml. This worked perfectly fine in 5.7. In 6.2 however we are getting the following error:

Error while creating bean "loginAuthenticationSuccessHandler" as property named 'bruteForceAttackCounter' must be of required type [de.hybris.platform.customacceleratorstorefrontcommons.security.BruteForceAttackCounter], but was actually of type [de.hybris.platform.acceleratorstorefrontcommons.security.DefaultBruteForceAttackCounter]

Similar errors were observed in other files as well. Is there a structural change from 5.7 to 6.2 because this approach worked fine in 5.7 but throws BeanCreationException error in 6.2.

Also what should be the approach if one wants to edit files which are present in acceleratorstorefrontcommons ?

former_member570877
Participant
0 Kudos

Hi Arjun,

Have you found any solution for the same?

Thanks, Vikram

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

de.hybris.platform.acceleratorstorefrontcommons.security.impl.DefaultBruteForceAttackCounter as the alias bruteForceAttackCounter. If your custom bean have the same alias, the one loaded will be be the last one loaded in Spring context. Since you migrate, it seems that the definition in acceleratorstorefrontcommons override your custom definition. You have to make sure that your custom bean is loaded last. You can just set acceleratorstorefrontcommons as a dependancy of your extension to load it before.

Former Member
0 Kudos

Thanks for the response. We have checked the class name ..it was proper...we tried changing the bean id and alias to customBruteFroceAttackCounter. However, we are getting a no such bean named customBruteForceAttackCounter is defined error while creating the bean loginAuthenticationSuccessHandler etc. (which is defined in spring-security-config file of my storefront). It is still accepting the property to be of type "acceleratorstorefrontcommons".

Alternatively, we tried moving Bruteforceattackcounter and its implementation to our storefront and created a custom bean for the same. This worked but is it the right way to go about?

Former Member
0 Kudos

Hi Arjun,

This could be something with the bean that you have customized. Would you have a look at your customized acceleratorstorefrontcommons addon spring security file and see how "bruteForceAttackCounter" bean is created.

The class name for your customized bean may be defined with the "de.hybris.platform.customacceleratorstorefrontcommons.security.BruteForceAttackCounter". Could you please change the bean class for your customized bean to default.

Or rename your customized bean to something else and use it.

Thanks