5

I upgraded magento version by documentation, after upgrade this happens:

When running php bin/magento cache:flush or any other bin/magento command error appears There are no commands defined in the " " namespace When running php bin/magento list these errors appear:

In ServiceManager.php line 1130:

An abstract factory could not create an instance of magentosetupconsolecommanddbstatuscommand(alias: Magento\Setup\Console\Command\DbStatusCommand).  


In ServiceManager.php line 941:

An exception was raised while creating "Magento\Setup\Console\Command\DbStatusCommand"; no instance returned  


In ClassReader.php line 19:

Class Magento\Framework\Setup\Declaration\Schema\FileSystem\XmlReader does not exist  

There are no missing module.xml in any custom modules.
UPDATE:

few modules module.xml had this:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">

instead it should be this:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">

UPDATE2: same error still persists. Tried

rm -rf var/cache/* var/page_cache/* var/di/* var/generation/* var/view_preprocessed/* 

and composer update above fix didn not help still.

3
  • I am getting the exact same issue did someone able to resolve this issue?
    – magedev
    Jun 26, 2019 at 14:21
  • var/generation/ no longer exists. you should delete "generated" in you magento-root Jun 26, 2019 at 14:26
  • Ever find a solution for this?
    – DiddleDot
    Apr 25, 2022 at 17:37

1 Answer 1

1

I got the same error some times ago. Generally these errors occur because of missing of module.xml of any custom modules please check whether there is any module.xml is missing or not of your custom modules.

I hope this will help

5
  • @Trenox if my answer is helpful and resolve your issue then mark my answer correct and upvote my answer so it helps others as well. keep coding :) thanks :) Mar 13, 2019 at 7:50
  • Yes seems like there was a problem with xsi schema location declaration in couple module.xml
    – Trenox
    Mar 13, 2019 at 7:50
  • Edited question again. Problem still persists.
    – Trenox
    Mar 13, 2019 at 8:57
  • @Trenox check whether any of your custom module module.xml is missing or not you can check it by going your every custom module path [Vendor]/[custommodulename]/etc/module.xml. You don't need to change any module.xml of your custom module. I emphasize on missing word. Mar 13, 2019 at 9:18
  • None are missing.
    – Trenox
    Mar 13, 2019 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.