Skip to Content
author's profile photo Former Member
Former Member

How to override abstractPopulatingConverter?

Hi experts!!

I'm working with hybris 5.3. I'm trying to overide abstractPopulatingConverter. Spting declration:

 <alias  name="myPopulatingConverter"  alias="abstractPopulatingConverter"/>
     <bean id="myPopulatingConverter" class="com.myextension.populators.MyPopulatingConverter" abstract="true" />

Java class:

 public abstract class MyPopulatingConverter<SOURCE, TARGET> extends AbstractConverter<SOURCE, TARGET> implements
         PopulatorList<SOURCE, TARGET>
     private static final Logger LOG = Logger.getLogger(MyPopulatingConverter.class);
     public TARGET convert(final SOURCE source) throws ConversionException
     {"Overriding test");
         return super.convert(source);

but when debugging it never enter to this method.

Note that this code works perfectly with hybris 5.2

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2014 at 02:03 PM

    The populator you are trying to override is probably appended to the Converter with its actual name instead of the alias like it should be. Try searching the hybris made -spring.xmls for the original definition and then find where its actual name is used. Same has happened to me earlier, just forgot which populator it was. You need to override the whole Converter definition to get it working.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.