Bonjour,

J'ai un projet JavaEE (java 1.6.0.2) qui compile et s'exécute sans problème sous eclipse 3.3 (javaEE / JSP / JSTL / tomcat) et lors de la compilation sous Ant il me donne une serie d'erreurs :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
 
[javac] F:\project\eServices\src\com\adpclr\data\maintenance\load\data\LoadList.java:213: type parameter com.adpclr.data.maintenance.load.common.filemask.Filemask<? extends com.adpclr.data.maintenance.load.common.filenameinfo.FilenameInfo<? extends com.adpclr.data.maintenance.load.common.datainfo.DataInfo>> is not within its bound
[javac]         List<FileDescription<? extends DataInfo, Filemask<? extends FilenameInfo<? extends DataInfo>>>> descriptionList = treeLoadList.getFileById(entry.getValue());
[javac]                                                          ^
Ant compile avec la même version de java...

Quand je fais une recherche sur le type d'erreur (lié au générique : is not within its bound), je ne trouve rien de très très probant.

La ligne qui pose probleme :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
List<FileDescription<? extends DataInfo, Filemask<? extends FilenameInfo<? extends DataInfo>>>> descriptionList = treeLoadList.getFileById(entry.getValue());
La déclaration de treeLoadList.getFileById :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
public List<FileDescription<? extends DataInfo, Filemask<? extends FilenameInfo<? extends DataInfo>>>> getFileById(List<Integer> fileListId){
La déclaration de la tache est :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
 
<javac srcdir="${src.dir}" destdir="${temp}/WEB-INF/classes" debug="on" deprecation="off" optimize="off" source="1.6" target="1.6" fork="true">
  <exclude name="**/*Test.java"/>
  <classpath path="${classpath}"/>
</javac>
J'ai ajouté cela à la tache qui lance la compilation avec javac :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
 
<echo message="Java : ${ant.java.version}"/>
<echo message="java home = ${env.JAVA_HOME}"/>
<echo message="${classpath}"/>
Passage qui me renvoi :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 
[echo] eServices Building Ant file
[echo] Java : 1.6
[echo] java home = D:\java\1.6.0.02\
[echo] D:\apache\tomcat\6.0.13\lib\annotations-api.jar
       D:\apache\tomcat\6.0.13\lib\catalina-ant.jar
       D:\apache\tomcat\6.0.13\lib\catalina-ha.jar
       D:\apache\tomcat\6.0.13\lib\catalina-tribes.jar
       D:\apache\tomcat\6.0.13\lib\catalina.jar
       D:\apache\tomcat\6.0.13\lib\el-api.jar
       D:\apache\tomcat\6.0.13\lib\jasper-el.jar
       D:\apache\tomcat\6.0.13\lib\jasper-jdt.jar
       D:\apache\tomcat\6.0.13\lib\jasper.jar
       D:\apache\tomcat\6.0.13\lib\jsp-api.jar
       D:\apache\tomcat\6.0.13\lib\servlet-api.jar
       D:\apache\tomcat\6.0.13\lib\tomcat-coyote.jar
       D:\apache\tomcat\6.0.13\lib\tomcat-dbcp.jar
       D:\apache\tomcat\6.0.13\lib\tomcat-i18n-es.jar
       D:\apache\tomcat\6.0.13\lib\tomcat-i18n-fr.jar
       D:\apache\tomcat\6.0.13\lib\tomcat-i18n-ja.jar
       F:\project\eServices\web\WEB-INF\lib\commons-beanutils.jar
       F:\project\eServices\web\WEB-INF\lib\commons-collections-3.2.jar
       F:\project\eServices\web\WEB-INF\lib\commons-configuration-1.5.jar
       F:\project\eServices\web\WEB-INF\lib\commons-dbcp-1.2.2.jar
       F:\project\eServices\web\WEB-INF\lib\commons-fileupload-1.2.jar
       F:\project\eServices\web\WEB-INF\lib\commons-io-1.3.2.jar
       F:\project\eServices\web\WEB-INF\lib\commons-lang-2.3.jar
       F:\project\eServices\web\WEB-INF\lib\commons-logging-1.1.jar
       F:\project\eServices\web\WEB-INF\lib\commons-logging-adapters-1.1.jar
       F:\project\eServices\web\WEB-INF\lib\commons-logging-api-1.1.jar
       F:\project\eServices\web\WEB-INF\lib\commons-net-1.4.1.jar
       F:\project\eServices\web\WEB-INF\lib\commons-pool-1.3.jar
       F:\project\eServices\web\WEB-INF\lib\iText-2.0.7.jar
       F:\project\eServices\web\WEB-INF\lib\jcommon-1.0.10.jar
       F:\project\eServices\web\WEB-INF\lib\jep.2.3.1.jar
       F:\project\eServices\web\WEB-INF\lib\jfreechart-1.0.6.jar
       F:\project\eServices\web\WEB-INF\lib\jstl.jar
       F:\project\eServices\web\WEB-INF\lib\junit.jar
       F:\project\eServices\web\WEB-INF\lib\log4j-1.2.8.jar
       F:\project\eServices\web\WEB-INF\lib\mail-1.4.jar
       F:\project\eServices\web\WEB-INF\lib\poi-3.0.1-FINAL-20070705.jar
       F:\project\eServices\web\WEB-INF\lib\poi-contrib-3.0.1-FINAL-20070705.jar
       F:\project\eServices\web\WEB-INF\lib\poi-scratchpad-3.0.1-FINAL-20070705.jar
       F:\project\eServices\web\WEB-INF\lib\postgresql-8.2-505.jdbc4.jar
       F:\project\eServices\web\WEB-INF\lib\standard.jar
Help !!!

Merci de votre aide.