Java 2 Ada

Symfony cryptic error: Error importing plugins/sfPropelPlugin/lib/propel/builder/SfPeerBuilder.php

By Stephane Carrez 2 comments

Symfony is a nice PHP framework, when it works. Sometimes when you run symfony you get a cryptic error and you have no clue on how to fix the problem. The article shows one of them and how to solve it.

After the migration to Symfony 1.2, when I wanted to use the command symfony propel:build-model, I was getting the following cryptic error:

>> propel    Running "om" phing task
[phingcall] Error importing plugins/sfPropelPlugin/lib/propel/builder/SfPeerBuilder.php
Execution of target "om" failed for the following reason: /usr/share/php/symfony/plugins/sfPropelPlugin/lib/vendor/propel-generator/build- propel.xml:465:22: Execution of the target buildfile failed. Aborting.
   [phing] /usr/share/php/symfony/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:465:22: Execution of the target  buildfile failed. Aborting.
   
 Some problems occurred when executing the task:
   build-propel.xml:465:22: Execution of the target buildfile failed. Aborting.
   Read the logs to fix them

After searching for some time, I've found that this error comes from a bad definition in my 'config/propel.ini' file. The propel.ini file contained definitions like:

propel.builder.peer.class  = \
  plugins.sfPropelPlugin.lib.propel.builder.SfPeerBuilder
propel.builder.object.class = \
  plugins.sfPropelPlugin.lib.propel.builder.SfObjectBuilder

And they should be defined as follows:

propel.builder.peer.class    = \
  plugins.sfPropelPlugin.lib.builder.SfPeerBuilder
propel.builder.object.class = \
  plugins.sfPropelPlugin.lib.builder.SfObjectBuilder

Once the propel configuration was fixed, the symfony command was working again.

If you have this kind of problem, I suggest the following:

  • Create an empty blank application with Symfony (symfony init-app test)
  • Make a diff of the 'config' directory between your application and the blank application
  • Report any suspicious change to fix your configuration

Add a comment

To add a comment, you must be connected. Login

2 comments

joe@mailinator.com
Joe on 2009-06-05 06:43:52 said:

Hi, thx for the Tipp. I had the same problem and now i can solve it.

piotrek.leszczynski@gmail.com
Leszczu on 2009-02-10 08:02:41 said:

This error can be cryptic, but symfony documentation is very verbose on what to do to avoid this problem:
http://www.symfony-project.org/inst...
You just need to run:
$ php symfony project:upgrade1.2
That's all, it'll changes You described, as well as some others.