Impossible de creer un model avec propel:build-schema

Rechercher

Impossible de creer un model avec propel:build-schema

Par nomager  -  2 reponses  -  Le 18/01/2010 22:54  -  Editer  - 

Bonjour, Voici ce que me génère la commande propel:build-schema

 

propel Running "om" phing task [propel-om] Could not perform XLST transformation. Make sure PHP has been compiled/configured to support XSLT. Execution of target "om-template" failed for the following reason: /home/sfprojects/jobeet/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:474:20: XML schema file (/home/sfprojects/jobeet/config/schema.xml) does not validate. See warningsabove for reasons validation failed (make sure error_reporting is set to show E_WARNING if you don't see any). [phingcall] /home/sfprojects/jobeet/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:474:20: XML schema file (/home/sfprojects/jobeet/config/schema.xml) does not validate. See warnings above for reasons validation failed (make sure error_reporting is set to show E_WARNING if you don't see any). Execution of target "om" failed for the following reason: /home/sfprojects/jobeet/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:461:22: Execution of the target buildfile failed. Aborting. [phing] /home/sfprojects/jobeet/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:461:22: Execution of the target buildfile failed. Aborting. Some problems occurred when executing the task: build-propel.xml:474:20: XML schema file (/home/sfprojects/jobeet/config/schema.xml) does not validate. See warnings above for reasons validation failed (make sure error_reporting is set to show E_WARNING if you don't see any). build-propel.xml:461:22: Execution of the target buildfile failed. Aborting. If the exception message is not clear enough, read the output of the task for more information >> autoload Resetting application autoloaders >> autoload Resetting CLI autoloader

 

Voici le contenu de mon fichier schema.xml

                          column name="position\_description" type="VARCHAR" size="100" required="true" />

 

Voici le contenu de mon fichier propel.ini

propel.targetPackage =lib.model propel.packageObjectModel =true propel.project =jobeet propel.database = mysql propel.database.driver = mysql propel.database.url = mysql:host=localhost;dbname=jobeet propel.database.creole.url =${propel.database.url} propel.database.user =root propel.database.password =pass

propel.database.encoding =utf9

 

S'il vous plait, je compte sur votre aide.~

 

Réponses apportées à cette discussion

Par Cyrano  -  Le 18/01/2010 23:21  -  Haut de page  - 

Ton fichier XMLcomporte des erreurs, il est donc normal que ça plante derrière :

<? XML version="1.0" encoding="UTF-8"?>
<database name="propel" defaultIdMethod="native" noXsd="true" package="lib.model">
  <table name="boutique" idMethod="native" phpName="boutique">
    <column name="id" type="INTEGER" required="true" autoIncrement="true" primaryKey="true" index="true" />
    <column name="name" type="VARCHAR" size="100" required="true" index="true" />
    <column name="URL_Slug" type="VARCHAR" size="100" required="true" />
    <column name="image_URL" type="VARCHAR" size="40" required="true" />
    <column name="thumb_URL" type="VARCHAR" size="40" required="true" />
    <column name="colories" type="FLOAT" required="true" />
    <column name="views" type="INTEGER" default="0"  />
    <comun  name="created_at" type="TIMESTAMP" required="true"   />
    <column  name="updated_at" type="TIMESTAMP" required="true"  />
    <index name="boutique_name_index">
      <index-column  name="name" />
    </index>
  </table>
  <table name="flavors" idMethod="native" phpname="Flavor">
    <column name="id" type="INTEGER" required="true  autoIncrement="true" primaryKey="true"  />
    <column name="name" type="VARCHAR" size="20" required="true"  />
    <column name="created_at" type="TIMESTAMP" required="true"  />
  </table>
  <table  name="boutique_flavors" idMethod="native" phpname="Boutiqueflavor">
    <column name="id" type="INTEGER" required="true" autoIncrement="true" primaryKey="true"  />
    <column name="boutique_id" type="INTEGER" required="true"  />
    <column  name="flavor_id" type="INTEGER" required="true"  />
    <foreign-key  foreignTable="flavors" onDelete="CASCADE">
      <reference  local="flavor_id" foreign="id"  />
    </foreign-key>
    <foreign-key  foreignTable="boutique" onDelete="CASCADE">
      <reference  local="boutique_id" foreign="id"  />
    </foreign-key>
  </table>
  <table name="store_locations" idMethod="native" phpName="storelocation">
    <column name=" name="id" type="INTEGER" required="true" autoIncrement="true" primarykey="true"  />
    <column name="address1" type="VARCHAR" size="100" required="true"  />
    <column name="address2" type="VARCHAR" size="100" required="true"  />
    <column  name="address3" type="VARCHAR" size="50" required="true"  />
    <column name="postcode" type="VARCHAR" size="8" required="true"  />
    <column name="city" type="VARCHAR" size="50" required="true"  />
    <column name="country" type="VARCHAR" size="50" required="true"  />
    <column name="phone" type="INTEGER" size="20" required="true"  />
    <column name="fax" type="VARCHAR" size="20" required="true"  />
  </table>
  <table name="vacancies" idMethod="native" phpName="Vacancy">
    <column name="id" type="INTEGER" required="true" autoIncrement="true" primaryKey="true"  />
    <column name="position" type="VARCHAR" size="30" required="true"  />
    column name="position_description" type="VARCHAR" size="100" required="true"  />
    <column name="location_id" type="INTEGER" required="true"  />
    <foreign-key  foreignTable="store_locations" onDelete="CASCADE">
      <reference  local="locations_id" foreign="id"  />
    </foreign-key>
  </table>
</database>

Ligne 11 :

 
Par nomager  -  Le 19/01/2010 23:38  -  Haut de page  - 

Bonjour, j'ai effectué les modification comme vous me l'aviez dites ensuite j'ai tapé la meme commande, c-a-d:

symfony propel:build-model

Some problems occurred when executing the task: build-propel.xml:474:20: XML schema file (/home/sfprojects/jobeet/config/schema.xml) does not validate. See warnings above for reasons validation failed (make sure error_reporting is set to show E_WARNING if you don't see any). build-propel.xml:461:22: Execution of the target buildfile failed. Aborting. If the exception message is not clear enough, read the output of the task for more information

 

 

 

Ajouter une réponse à la discussion

Seuls les membres connectés sont autorisés à poster dans les forums !

Identifiez-vous
Join |  ID/MDP? |