[Résolu] TP03 base SQL : repertoire src/config manquant

Modérateurs : graffiop, jmdouin, agoncal, mlebihan

jeromefort
Messages : 31
Inscription : 21 oct. 2007 9:03
Localisation : Paris 10

[Résolu] TP03 base SQL : repertoire src/config manquant

Message par jeromefort » 01 nov. 2007 22:59

Bonjour

Je suis en train d'essayer de créer la structure de la base de données SQL avec le script ant build.xml en invoquant yaps-create-db
Or il ne s'execute pas avec ce message d'erreur à la ligne 91:
Source file doesn't exist

En regardant le script on cherche un fichier dans:
${yaps.home}/src/config
or dans le zip des sources que j'ai téléchargé, ce répertoire n'existe pas
ni le fichier structure.sql

Je ne sais pas si cest normal
Jérôme

graffiop
Messages : 663
Inscription : 21 juin 2005 14:05

Message par graffiop » 02 nov. 2007 11:46

C'est anormal (désolé!) et réparé.

Les fichiers Yaps/src/config/data.sql et Yaps/src/config/structure.sql sont désormais dans l'archive des sources fournis (http://iagl.free.fr/glg203/tp/TP03/Sour ... s_TP03.zip).


Voici aussi une copie des 2 fichiers manquants:

$ cat Yaps/src/config/structure.sql

Code : Tout sélectionner

-- Cleanup
DROP TABLE IF EXISTS T_CUSTOMER;
DROP TABLE IF EXISTS T_ITEM;
DROP TABLE IF EXISTS T_PRODUCT;
DROP TABLE IF EXISTS T_CATEGORY;

-- Create
CREATE TABLE T_CUSTOMER( id VARCHAR(10), PRIMARY KEY(id), firstname VARCHAR(50) NOT NULL, lastname VARCHAR(50) NOT NULL, telephone VARCHAR(10), street1 VARCHAR(50), street2 VARCHAR(50), city VARCHAR(25), state VARCHAR(25), zipcode VARCHAR(10), country VARCHAR(25)) TYPE=INNODB;
CREATE TABLE T_CATEGORY( id VARCHAR(10), PRIMARY KEY(id), name VARCHAR(50) NOT NULL, description VARCHAR(255) NOT NULL) TYPE=INNODB ;
CREATE TABLE T_PRODUCT( id VARCHAR(10), PRIMARY KEY(id), name VARCHAR(50) NOT NULL, description VARCHAR(255) NOT NULL, category_fk VARCHAR(10) NOT NULL, INDEX category_fk_ind (category_fk), FOREIGN KEY (category_fk) REFERENCES t_category(id) ON DELETE CASCADE) TYPE=INNODB;
CREATE TABLE T_ITEM( id VARCHAR(10), PRIMARY KEY(id), name VARCHAR(50) NOT NULL, unitCost DOUBLE NOT NULL, product_fk VARCHAR(10) NOT NULL, INDEX product_fk_ind (product_fk), FOREIGN KEY (product_fk) REFERENCES t_product(id) ON DELETE CASCADE) TYPE=INNODB;
$ cat Yaps/src/config/data.sql

Code : Tout sélectionner

-- Cleanup
DELETE FROM T_CUSTOMER;
DELETE FROM T_ITEM;
DELETE FROM T_PRODUCT;
DELETE FROM T_CATEGORY;

-- Load
INSERT INTO T_CATEGORY VALUES ('FISH', 'Fish', 'Any of numerous cold-blooded aquatic vertebrates characteristically having fins, gills, and a streamlined body' );
INSERT INTO T_CATEGORY VALUES ('DOGS', 'Dogs', 'A domesticated carnivorous mammal related to the foxes and wolves and raised in a wide variety of breeds' );
INSERT INTO T_CATEGORY VALUES ('REPTILES', 'Reptiles', 'Any of various cold-blooded, usually egg-laying vertebrates, such as a snake, lizard, crocodile, turtle' );
INSERT INTO T_CATEGORY VALUES ('CATS', 'Cats', ' Small carnivorous mammal domesticated since early times as a catcher of rats and mice and as a pet and existing in several distinctive breeds and varieties' );
INSERT INTO T_CATEGORY VALUES ('BIRDS', 'Birds', 'Any of the class Aves of warm-blooded, egg-laying, feathered vertebrates with forelimbs modified to form wings' );

