Skip to Content
0
Former Member
Sep 10, 2015 at 01:39 AM

How to resolve "Error writing media file..." error in data hub?

483 Views

We have a requirement in data hub wherein we need to process a file and transform it into impex script through data hub. When we try to process this file it is showing as FAILURE in the publicationaction table and the error mentioned in the publicationerror table is shown below.

Error writing media file (mediaId: 8796257386526, file:C:\hybris\data\media\sys_master\impex\h91\h77\8796257386526.bin, dir:C:\hybris\data\media\sys_master\impex\h91\h77)

If we get the generated impex from the ymedia table and manually import that in hybris admin console it has no issues importing. We attempted to run process again the file through data hub but it is still showing as FAILURE with similar error above. Tried processing a different file and it is showing as SUCCESS.

In the hybris console logs here is what we see:

INFO | jvm 1 | main | 2015/09/09 18:06:09.663 | INFO [TaskExecutor-master-185-Task [8796093121462]] [ImpexDataImportClient] Response status from http://localhost:8080/datahub-webapp/v1/core-publications/2: 200 INFO | jvm 1 | main | 2015/09/09 18:06:09.663 | ERROR [TaskExecutor-master-185-Task [8796093121462]] [DefaultTaskService] Failed to execute task #8796093121462. INFO | jvm 1 | main | 2015/09/09 18:06:09.663 | de.hybris.platform.servicelayer.exceptions.SystemException: de.hybris.platform.tx.RollbackOnlyException: transaction rolled back because it has been marked as rollback-only[VC:-1] INFO | jvm 1 | main | 2015/09/09 18:06:09.664 | at de.hybris.platform.task.impl.DefaultTaskExecutionStrategy.run(DefaultTaskExecutionStrategy.java:112) INFO | jvm 1 | main | 2015/09/09 18:06:09.664 | at de.hybris.platform.task.impl.DefaultTaskService.processTask(DefaultTaskService.java:1128) INFO | jvm 1 | main | 2015/09/09 18:06:09.664 | at de.hybris.platform.task.impl.DefaultTaskService.process(DefaultTaskService.java:1027) INFO | jvm 1 | main | 2015/09/09 18:06:09.664 | at de.hybris.platform.task.impl.DefaultTaskService.processInTenant(DefaultTaskService.java:987) INFO | jvm 1 | main | 2015/09/09 18:06:09.665 | at de.hybris.platform.task.impl.DefaultTaskService$3.run(DefaultTaskService.java:892) INFO | jvm 1 | main | 2015/09/09 18:06:09.665 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) INFO | jvm 1 | main | 2015/09/09 18:06:09.665 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) INFO | jvm 1 | main | 2015/09/09 18:06:09.666 | at java.lang.Thread.run(Thread.java:745) INFO | jvm 1 | main | 2015/09/09 18:06:09.666 | Caused by: de.hybris.platform.tx.RollbackOnlyException: transaction rolled back because it has been marked as rollback-only[VC:-1] INFO | jvm 1 | main | 2015/09/09 18:06:09.667 | at de.hybris.platform.tx.Transaction.commit(Transaction.java:662) INFO | jvm 1 | main | 2015/09/09 18:06:09.667 | at de.hybris.platform.tx.Transaction.finishExecute(Transaction.java:1218) INFO | jvm 1 | main | 2015/09/09 18:06:09.667 | at de.hybris.platform.tx.Transaction.execute(Transaction.java:1205) INFO | jvm 1 | main | 2015/09/09 18:06:09.667 | at de.hybris.platform.tx.Transaction.execute(Transaction.java:1160) INFO | jvm 1 | main | 2015/09/09 18:06:09.667 | at de.hybris.platform.task.impl.DefaultTaskExecutionStrategy.run(DefaultTaskExecutionStrategy.java:80) INFO | jvm 1 | main | 2015/09/09 18:06:09.667 | ... 7 more INFO | jvm 1 | main | 2015/09/09 18:06:09.668 | ERROR [TaskExecutor-master-185-Task [8796093121462]] [ItemImportTaskRunner] ItemImportTaskRunner.handleError() INFO | jvm 1 | main | 2015/09/09 18:06:09.668 | de.hybris.platform.servicelayer.exceptions.SystemException: de.hybris.platform.tx.RollbackOnlyException: transaction rolled back because it has been marked as rollback-only[VC:-1] INFO | jvm 1 | main | 2015/09/09 18:06:09.668 | at de.hybris.platform.task.impl.DefaultTaskExecutionStrategy.run(DefaultTaskExecutionStrategy.java:112) INFO | jvm 1 | main | 2015/09/09 18:06:09.668 | at de.hybris.platform.task.impl.DefaultTaskService.processTask(DefaultTaskService.java:1128) INFO | jvm 1 | main | 2015/09/09 18:06:09.668 | at de.hybris.platform.task.impl.DefaultTaskService.process(DefaultTaskService.java:1027) INFO | jvm 1 | main | 2015/09/09 18:06:09.669 | at de.hybris.platform.task.impl.DefaultTaskService.processInTenant(DefaultTaskService.java:987) INFO | jvm 1 | main | 2015/09/09 18:06:09.669 | at de.hybris.platform.task.impl.DefaultTaskService$3.run(DefaultTaskService.java:892) INFO | jvm 1 | main | 2015/09/09 18:06:09.669 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) INFO | jvm 1 | main | 2015/09/09 18:06:09.669 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) INFO | jvm 1 | main | 2015/09/09 18:06:09.670 | at java.lang.Thread.run(Thread.java:745) INFO | jvm 1 | main | 2015/09/09 18:06:09.670 | Caused by: de.hybris.platform.tx.RollbackOnlyException: transaction rolled back because it has been marked as rollback-only[VC:-1] INFO | jvm 1 | main | 2015/09/09 18:06:09.670 | at de.hybris.platform.tx.Transaction.commit(Transaction.java:662) INFO | jvm 1 | main | 2015/09/09 18:06:09.671 | at de.hybris.platform.tx.Transaction.finishExecute(Transaction.java:1218) INFO | jvm 1 | main | 2015/09/09 18:06:09.671 | at de.hybris.platform.tx.Transaction.execute(Transaction.java:1205) INFO | jvm 1 | main | 2015/09/09 18:06:09.671 | at de.hybris.platform.tx.Transaction.execute(Transaction.java:1160) INFO | jvm 1 | main | 2015/09/09 18:06:09.671 | at de.hybris.platform.task.impl.DefaultTaskExecutionStrategy.run(DefaultTaskExecutionStrategy.java:80) INFO | jvm 1 | main | 2015/09/09 18:06:09.671 | ... 7 more Need some experts in hybris/data hub to assist in this issue.