InvalidDefinition Exception: Entry "platforms" cannot be compiled: the class doesn't exist

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
andyrav
User
Posts: 641

InvalidDefinition Exception: Entry "platforms" cannot be compiled: the class doesn't exist

Post by andyrav »

Within 2024.9 When trying to use production i am getting the following error

[Thu Mar 28 15:06:22.165274 2024] [proxy_fcgi:error] [pid 1355595] [client 10.251.32.6:50750] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught DI\\Definition\\Exception\\InvalidDefinition: Entry "platforms" cannot be compiled: the class doesn't exist\nFull definition:\nObject (\n class = #UNKNOWN# Doctrine\\DBAL\\Platforms\n lazy = false\n) in /var/www/html/portal/vendor/php-di/php-di/src/Definition/Exception/InvalidDefinition.php:19\nStack trace:\n#0 /var/www/html/portal/vendor/php-di/php-di/src/Compiler/ObjectCreationCompiler.php(198): DI\\Definition\\Exception\\InvalidDefinition::create()\n#1 /var/www/html/portal/vendor/php-di/php-di/src/Compiler/ObjectCreationCompiler.php(30): DI\\Compiler\\ObjectCreationCompiler->assertClassIsInstantiable()\n#2 /var/www/html/portal/vendor/php-di/php-di/src/Compiler/Compiler.php(247): DI\\Compiler\\ObjectCreationCompiler->compile()\n#3 /var/www/html/portal/vendor/php-di/php-di/src/Compiler/Compiler.php(140): DI\\Compiler\\Compiler->compileDefinition()\n#4 /var/www/html/portal/vendor/php-di/p...'

Failed to load resource: the server responded with a status of 500 ()

Within /logs/cache
i just have
RouteAttributes.php
ApiRouteAttributes.php

any ideas?
thanks


arbei
User
Posts: 9384

Post by arbei »

  1. What is "platforms"? If it is a deleted table, make sure you have synchronize your project and generate all scripts again. (Clear project folder first.)
  2. If you use Compile container for production, as the docs says:
    Notes:
    1.When enabled, the container will be compiled once and never be regenerated again.
    2. When you deploy new versions of your scripts (for example, after adding or deleting a table) to production, you must delete the generated file (<ProjectFolder>/<LogFolder>/cache/CompiledContainer.php) to ensure that the container will be re-compiled.

andyrav
User
Posts: 641

Post by andyrav »

Running on Ubuntu 22.04.4 LTS
Delete my whole project folder, regenerated then reuploaded to server.
still same error
will not create the CompiledContainer.php file but not showing any write/permission errors


arbei
User
Posts: 9384

Post by arbei »

The error said: Entry "platforms" cannot be compiled: the class doesn't exist. As explained, that probably means you had a table or view named "platforms" (right? you did not answer) but the class was not found. If you have deleted the table/view, you should delete the previously compiled CompiledContainer.php on your production server (it is not on your PC, just re-uploading won't delete the file on the server) first, e.g. if your Log file folder you specified in your project is "log", the file is /var/www/html/portal/log/cache/CompiledContainer.php.


Post Reply