Bonjour,
En déployant mon site J2EE (JAVA 1.6, EJB 3.0, glassfish/netbeans), j'ai l'erreur suivante :
	
	org.jboss.weld.exceptions.AmbiguousResolutionException: WELD-001318 Cannot resolve an ambiguous dependency between [org.jboss.weld.bean-xxx/-ManagedBean-class yyy.exception.ObjectExistsException, org.jboss.weld.bean-xxx/-ManagedBean-class yyy.cachemanager.exception.CacheException]
 Voici les deux classes en question :
	
	1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
   | public class CacheException extends RuntimeException {
 
 
    /**
     * Constructeurs
     */
    public CacheException() {
        super();
    }
 
    public CacheException(String message) {
        super(message);
    }
 
    public CacheException(String message, Throwable cause) {
        super(message, cause);
    }
 
    public CacheException(Throwable cause) {
        super(cause);
    }
 
} | 
 
	
	1 2 3 4 5 6 7 8 9 10 11
   | public final class ObjectExistsException extends CacheException {
 
    public ObjectExistsException() {
        super();
    }
 
    public ObjectExistsException(String message) {
        super(message);
    }
 
} | 
 
Selon Oracle,
AmbiguousResolutionException
	
	Indicates that multiple beans match a certain combination of required type and required qualifiers and are eligible for injection into a certain class.
 Seulement, je ne vois pas ici d'où pourrait venir le problème (le mapping a été bien fait)...
En vous remerciant d'avance pour vos lumières,
Jaime Lannister
						
					
Partager