I followed the instruction from the below wiki post
https://wiki.hybris.com/display/forum/hot+folder+error+file
and extended AbstractImpexRunnerTask and override the processFile method which sends an email on error during CSV processing. I am trying to upload a Category CSV file with an error. Below CSV has additional ';' in the first line.
bs-lorealbrandcasting123;L'Oreal Casting Creme;;;L'Oreal Casting Creme;;
bs-lorealbrandabsolue;L'Oreal Mousse Absolue;L'Oreal Mousse Absolue;;
Impex Header
<bean id="batchMicroSiteCategoryConverter" class="de.hybris.platform.acceleratorservices.dataimport.batch.converter.impl.DefaultImpexConverter">
<property name="header">
<value>#{defaultImpexCategoryHeader}
#Insert Categories
INSERT_UPDATE MicrositeCategory;code[unique=true];name[lang=$lang];description[lang=$lang];allowedPrincipals(uid)[default='customergroup'];$catalogVersion
</value>
</property>
<property name="impexRow">
<value>;{+0};{1};{2};;;</value>
</property>
</bean>
Q.1 - Uploading this file generates an error on line 1 and inserts the second category but it does not call my class which extends AbstractImpexRunnerTask.
<int:service-activator input-channel="batchFilesTranHeader" output-channel="batchFilesImp" ref="batchHeaderRunnerTask"
method="execute" />
<bean id="batchHeaderRunnerTask" class="com.superdrug.core.dataimport.batch.task.AbstractCSVUploadImpexRunnerTask">
<lookup-method name="getImportService" bean="importService" />
<lookup-method name="getImportConfig" bean="importConfig" />
<property name="hostUrl" value="#{hybrisProperties['website.hybris.http']}" />
</bean>
Q2 - If I reverse the two lines in CSV file as below there are no errors generated and it does call my class which extends AbstractImpexRunnerTask and inserts both the categories.
bs-lorealbrandabsolue;L'Oreal Mousse Absolue;L'Oreal Mousse Absolue;;
bs-lorealbrandcasting123;L'Oreal Casting Creme;;;L'Oreal Casting Creme;;
This is very strange behavior and I am not able to understand what is causing this.. If anyone can throw some light on this it will be really helpful.