Shopware customer import error: The EntityManager is closed

Viewed 1377

While importing bulk customer into Shopware only the first row from the CSV imported then throws the error

"The EntityManager is closed".

If I try with only single data it imports the customer but also throws the same error "The EntityManager is closed".

Checked the core_production_date.log and importexport.log in shopware/var/log/ no log there.

Also checked Configureation->logfile, nothing there too.

How can I get the actual error log why it's happening? Please let me know if anybody can help.

Shopware version is 5.2.27

Thanks.

2 Answers

You can use try..catch and reset the EntityManager in the catch clause, if it's closed (you should extend you API Class from ), eg:

try {
 ... you code ...
} catch (\Exception $e) {
    if (!$this->getManager()->isOpen()) {
        $this->resetEntityManager();
    }
...
}
Related