views:

495

answers:

2

I'm trying to generate my models from a schema.xml file on OSX 10.5 with the latest versions of PHP & Propel 1.3 & Phing. All the model classes actually get created, then it just dies, right at the last step. I have already tried

chmod -R 777 ./application/config

but that didn't help. I have also tried both

propel-gen ./ reverse

and

propel-gen ./ creole

Both produced the same error. 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?

A: 

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

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

See how it says those things must match? Mine didn't. I must have hit a key when I wasn't paying attention, an accidentally edited it. Matched those up, and the build goes fine now. Phew.

lo_fye
A: 

I found that I had the same problem to resolve it I had to set

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

in build.properties file.

After which it worked perfectly.