This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

No Metadata Classes to process.

Discuss installing Symfony 2 here

No Metadata Classes to process.

by fcjversc » Wed Aug 22, 2012 12:58 am

Hi,

I have done a clean install of Symfony 2 with composer, and created a bundle via app/console. I also created a database and generated some entities via app/console.
So now i execute $ php app/console doctrine:schema:create to create the database scheme. Unfortunately, i get the following error: No Metadata Classes to process.

I double checked the namespaces and everything seems to be correct, especially because it is all generated code. I also checked that /resources/config/doctrine/*bundlename*.orm.php exists, and it does.
Do i have to re-configure doctrine in some way? What am i missing here? I've deleted cache several times without any luck.

Running Xampp 1.8.0, PHP 5.4.4, Apache 2.4.2, Windows 7, Symfony 2.1 RC1

Edit:
I tried the custom mapping in config.yml, without any result.
fcjversc
Junior Member
 
Posts: 5
Joined: Mon Aug 20, 2012 11:20 pm

Re: No Metadata Classes to process.

by es8ch » Wed Feb 27, 2013 1:19 pm

I am facing exactly the same problem right now. I am on Symfony 2.1.8, installation was done via composer.

In my dev environment on a Windows 7 using XAMPP 1.7.7 (PHP 5.3.8) all works fine, but on 2 different testing servers, one a Windows Server 2008 R2 with XAMPP 1.8.1 (PHP 5.4.x) and another Ubuntu Server with php 5.3.10, both are failing on mapped Doctrine ORM entities.

Running doctrine on my dev machine returns:

$ php app/console "doctrine:mapping:info"
Found 2 mapped entities:
[OK] Xxx\XxxBundle\Entity\Group
[OK] Xxxt\XxxBundle\Entity\User

running the same on any of the test servers returns

[Exception]
You do not have any mapped Doctrine ORM entities according to the current configuration. If you have entities or mapping files you should check your mapping configuration for errors.

It looks to me as this has something to do with the PHP version as I used an older PHP 5.3.x on the Windows test server to clear cache on command line. I even broke it down further that the cache warmup fails with later PHP versions. Anyhow, I am a bit clueless what is exactly causing it.

I would appreciate any help on this topic.
User avatar
es8ch
Junior Member
 
Posts: 15
Joined: Wed Feb 27, 2013 1:03 pm
Location: Budapest

Re: No Metadata Classes to process.

by es8ch » Tue Jun 11, 2013 3:29 pm

It's already month ago but I solved my own problem and forgot about this post.
Just as an information, for me it was the order of the comment block containing the doctrine annotations and the namespace/use statements.
Still wondering why it was able to work on a different environment but this fixed the problem.

So ensure that namespace and use statements come first!

Cheers, Sven
User avatar
es8ch
Junior Member
 
Posts: 15
Joined: Wed Feb 27, 2013 1:03 pm
Location: Budapest