TP 09 Echec ant build

Modérateurs : graffion, jmdouin, agoncal, mlebihan

jean-jacques K
Messages : 6
Inscription : 06 nov. 2014 4:38

TP 09 Echec ant build

Message par jean-jacques K » 16 déc. 2014 2:24

Que signifie l'exécution de ant yaps build conduit à cet échec:

[javac] return new TestSuite(CatalogDelegateTest.class);
[javac] ^
[javac] symbol: class TestSuite
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:42: error: cannot find symbol
[javac] fail("Object with unknonw id should not be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:49: error: cannot find symbol
[javac] fail("Object with empty id should not be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:56: error: cannot find symbol
[javac] fail("Object with null id should not be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:78: error: cannot find symbol
[javac] fail("Object has been created it should be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:85: error: cannot find symbol
[javac] if (firstSize + 1 != secondSize) fail("The collection size s
hould have increased by 1");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:92: error: cannot find symbol
[javac] fail("Object has been deleted it shouldn't be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:108: error: cannot find symbol
[javac] fail("Object has not been created yet it shouldn't be fo
und");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:119: error: cannot find symbol
[javac] fail("Object has been created it should be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:128: error: cannot find symbol
[javac] fail("An object with the same id has already been create
d");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:137: error: cannot find symbol
[javac] fail("Object has been deleted it shouldn't be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:154: error: cannot find symbol
[javac] fail("Object with null parameter should not be created")
;
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:162: error: cannot find symbol
[javac] fail("Object with empty values should not be created");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:170: error: cannot find symbol
[javac] fail("Object with null values should not be created");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:190: error: cannot find symbol
[javac] fail("Object has been created it should be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:204: error: cannot find symbol
[javac] fail("Object should be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:215: error: cannot find symbol
[javac] fail("Object has been deleted it shouldn't be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:232: error: cannot find symbol
[javac] fail("Object with null parameter should not be updated")
;
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:240: error: cannot find symbol
[javac] fail("Object with empty values should not be updated");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:248: error: cannot find symbol
[javac] fail("Object with null values should not be updated");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:262: error: cannot find symbol
[javac] fail("Object has not been created it shouldn't be found"
);
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:269: error: cannot find symbol
[javac] fail("Deleting an unknown object should break");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:290: error: cannot find symbol
[javac] fail("Object with unknonw id should not be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:297: error: cannot find symbol
[javac] fail("Object with empty id should not be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:304: error: cannot find symbol
[javac] fail("Object with null id should not be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:326: error: cannot find symbol
[javac] fail("Object has been created it should be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:333: error: cannot find symbol
[javac] if (firstSize + 1 != secondSize) fail("The collection size s
hould have increased by 1");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:340: error: cannot find symbol
[javac] fail("Object has been deleted it shouldn't be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:356: error: cannot find symbol
[javac] if (firstSize != 0) fail("The collection should be empty");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:365: error: cannot find symbol
[javac] fail("Object has been created it should be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:372: error: cannot find symbol
[javac] if (firstSize + 1 != secondSize) fail("The collection size s
hould have increased by 1");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:381: error: cannot find symbol
[javac] fail("Object has been created it should be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:389: error: cannot find symbol
[javac] if (thirdSize != secondSize) fail("The collection should hav
e the same size");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:396: error: cannot find symbol
[javac] fail("Object has been deleted it shouldn't be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:412: error: cannot find symbol
[javac] fail("Object has not been created yet it shouldn't be fo
und");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:423: error: cannot find symbol
[javac] fail("Object has been created it should be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:432: error: cannot find symbol
[javac] fail("An object with the same id has already been create
d");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:441: error: cannot find symbol
[javac] fail("Object has been deleted it shouldn't be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:458: error: cannot find symbol
[javac] fail("Object with null parameter should not be created")
;
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:466: error: cannot find symbol
[javac] fail("Object with empty values should not be created");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:474: error: cannot find symbol
[javac] fail("Object with null values should not be created");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:494: error: cannot find symbol
[javac] fail("Object has been created it should be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:508: error: cannot find symbol
[javac] fail("Object should be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:519: error: cannot find symbol
[javac] fail("Object has been deleted it shouldn't be found");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:536: error: cannot find symbol
[javac] fail("Object with null parameter should not be updated")
;
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] C:\Users\Ntadi\GLG203\TP09\Yaps\test\src\com\yaps\petstore\common\de
legate\CatalogDelegateTest.java:544: error: cannot find symbol
[javac] fail("Object with empty values should not be updated");
[javac] ^
[javac] symbol: method fail(String)
[javac] location: class CatalogDelegateTest
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 100 errors

BUILD FAILED
C:\Users\Ntadi\GLG203\TP09\build.xml:208: The following error occurred while exe
cuting this line:
C:\Users\Ntadi\GLG203\TP09\build.xml:224: Compile failed; see the compiler error
output for details.

Merci d'avance pour les explications

mariko_l
Messages : 7
Inscription : 01 déc. 2014 23:47

Re: TP 09 Echec ant build

Message par mariko_l » 16 déc. 2014 10:59

Bonjour,
Je pense que cette erreur est due au fait que ant yaps ne trouve pas la librairie junit:
Dans votre environnement il faut positionner la variable d'environnement JUNIT_HOME. Soit au niveau du système, soit au niveau du shell que vous utilisez.
D'autre part, si la variable d'environnement JUNIT_HOME est positionnée, assurez vous que la librairie junit-4.4.jar est accessible de la façon suivante:
JUNIT_HOME/junit-4.4.jar

jean-jacques K
Messages : 6
Inscription : 06 nov. 2014 4:38

Re: TP 09 Echec ant build

Message par jean-jacques K » 16 déc. 2014 22:58

Voici mes variables d'environnement. Sont elles correctes.

set JAVA_HOME=C:\java\jdk1.7.0_71
set JRE_HOME=C:\java\jdk1.7.0_71\jre
set ANT_HOME=C:\java\apache-ant-1.8.4
set JUNIT_HOME=C\java\junit4.4
set MYSQL_HOME=C:\Applications\MySQL
set TOMCAT_HOME=C:\Applications\apache-tomcat-7.0.55
set HTTPUNIT_HOME=C:\Applications\httpunit-1.6.2
set DOM4J_HOME=C:\Java\dom4j-1.6.1

PATH "%JRE_HOME%\bin";"%JAVA_HOME%\bin";%ANT_HOME%\bin;"%TOMCAT_HOME%\bin";%PATH%

set CLASSPATH=.;%JUNIT_HOME%\junit4.4.jar

mariko_l
Messages : 7
Inscription : 01 déc. 2014 23:47

Re: TP 09 Echec ant build

Message par mariko_l » 19 déc. 2014 11:43

Bonjour,

Vos variables d'environnement sont:

set JAVA_HOME=C:\java\jdk1.7.0_71
set JRE_HOME=C:\java\jdk1.7.0_71\jre
set ANT_HOME=C:\java\apache-ant-1.8.4
set JUNIT_HOME=C\java\junit4.4
set MYSQL_HOME=C:\Applications\MySQL
set TOMCAT_HOME=C:\Applications\apache-tomcat-7.0.55
set HTTPUNIT_HOME=C:\Applications\httpunit-1.6.2
set DOM4J_HOME=C:\Java\dom4j-1.6.1

PATH "%JRE_HOME%\bin";"%JAVA_HOME%\bin";%ANT_HOME%\bin;"%TOMCAT_HOME%\bin";%PATH%

set CLASSPATH=.;%JUNIT_HOME%\junit4.4.jar

Concernant set JUNIT_HOME=C\java\junit4.4, il manque le ":" après le lecteur C:
Cela devrait être:
JUNIT_HOME=C:\java\junit4.4

Répondre