symfony: No package found for database “” in generated-schema.xml

July 22, 2008

Ok so i was setting up a Symfony 1.0 project recently and was getting this error. It took me a while of poking around to figure out what was wrong. The error indicated a lack of database’y things and I had my empty one defined in databases.yml so i was stumped.

The error was this:

Execution of target “om-template” failed for the following reason: /usr/share/php/symfony/vendor/propel-generator/build-propel.xml:470:1: No package found for database “” in generated-schema.xml. The propel.packageObjectModel property requires the package attribute to be set for each database.
[phingcall] /usr/share/php/symfony/vendor/propel-generator/build-propel.xml:470:1: No package found for database “” in generated-schema.xml. The propel.packageObjectModel property requires the package attribute to be set for each database.

Basically what is happening, is that since I had one defined i also had to have one listed in the schema, even an empty one.. so

To fix:

add the following at the top of config/schema.yml:

propel:

^^^thats it.

I also heard you can also delete your schema.yml file, but i wouldnt recommend that, and im not sure if it would even work.

Tags: , , ,

3 Responses to “symfony: No package found for database “” in generated-schema.xml”

  1. dan Says:

    adding a “propel:” within the schema.yml didn’t worked for me. Instead removing the schema.yml did the job.

  2. Issam Says:

    I also had the same problem and i removed schema.yml and thats it!!

  3. rekarnar Says:

    ahh good to hear about the file deletion. although it’s quite important to have and personally i would rather have an empty one.


Leave a Reply