6

I installed magento 2 Community version successfully. Now when i try to upgrade the setup i get the error Please re-run Magento compile command.

So i ran the compile command

magento setup:di:compile

but i am getting this error

Area configuration aggregation... 5/7 [====================>-------]  71% 35 min
s 736.2 MiB

  [ReflectionException]
  Class Not_Existing_Class does not exist


  [ReflectionException]
  Class Not_Existing_Class does not exist

Any ideas as to how this can be resolved ?!

Thanks in advance.

6
  • what version have you installed and what version are you going to upgrade to? Nov 19 '15 at 3:06
  • @EugeneTulika - i have installed stable release from here - magentocommerce.com/download - version 2.0.0 of Magento Community Edition that contains Sample Data. after installation i tried running upgrade command and its giving me this error. Nov 19 '15 at 5:43
  • just tried to run it myself and didn't hit the error. The only place I see mentioned class is used is in the uint tests. Can you please post the upgrade command you run after you downloaded and installed Magento? Nov 19 '15 at 6:18
  • @EugeneTulika - I am using WAMP server could that be causing the issue ? On my Ubuntu based machine it works fine. For upgrade i am using this command - magento setup:upgrade Nov 19 '15 at 6:28
  • Actually you don't need to run Magento setup:upgrade after installation, unless you installed/updated a module. However even if you run it it does not affect your installation. So still I don't have answer why do you see the error with the missing class. Nov 19 '15 at 6:35
3

Update setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php

if (preg_match($pattern, $fileItem->getRealPath())) {

to

if (preg_match($pattern, str_replace('\\', '/', $fileItem->getRealPath()))) {

Check this Link. Issue is fixed by Magento

1

As a temporary fix, i was able to resolve this problem by commenting following line:

 \Not_Existing_Class $notExistingClass

in << Magento2 Root Folder >>\vendor\magento\framework\Code\Test\Unit\Generator\TestAsset\TestGenerationClass.php

I have also reported the issue on GitHub here and awaiting the community's response: https://github.com/magento/magento2/issues/2404

0

In order to run the compile process error free you have to fix the both:

Step: 1

In File: [magento root dir]/vendor/magento/framework/Code/Test/Unit/Generator/TestAsset/TestGenerationClass.php

Just comment out this (\Not_Existing_Class $notExistingClass) line.

Step 2: In File: [magento rootdir]/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php

Just replace

if (preg_match($pattern, $fileItem->getRealPath())) {

WIth

if (preg_match($pattern, str_replace('\\', '/', $fileItem->getRealPath()))) {

That's it.

0

This was the issue: enter image description here

Ans: While upgrade any module if you are facing such issue then please setup_module table entry. it may be null that reason we are getting such exception. I have solved same with help of setup_module table.

UPDATE `setup_module` SET `data_version` = 'Null' WHERE `setup_module`.`module` = 'Amasty_Rules';

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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