After I upgrade magento from 2.0.7 to 2.1.0 via command line doing:
composer require magento/product-community-edition 2.1.0 --no-update
composer update
When I type "php bin/magento setup:upgrade" I get
[ReflectionException]
Class Magento\Framework\App\Cache\Type\Webapi does not exist
Any ideas why is this happening?
@Krapulat
Manually clear the var/cache, var/page_cache, and var/generation directories.
A sample command follows:
rm -rf var/cache/* var/page_cache/* var/generation/*
Then run:
php bin/magento setup:upgrade
@andimov Same problem after:
rm -rf var/cache/* var/page_cache/* var/generation/*
The output with -vvv is:
[ReflectionException]
Class Magento\Framework\App\Cache\Type\Webapi does not exist
Exception trace:
() at /var/www/example.com/vendor/magento/framework/Code/Reader/ClassReader.php:19
ReflectionClass->__construct() at /var/www/example.com/vendor/magento/framework/Code/Reader/ClassReader.php:19
Magento\Framework\Code\Reader\ClassReader->getConstructor() at /var/www/example.com/vendor/magento/framework/ObjectManager/Definition/Runtime.php:44
Magento\Framework\ObjectManager\Definition\Runtime->getParameters() at /var/www/example.com/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:71
Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() at /var/www/example.com/vendor/magento/framework/ObjectManager/ObjectManager.php:71
Magento\Framework\ObjectManager\ObjectManager->get() at /var/www/example.com/vendor/magento/framework/App/Cache/InstanceFactory.php:32
Magento\Framework\App\Cache\InstanceFactory->get() at /var/www/example.com/vendor/magento/framework/App/Cache/TypeList.php:63
Magento\Framework\App\Cache\TypeList->_getTypeInstance() at /var/www/example.com/vendor/magento/framework/App/Cache/TypeList.php:104
Magento\Framework\App\Cache\TypeList->getTypes() at /var/www/example.com/vendor/magento/framework/App/Cache/Manager.php:131
Magento\Framework\App\Cache\Manager->getAvailableTypes() at /var/www/example.com/setup/src/Magento/Setup/Model/Installer.php:1080
Magento\Setup\Model\Installer->cleanCaches() at /var/www/example.com/setup/src/Magento/Setup/Model/Installer.php:1010
Magento\Setup\Model\Installer->updateModulesSequence() at /var/www/example.com/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php:88
Magento\Setup\Console\Command\UpgradeCommand->execute() at /var/www/example.com/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
Symfony\Component\Console\Command\Command->run() at /var/www/example.com/vendor/symfony/console/Symfony/Component/Console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at /var/www/example.com/vendor/symfony/console/Symfony/Component/Console/Application.php:195
Symfony\Component\Console\Application->doRun() at /var/www/example.com/vendor/magento/framework/Console/Cli.php:96
Magento\Framework\Console\Cli->doRun() at /var/www/example.com/vendor/symfony/console/Symfony/Component/Console/Application.php:126
Symfony\Component\Console\Application->run() at /var/www/example.com/bin/magento:23
@Krapulat
I can't reproduce it.
Please attach your composer.json and composer.lock
Also check permissions http://devdocs.magento.com/guides/v2.0/config-guide/prod/prod_file-sys-perms.html
@andimov The permissions are correct.
composer.lock.zip
I attach composer.lock and this is composer.json:
{
"name": "magento/project-community-edition",
"description": "eCommerce Platform for Growth (Community Edition)",
"type": "project",
"version": "2.0.2",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"repositories": [
{
"type": "composer",
"url": "https://repo.magento.com/"
}
],
"require": {
"magento/product-community-edition": "2.1.0",
"composer/composer": "@alpha",
"magefan/module-blog": "^2.0",
"ebizmarts/magento2-magemonkey": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "4.1.0",
"squizlabs/php_codesniffer": "1.5.3",
"phpmd/phpmd": "@stable",
"pdepend/pdepend": "2.2.2",
"sjparkinson/static-review": "~4.1",
"fabpot/php-cs-fixer": "~1.2",
"lusitanian/oauth": "~0.3 <=0.7.0"
},
"config": {
"use-include-path": true
},
"autoload": {
"psr-4": {
"Magento\\Framework\\": "lib/internal/Magento/Framework/",
"Magento\\Setup\\": "setup/src/Magento/Setup/",
"Magento\\": "app/code/Magento/"
},
"psr-0": {
"": "app/code/"
},
"files": [
"app/etc/NonComposerComponentRegistration.php"
]
},
"autoload-dev": {
"psr-4": {
"Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
"Magento\\Tools\\": "dev/tools/Magento/Tools/",
"Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
"Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
"Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
}
},
"minimum-stability": "alpha",
"prefer-stable": true,
"extra": {
"magento-force": "override"
}
}
@andimov In exception.log it appears:
[2016-06-24 16:57:11] main.CRITICAL: InvalidArgumentException: Plugin class Magento\Framework\App\Response\XFrameOptPlugin doesn't exist in /var/www/example.com/vendor/magento/framework/Interception/PluginList/PluginList.php:164
Stack trace:
#0 /var/www/example.com/vendor/magento/framework/Interception/PluginList/PluginList.php(250): Magento\Framework\Interception\PluginList\PluginList->_inheritPlugins('Magento\\Framewo...')
#1 /var/www/example.com/var/generation/Magento/Framework/App/Response/Http/Interceptor.php(217): Magento\Framework\Interception\PluginList\PluginList->getNext('Magento\\Framewo...', 'setHttpResponse...')
#2 /var/www/example.com/pub/errors/processor.php(206): Magento\Framework\App\Response\Http\Interceptor->setHttpResponseCode(503)
#3 /var/www/example.com/pub/errors/report.php(14): Magento\Framework\Error\Processor->processReport()
#4 /var/www/example.com/vendor/magento/framework/App/Http.php(324): require('/var/www/shoppi...')
#5 /var/www/example.com/vendor/magento/framework/App/Http.php(160): Magento\Framework\App\Http->handleGenericReport(Object(Magento\Framework\App\Bootstrap), Object(InvalidArgumentException))
#6 /var/www/example.com/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http->catchException(Object(Magento\Framework\App\Bootstrap), Object(InvalidArgumentException))
#7 /var/www/example.com/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#8 {main} [] []
I am getting the exact same error with an identical exception trace. Here is my composer.json
{
"name": "magento/project-community-edition",
"description": "eCommerce Platform for Growth (Community Edition)",
"type": "project",
"version": "2.0.7",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"repositories": [
{
"type": "composer",
"url": "https://repo.magento.com/"
}
],
"require": {
"magento/product-community-edition": "2.1.0",
"composer/composer": "@alpha"
},
"require-dev": {
"phpunit/phpunit": "4.1.0",
"squizlabs/php_codesniffer": "1.5.3",
"phpmd/phpmd": "2.3.*",
"pdepend/pdepend": "2.2.2",
"sjparkinson/static-review": "~4.1",
"fabpot/php-cs-fixer": "~1.2",
"lusitanian/oauth": "~0.3 <=0.7.0"
},
"config": {
"use-include-path": true
},
"autoload": {
"psr-4": {
"Magento\\Framework\\": "lib/internal/Magento/Framework/",
"Magento\\Setup\\": "setup/src/Magento/Setup/",
"Magento\\": "app/code/Magento/"
},
"psr-0": {
"": "app/code/"
},
"files": [
"app/etc/NonComposerComponentRegistration.php"
]
},
"autoload-dev": {
"psr-4": {
"Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
"Magento\\Tools\\": "dev/tools/Magento/Tools/",
"Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
"Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
"Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
}
},
"minimum-stability": "alpha",
"prefer-stable": true,
"extra": {
"magento-force": "override"
}
}
I retried the upgrade without installing the sample data patch and it seems to have worked fine. There is also a possibility that I hadn't changed the document root to the base directory instead of pub before running the upgrade.
I'm getting a different error:
[Magento\Framework\Exception\LocalizedException]
Area code is already set
setup:upgrade [--keep-generated] [--magento-init-params="..."]
composer.json:
{
"name": "magento/project-community-edition",
"description": "eCommerce Platform for Growth (Community Edition)",
"type": "project",
"version": "2.0.0",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"repositories": {
"0": {
"type": "composer",
"url": "https://repo.magento.com/"
}
},
"require": {
"magento/product-community-edition": "^2.1.0",
"splendidinternet/mage2-locale-de-de": "^1.3",
"magestore/module-bannerslider": "^1.6"
},
"require-dev": {
"phpunit/phpunit": "4.1.0",
"squizlabs/php_codesniffer": "1.5.3",
"phpmd/phpmd": "@stable",
"pdepend/pdepend": "2.0.6",
"sjparkinson/static-review": "~4.1",
"fabpot/php-cs-fixer": "~1.2",
"lusitanian/oauth": "~0.3 <=0.7.0",
"behat/behat": "3.*",
"phpspec/phpspec": "2.*",
"symfony/process": "~2.1|~3.0",
"bossa/phpspec2-expect": "*"
},
"config": {
"use-include-path": true
},
"autoload": {
"psr-4": {
"Magento\\Framework\\": "lib/internal/Magento/Framework/",
"Magento\\Setup\\": "setup/src/Magento/Setup/",
"Magento\\": "app/code/Magento/"
},
"psr-0": {
"": "app/code/"
},
"files": [
"app/etc/NonComposerComponentRegistration.php",
"src/Aqio/ProductSorter/registration.php",
"src/Aqio/PMT/registration.php"
]
},
"autoload-dev": {
"psr-4": {
"Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
"Magento\\Tools\\": "dev/tools/Magento/Tools/",
"Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
"Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
"Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
}
},
"minimum-stability": "alpha",
"prefer-stable": true,
"extra": {
"magento-force": "override"
}
}
I'm getting the same error. Has anyone fixed it?

Editing composer.json and manually modify to
"magento/product-community-edition": "2.1.0",
and then 'composer update' it seems to work.
Is anything wrong to do this @andimov ?
Any update here? Do i have to reinstall everything just because of an upgrade from 2.0.7 to 2.1.0?
@Krapulat
Thank you for response! This solution is correct.
Your issue resolved?
@developer-lindner
You don't need to reinstall. Also you already upgraded as I understand.
Most likely you have different problem.
@medinadato
Did you clear the var/* directories?
A sample command follows:
rm -rf var/cache/* var/page_cache/* var/generation/*
@andimov
How can i fix it?
Frontend + Backend just shows:
Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later. Please read Magento System Requirements.
I got it running under 2.0.7 already with PHP 7.0.6...
Command Line shows Exception as mentioned above.
@developer-lindner
Best way is to create a new issue with full description according to the template. It allow us process your issue with more attention.
@andimov Just went for a fresh install which works now. Unfortunately there are several issues with this release, like #4638 or #5236. Thought Magento2 would be built with TDD?!
No problems when updating composer - manually changed to 2.1.0 from 2.0.7. However, when I try to run setup:upgrade I get the same exception:
[ReflectionException]
Class Magento\FrameworkApp\Cache\Type\Webapi does not exist
I'm using php 7.0.7.
Comparing my installation to a fresh install, there was an extra line in env.php. I added this and the issue went away:
compiled_config' => 1,
This gets added at the end of the following list:
'cache_types' =>
array (
'config' => 1,
'layout' => 1,
'block_html' => 1,
'collections' => 1,
'reflection' => 1,
'db_ddl' => 1,
'eav' => 1,
'config_integration' => 1,
'config_integration_api' => 1,
'full_page' => 1,
'translate' => 1,
'config_webservice' => 1,
),
@maderlock
Thank you a lot for solution!
For me, the
compiled_config' => 1,
has already been there and the error persists.
@jldmn
What error persists in your case?
The "[Reflection Exception] Class Magento\FrameworkApp\Cache\Webapi does not exist" error
@jldmn
Did you clear the var/cache, var/page_cache, and var/generation directories?
A sample command follows:
rm -rf var/cache/* var/page_cache/* var/generation/*
Then run:
php bin/magento setup:upgrade
Did the trick for me! Thanks a lot!
Ok, but now i got
Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later. Please read Magento System Requirements.
on both Store and Admin Page.
My Server runs Ubuntu 14.04 with php 5.6.23
The check should pass for php 5.6 as the relevant part of the condition in bootstrap is: PHP_VERSION_ID >= 50600 && PHP_VERSION_ID < 50700. It also fails if PHP for some reason fails to report its version number.
I would first use phpinfo() to check that the version of PHP used to serve your pages is the one you think it is.
@jldmn Do you have >1 version of PHP installed? What does php -v report?
I got that error!
[ReflectionException]
Class Magento\ConfigurableProduct\Model\Product\VariationMediaAttributes do
es not exist
Clearing the cache (in my case Redis, not var/cache/) helped.
@Krapulat
According to contributor guide, tickets without response for two weeks should be closed.
Please feel free to reopen if it's needed.
@anyone
Please create a separate ticket for other issues and provide detailed steps according to the template. This will help us to process issues. I'm closing this one.
Most helpful comment
Clearing the cache (in my case Redis, not var/cache/) helped.