ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 14 replies, has 3 voices, and was last updated by Mike Kudelya Mike Kudelya 11 months, 4 weeks ago.

  • Creator
    Topic
  • #23186
    pauloasterio
    pauloasterio
    Participant

    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

    How to Upgrade to a New Version

    Any one can help ?

    tks

Viewing 14 replies - 1 through 14 (of 14 total)
  • Author
    Replies
  • #23208
    pauloasterio
    pauloasterio
    Participant

    difficult one?

    #23216
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi,

    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:

    To isVirtualField function:

    To getVirtualFieldQuery function:

    Also full trace will be helpful.

    #23552
    pauloasterio
    pauloasterio
    Participant

    root@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 164

    ERROR: 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:23

    oro: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>

    #23553
    pauloasterio
    pauloasterio
    Participant

    Seems to be an error on zendesk class

    OroCRM\Bundle\ZendeskBundle\Entity\UserRole

    I worked around this by adding :

    #23554
    pauloasterio
    pauloasterio
    Participant

    on over the class /var/www/orocrm/vendor/oro/platform/src/Oro/Bundle/EntityBundle/Provider/DictionaryVirtualFieldProvider.php

    #23569
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi

    Do you add any custom virtual fields ? Without debug information which i described above i can’t help you find an error.

    #24407

    dave08
    Participant

    Hi 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 166

    ERROR: 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:23

    #24442
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi

    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.

    #24446

    dave08
    Participant

    php 5.5.9 for now (want to upgrade to 7 soon), i’m upgrading from 1.9 to 1.10.+. Thanks!

    #24465
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi

    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:

    We will investigate the issue, thank!

    #24503

    dave08
    Participant

    I 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”=””
    * }
    * }
    * )

    #24544
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi,

    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)

    #24545

    dave08
    Participant

    All 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.

    #24563
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi

    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:

    Don’t forget backup your database.

Viewing 14 replies - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.