INSERT INTO T_PRODUCT VALUES ('FISW01', 'Angelfish', 'Saltwater fish from Australia', 'FISH');
INSERT INTO T_PRODUCT VALUES ('FISW02', 'Tiger Shark', 'Saltwater fish from Australia', 'FISH');
INSERT INTO T_PRODUCT VALUES ('FIFW01', 'Koi', 'Freshwater fish from Japan', 'FISH');
INSERT INTO T_PRODUCT VALUES ('FIFW02', 'Goldfish', 'Freshwater fish from China', 'FISH');
INSERT INTO T_PRODUCT VALUES ('K9BD01', 'Bulldog', 'Friendly dog from England', 'DOGS');
INSERT INTO T_PRODUCT VALUES ('K9PO02', 'Poodle', 'Cute dog from France', 'DOGS');
INSERT INTO T_PRODUCT VALUES ('K9DL01', 'Dalmation', 'Great dog for a fire station', 'DOGS');
INSERT INTO T_PRODUCT VALUES ('K9RT01', 'Golden Retriever', 'Great family dog', 'DOGS');
INSERT INTO T_PRODUCT VALUES ('K9RT02', 'Labrador Retriever', 'Great hunting dog', 'DOGS');
INSERT INTO T_PRODUCT VALUES ('K9CW01', 'Chihuahua', 'Great companion dog', 'DOGS');
INSERT INTO T_PRODUCT VALUES ('RPSN01', 'Rattlesnake', 'Doubles as a watch dog', 'REPTILES');
INSERT INTO T_PRODUCT VALUES ('RPLI02', 'Iguana', 'Friendly green friend', 'REPTILES');
INSERT INTO T_PRODUCT VALUES ('FLDSH01', 'Manx', 'Great for reducing mouse populations', 'CATS');
INSERT INTO T_PRODUCT VALUES ('FLDLH02', 'Persian', 'Friendly house cat, doubles as a princess', 'CATS');
INSERT INTO T_PRODUCT VALUES ('AVCB01', 'Amazon Parrot', 'Great companion for up to 75 years', 'BIRDS');
INSERT INTO T_PRODUCT VALUES ('AVSB02', 'Finch', 'Great stress reliever', 'BIRDS');

INSERT INTO T_ITEM  VALUES ('EST1', 'Large', '10.00', 'FISW01');
INSERT INTO T_ITEM  VALUES ('EST2', 'Thootless', '10.00', 'FISW01');
INSERT INTO T_ITEM  VALUES ('EST3', 'Spotted', '12.00', 'FISW02');
INSERT INTO T_ITEM  VALUES ('EST4', 'Spotless', '12.00', 'FISW02');
INSERT INTO T_ITEM  VALUES ('EST5', 'Male Adult', '12.00', 'FIFW01');
INSERT INTO T_ITEM  VALUES ('EST6', 'Female Adult', '12.00', 'FIFW01');
INSERT INTO T_ITEM  VALUES ('EST7', 'Male Puppy', '12.00', 'FIFW02');
INSERT INTO T_ITEM  VALUES ('EST8', 'Female Puppy', '12.00', 'FIFW02');
INSERT INTO T_ITEM  VALUES ('EST9', 'Spotless Male Puppy', '22.00', 'K9BD01');
INSERT INTO T_ITEM  VALUES ('EST10', 'Spotless Female Puppy', '22.00', 'K9BD01');
INSERT INTO T_ITEM  VALUES ('EST11', 'Spotted Male Puppy', '32.00', 'K9PO02');
INSERT INTO T_ITEM  VALUES ('EST12', 'Spotted Female Puppy', '32.00', 'K9PO02');
INSERT INTO T_ITEM  VALUES ('EST13', 'Tailed', '62.00', 'K9DL01');
INSERT INTO T_ITEM  VALUES ('EST14', 'Tailless', '62.00', 'K9DL01');
INSERT INTO T_ITEM  VALUES ('EST15', 'Tailed', '82.00', 'K9RT01');
INSERT INTO T_ITEM  VALUES ('EST16', 'Tailless', '82.00', 'K9RT01');
INSERT INTO T_ITEM  VALUES ('EST17', 'Tailed', '100.00', 'K9RT02');
INSERT INTO T_ITEM  VALUES ('EST18', 'Tailless', '100.00', 'K9RT02');
INSERT INTO T_ITEM  VALUES ('EST19', 'Female Adult', '100.00', 'K9CW01');
INSERT INTO T_ITEM  VALUES ('EST20', 'Female Adult', '100.00', 'K9CW01');
INSERT INTO T_ITEM  VALUES ('EST21', 'Female Adult', '20.00', 'RPSN01');
INSERT INTO T_ITEM  VALUES ('EST22', 'Male Adult', '20.00', 'RPSN01');
INSERT INTO T_ITEM  VALUES ('EST23', 'Male Adult', '120.00','FLDSH01');
INSERT INTO T_ITEM  VALUES ('EST24', 'Female Adult', '120.00', 'FLDSH01');
INSERT INTO T_ITEM  VALUES ('EST25', 'Male Adult', '120.00', 'AVCB01');
INSERT INTO T_ITEM  VALUES ('EST26', 'Female Adult', '120.00', 'AVCB01');

INSERT INTO T_CUSTOMER VALUES ('marc123', 'Marc', 'Fleury', '545 123 45', '65 Ritherdon Road', '', 'Los Angeles', 'LA', '56421', 'USA');
INSERT INTO T_CUSTOMER VALUES ('bill000', 'Bill', 'Gates', '654 046 12', '27 West Side', 'Story', 'Alhabama', 'TX', '8401', 'USA');
INSERT INTO T_CUSTOMER VALUES ('job5', 'Steve', 'Jobs', '548 157 15', '154 Star Boulevard', '', 'San Francisco', 'WC', '5455', 'USA');

jeromefort
Messages : 31
Inscription : 21 oct. 2007 9:03
Localisation : Paris 10

Message par jeromefort » 02 nov. 2007 21:45

Merci

Jérôme

Répondre