1 Reply Latest reply on Jan 10, 2012 3:57 AM by Jozef Hartinger

    Alternative through @Stereotype can not be enable

    Jorge Simao Newbie
      I've this stereotype:

      @Target({ TYPE })
      public @interface Repository {

      And use it in a Dao:
      public class JdbcAccountDao extends JdbcAbstractDao implements AccountDao {

      but when I try to enable JdbcAccountDao in beans.xml:


      it does not work...give error:

      org.jboss.weld.exceptions.DeploymentException: WELD-001422 Enabled alternative <class>ebank.dao.jdbc.JdbcAccountDao</class> in file:/home/jsimao/mydocs/courses/jee/workspace/jee-01-cdi-ebank/bin/META-INF/beans.xml@16 is not annotated @Alternative

      Any guess?....
      ...it should work, according to the CDI spec...right?

      Thanks in advance for your help,