openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafael Pestano <rmpest...@yahoo.com.br>
Subject Re: UnsatisfiedResolutionException Api type is not found with the qualifiers
Date Wed, 27 Jun 2012 12:01:22 GMT
Hi romain,

ive already moved the injection point to setter method without success but didnt tried(cant
test it now) to just create a setter method in the provided example.

thanks.

Att, 

Rafael M. Pestano

Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
Graduando em Ciência da Computação UFRGS
http://code.google.com/p/jsf-conventions-framework/
http://rpestano.wordpress.com
http://twitter.com/realpestano



________________________________
De: Romain Manni-Bucau <rmannibucau@gmail.com>
Para: user@openwebbeans.apache.org; Rafael Pestano <rmpestano@yahoo.com.br> 
Enviadas: Quarta-feira, 27 de Junho de 2012 8:24
Assunto: Re: UnsatisfiedResolutionException Api type is not found with the qualifiers


Hi,

did you try adding a setter for the field?

- Romain



2012/6/27 Rafael Pestano <rmpestano@yahoo.com.br>

Hi everyone,
>
>im facing an issue with OWB(works with weld) that i cant inject a field and i want to
know if im doing something wrong, the stacktrace can be found here: http://pastebin.com/Uq5ujzWC
>
>Ill try to explain what im doing:
>
>Here is the implementation of the class which is failing to be injected.
>
>public class UsuarioServiceImpl extends CustomHibernateService<Usuario, Long> implements
UsuarioService  {code here:https://github.com/rmpestano/conventions-issuetracker/blob/master/src/br/com/triadworks/issuetracker/service/impl/IssueServiceImpl.java}
>
>here is the interface: 
>
>public interface UsuarioService extends BaseService<Usuario, Long>{  }
>
>here is the superclass:
>
>@Named
>@CustomService
>public class CustomHibernateService<T,K extends Serializable> extends BaseCustomServiceImpl<T,
K> implements BaseService<T, K> {code and related classes here:http://code.google.com/p/jsf-conventions-framework/source/browse/ConventionsCore/src/main/java/com/jsf/conventions/service/impl/CustomHibernateService.java
>}
>
>the qualifier:
>
>@Qualifier
>@Retention(RUNTIME)
>@Target({METHOD, FIELD, PARAMETER, TYPE})
>public @interface CustomService {
>
>    @Nonbinding
>    Class entity() default byte.class;
>}
>
>and finally the injection point:
>
>
>@Inject @CustomService(entity=Usuario.class)
>private BaseService usuarioService;
>@Inject @CustomService(entity=Projeto.class)
>private BaseService projetoService;
>
>
>Do you have any idea? if you need more information just tell me.
>
> here is the project where this injection works(weld as cdi impl): https://github.com/rpestano/conventions-issuetracker/blob/master/issuetracker/src/br/com/triadworks/issuetracker/controller/ComboBean.java
>
>also in this project i have no problems with this approach: http://code.google.com/p/jsf-conventions-framework/source/browse/ConventionsShowcase/src/main/java/com/jsf/conventions/showcase/controller/ComboMBean.java
>
>and here is the project where it is failing: https://github.com/rmpestano/conventions-issuetracker/blob/master/src/br/com/triadworks/issuetracker/controller/ComboBean.java (note
that im 'workaround' the exception by injecting specific services)
>
>thanks in advance.
>
>Att,
>Rafael M. Pestano
>Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
>Graduando em Ciência da Computação UFRGS
>http://code.google.com/p/jsf-conventions-framework/
>http://rpestano.wordpress.com
>http://twitter.com/realpestano
> 

Mime
View raw message