cancel
Showing results for 
Search instead for 
Did you mean: 

Hot folder import using external file path

Former Member
0 Kudos
           <constructor-arg value="#{configurationService.configuration.getProperty('xyz.base.hotfolder.location')}" />
    </bean>


I have given the location ---> xyz.base.hotfolder.location=c:/hot_folder_test

and Started the server in normal like hybrisserver.bat

When I am try to import csv file through hot folder from c:/hot_folder_test I am encounter with the following exception.

INFO [task-scheduler-10] (junit) [TenantActivationAspect] Setting tenant <>[458629275] on the current thread Thread[task-scheduler-10,5,main] ERROR [task-scheduler-10] [ErrorHandler] unexpected exception caught org.springframework.messaging.MessageHandlingException: ; nested exception is de.hybris.platform.acceleratorservices.dataimport.batch.BatchException: system not initialized at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:78) ~[spring-integration-core-4.1.2.RELEASE.jar:?] at org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(ServiceActivatingHandler.java:71) ~[spring-integration-core-4.1.2.RELEASE.jar:?] org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:99) ~[spring-integration-core-4.1.2.RELEASE.jar:?] at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:78) ~[spring-integration-core-4.1.2.RELEASE.jar:?]

Could you

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Srinivasa Rao,

You might be putting the xyz.base.hotfolder.location' in your project.properties. And for which class you are setting this property. If you can provide the bean instanciation we can check.

Former Member
0 Kudos

Hi Srinivasa Rao

did you get any solution for this? How you implemented reading csv from custom path using hot folder

Former Member
0 Kudos

Hello, It worked for me like this:

constructor-arg value="C:\hotfolder"

Regards!

0 Kudos

Hi

Make sure your location should be similar to

     <constructor-arg value="#{baseDirectory}/${tenantId}/apparel"/>
 </bean>

i.e baseFolder should include tenant id and inside the tenandid place your file

Regards, Chaitanya

Reference: \bin\custom\toko\tokocore\resources\tokocore\integration\hot-folder-store-apparel-spring.xml

Former Member
0 Kudos

Hi Chaitanya,

Thanks for your reply. The solution which you provide I am aware of it and I succeeded by given path {baseDirectory}/${tenantId}/xxxxx like that.

But my requirement is we want to place csv file in any custom folder location. like I said earlier c:/hotfolder_test loation. Please suggest how we can achieve this.

Regards, Srinivas