Propel-gen "convert-conf" does not work

I am trying to create my models from a schema.xml file on OSX 10.5 with the latest versions of PHP and Propel 1.3 and Phing. All model classes are actually created, and then simply die, in the last step. I have already tried

chmod -R 777./application/config

but it did not help. I also tried both

propel-gen./reverse

and

propel-gen./creole

Both made the same mistake. This error:

propel > convert-conf: [echo] Output file: models-conf.php [echo] XMLFile: /application/config/runtime-conf.xml Execution of target "convert-conf" failed for the following reason: pear/data/propel_generator/build-propel.xml:514:20: No valid xmlConfFile specified. [phingcall] /pear/data/propel_generator/build-propel.xml:514:20: No valid xmlConfFile specified. Execution of target "main" failed for the following reason: pear/data/propel_generator/build-propel.xml:94:18: Execution of the target buildfile failed. Aborting. [phing] pear/data/propel_generator/build-propel.xml:94:18: Execution of the target buildfile failed. Aborting. BUILD FINISHED 

Here is my build.properties file:

 propel.project = models propel.database = mysql propel.database.encoding = utf8 propel.database.url = mysql:host=localhost;dbname={$myDBName} propel.database.user = {$myDBuser} propel.database.password = {$myDBpass} propel.output.dir = /application propel.php.dir = ${propel.output.dir}/ propel.sql.dir = ${propel.output.dir}/models/sql propel.schema.dir = ${propel.output.dir}/config propel.conf.dir = ${propel.output.dir}/config propel.phpconf.dir = ${propel.output.dir}/config propel.addGenericAccessors = true 

Any ideas?

+3
source share
2 answers

I don't know how this happened, but there was a bad line in my runtime-conf.xml file:

 <datasource id="models"> <!-- this ID must match <database name=""> in schema.xml --> 

See how he says these things should match? Mine did not. I must have pressed a key when I did not pay attention, accidentally edited it. Coincide with them, and the assembly is going well. Phew

+1
source

I found that I had the same problem to solve this problem. I had to install

 propel.runtime.conf.file=runtime-config.xml 

in the build.properties file.

After which it worked perfectly.

+3
source

All Articles