[weld-dev] WELD-001423 Cannot enable the same alternative

Sebastian E. Ovide sebastian.ovide at gmail.com
Tue Jul 26 05:44:04 EDT 2011


Hi All,

I'm getting this strange error and cannot understand the reason...

WELD-001423 Cannot enable the same alternative bean class class
com.sebas.CurrencyExchangeWebservicexNetImp in beans.xml

here is the code


public class CurrencyExchangerHelper {
    @Inject
    static CurrencyExchangeService currencyExchangeService;
 ...
}

public interface CurrencyExchangeService {
...
}


public class CurrencyExchangeMockImp implements CurrencyExchangeService{
...
}

@Alternative
public class CurrencyExchangeWebservicexNetImp implements
CurrencyExchangeService {
...
}

and my beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="
      http://java.sun.com/xml/ns/javaee
      http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
   <alternatives>
       <class>com.sebas.CurrencyExchangeWebservicexNetImp</class>
   </alternatives>
   <decorators/>
   <interceptors/>
</beans>


any ideas ?

(running Glassfish 3.0.1)
-- 
Sebastian E. Ovide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20110726/9d416172/attachment.html 


More information about the weld-dev mailing list