Forums › Forums › OroCRM › OroCRM – Installation/Technical Issues or Problems › OROCRM UPGRADE ERROR
This topic contains 14 replies, has 3 voices, and was last updated by Mike Kudelya 7 years, 4 months ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- October 14, 2016 at 8:00 am #27378
Tried to upgrade oro from 1.8.2 to 1.10.6 and I am getting this error:
PHP Fatal error: Call to a member function getClassMetadata() on null in /var/www/orocrm/vendor/oro/platform/src/Oro/Bundle/EntityBundle/Provider/DictionaryVirtualFieldProvider.php on line 155
Followed this manual
https://oroinc.com/orocrm/doc/current/cookbook/how-to-upgrade-to-new-version
Any one can help ?
tks
- CreatorTopic
- AuthorReplies
- October 17, 2016 at 4:13 am #27379
difficult one?
October 18, 2016 at 4:03 am #27380Hi,
Can you put debug information in these three function and again upgrade our application from 1.8.2 to 1.10.6? Interesting information directly before the error.
To getVirtualFields function:
PHP1echo "getVirtualFields: $className\n"To isVirtualField function:
PHP1echo "isVirtualField: $className $fieldName\n";To getVirtualFieldQuery function:
PHP1echo "getVirtualFieldQuery: $className, $fieldName\n";Also full trace will be helpful.
October 23, 2016 at 7:21 am #27381root@7a2055813361:/var/www/orocrm# php app/console oro:platform:update –env prod –force –verbose
Process migrations…
> Oro\Bundle\EntityExtendBundle\Migration\LoadEntityConfigStateMigration
> Oro\Bundle\MigrationBundle\Migration\UpdateBundleVersionMigration
> Oro\Bundle\EntityExtendBundle\Migration\RefreshExtendCacheMigration
> Oro\Bundle\EntityConfigBundle\Migration\UpdateEntityConfigMigration
> Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendConfigMigration
> OroCRM\Bundle\ActivityContactBundle\Migration\ActivityContactMigration
> Oro\Bundle\ActivityListBundle\Migration\ActivityListMigration
> Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendIndicesMigration
> Oro\Bundle\EntityConfigBundle\Migration\WarmUpEntityConfigCacheMigration
PHP Fatal error: Call to a member function getClassMetadata() on null in /var/www/orocrm/vendor/oro/platform/src/Oro/Bundle/EntityBundle/Provider/DictionaryVirtualFieldProvider.php on line 164ERROR: The command terminated with an exit code: 255.
[RuntimeException]
Failed migrations: Oro\Bundle\EntityConfigBundle\Migration\WarmUpEntityConfigCacheMigration.oro:migration:load [–force] [–dry-run] [–show-queries] [–bundles [BUNDLES]] [–exclude [EXCLUDE]] [–timeout [TIMEOUT]] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-s|–shell] [–process-isolation] [-e|–env ENV] [–no-debug] [–jms-job-id JMS-JOB-ID] [–disabled-listeners DISABLED-LISTENERS] [–] <command>
[RuntimeException]
The command terminated with an exit code: 1.Exception trace:
() at /var/www/orocrm/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/CommandExecutor.php:200
Oro\Bundle\InstallerBundle\CommandExecutor->processResult() at /var/www/orocrm/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/CommandExecutor.php:143
Oro\Bundle\InstallerBundle\CommandExecutor->runCommand() at /var/www/orocrm/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/Command/PlatformUpdateCommand.php:62
Oro\Bundle\InstallerBundle\Command\PlatformUpdateCommand->execute() at /var/www/orocrm/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:259
Symfony\Component\Console\Command\Command->run() at /var/www/orocrm/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:863
Symfony\Component\Console\Application->doRunCommand() at /var/www/orocrm/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:192
Symfony\Component\Console\Application->doRun() at /var/www/orocrm/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:92
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/orocrm/vendor/jms/job-queue-bundle/JMS/JobQueueBundle/Console/Application.php:45
JMS\JobQueueBundle\Console\Application->doRun() at /var/www/orocrm/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:123
Symfony\Component\Console\Application->run() at /var/www/orocrm/app/console:23oro:platform:update [–force] [–skip-assets] [–symlink] [–force-debug] [–timeout [TIMEOUT]] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-s|–shell] [–process-isolation] [-e|–env ENV] [–no-debug] [–jms-job-id JMS-JOB-ID] [–disabled-listeners DISABLED-LISTENERS] [–] <command>
October 23, 2016 at 11:36 am #27382Seems to be an error on zendesk class
OroCRM\Bundle\ZendeskBundle\Entity\UserRole
I worked around this by adding :
PHP123if($this->getManagerForClass($className)==null){continue;}October 23, 2016 at 11:36 am #27383on over the class /var/www/orocrm/vendor/oro/platform/src/Oro/Bundle/EntityBundle/Provider/DictionaryVirtualFieldProvider.php
October 25, 2016 at 3:00 am #27384Hi
Do you add any custom virtual fields ? Without debug information which i described above i can’t help you find an error.
November 23, 2016 at 5:12 am #27385Hi Mike, I’m having the same problem and I don’t know where to put those echo’s, here’s my output:
Process migrations…
> Oro\Bundle\EntityExtendBundle\Migration\LoadEntityConfigStateMigration
> Oro\Bundle\MigrationBundle\Migration\UpdateBundleVersionMigration
> Oro\Bundle\EntityExtendBundle\Migration\RefreshExtendCacheMigration
PHP Fatal error: Call to a member function getClassMetadata() on a non-object in …/ServerOro/vendor/oro/platform/src/Oro/Bundle/EntityExtendBundle/Tools/AssociationBuilder.php on line 166ERROR: The command terminated with an exit code: 255.
> Oro\Bundle\EntityConfigBundle\Migration\UpdateEntityConfigMigration – skipped
> Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendConfigMigration – skipped
> Oro\Bundle\ActivityListBundle\Migration\ActivityListMigration – skipped
> Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendIndicesMigration – skipped
> Oro\Bundle\EntityConfigBundle\Migration\WarmUpEntityConfigCacheMigration – skipped[RuntimeException]
Failed migrations: Oro\Bundle\EntityExtendBundle\Migration\RefreshExtendCacheMigration.Exception trace:
() at …/ServerOro/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/CommandExecutor.php:200
Oro\Bundle\InstallerBundle\CommandExecutor->processResult() at …/ServerOro/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/CommandExecutor.php:143
Oro\Bundle\InstallerBundle\CommandExecutor->runCommand() at …/ServerOro/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/Command/PlatformUpdateCommand.php:62
Oro\Bundle\InstallerBundle\Command\PlatformUpdateCommand->execute() at …/ServerOro/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:259
Symfony\Component\Console\Command\Command->run() at …/ServerOro/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:863
Symfony\Component\Console\Application->doRunCommand() at …/ServerOro/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:192
Symfony\Component\Console\Application->doRun() at …/ServerOro/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:92
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at …/ServerOro/vendor/jms/job-queue-bundle/JMS/JobQueueBundle/Console/Application.php:45
JMS\JobQueueBundle\Console\Application->doRun() at …/ServerOro/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:123
Symfony\Component\Console\Application->run() at …/ServerOro/app/console:23November 24, 2016 at 8:33 am #27386Hi
I would to know which version of php, mysql are you using ? What do you do to get this error ? If you update your platform, please tell me start/end versions.
November 24, 2016 at 9:14 am #27387php 5.5.9 for now (want to upgrade to 7 soon), i’m upgrading from 1.9 to 1.10.+. Thanks!
November 25, 2016 at 3:59 am #27388Hi
I have tried update my system from 1.9.1 -> 1.10.9. I have no problem with this. This problem occurs all the time? As workaround you can add additional $em check. Please add these code there:
PHP123if (!$em) {return ['id'];}We will investigate the issue, thank!
November 28, 2016 at 5:02 am #27389I did that, now I got this error
Warm up the entity config cache
[Oro\Bundle\EntityBundle\Exception\NotManageableEntityException]
on one of my entities. This is the config section on the entity:
* @Config(
* defaultValues={
* “ownership”={
* “owner_type”=”BUSINESS_UNIT”,
* “owner_field_name”=”owner”,
* “owner_column_name”=”user_owner_id”,
* “organization_field_name”=”organization”,
* “organization_column_name”=”organization_id”
* },
* “dataaudit”={
* “auditable”=true
* },
* “tag”={
* “enabled”=true
* },
* “security”={
* “type”=”ACL”,
* “permissions”=”All”,
* “group_name”=””
* }
* }
* )November 28, 2016 at 7:33 am #27390Hi,
As i understood when do you remove entity class exception is disappeared? If yes, check that all necessary annotations is present in your entity (@ORM\Entity, @ORM\Table)
November 28, 2016 at 7:40 am #27391All the annotations are present, I downgraded from platform 1.10.+(9) to 1.10.1 and now I don’t get these errors, but I now have this error when I go into the update page of one of my entities, maybe I’m missing some step in the upgrade process?:
Notice: Undefined index: ref-one in ~/ServerOro/vendor/oro/platform/src/Oro/Bundle/EntityExtendBundle/Form/Guesser/ExtendFieldTypeGuesser.php on line 89
Thanks.
November 29, 2016 at 8:20 am #27392Hi
Try to debug this function and find out values of $className and $property when errors occurred.
Probably configs in database is corrupted, please delete your entity from oro_entity_config, also delete all fields of your entity and run config update:Shell1app/console oro:entity-config:updateDon’t forget backup your database.
- AuthorReplies
The forum ‘OroCRM – Installation/Technical Issues or Problems’ is closed to new topics and replies.