You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Felipe (JIRA)" <ji...@apache.org> on 2016/08/29 21:49:20 UTC

[jira] [Comment Edited] (OWB-1140) Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [xxx] is not found with the qualifiers

    [ https://issues.apache.org/jira/browse/OWB-1140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15447150#comment-15447150 ] 

Felipe edited comment on OWB-1140 at 8/29/16 9:48 PM:
------------------------------------------------------

1- Status: Resolved:
I resolved the problem relative to servlet injection primary problem.
in mey context.xml i added the listener. 
 <Listener className="org.apache.webbeans.web.tomcat7.ContextLifecycleListener" />

PS: in owb 1.27 it works fine without listener.
2-  Status: Resolved
Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [br.com.growupge.factory.DAOFactory] is not found with the qualifiers.

I removed all @Inject and @javax.enterprise.inject.Default annotation from my business objects and put only in my asbtract super class ConsultaBase.java, and i added in my inner jar beans.xml the alternative declaration to my alternative class
        <alternatives>
	 	<class>br.com.growupge.factory.SqlSrvDAOFactory</class>
	 </alternatives>

All injection points was validated with sucess and this problem did not show again, but the injection in inherited classes does not works anymore.

3- Status: Pending 
Question: Mark, How can i configure accordingly the @javax.enterprise.inject.Default  DAO class FbirdDAOFactory in method below
protected void setDaoFactory ( DAOFactory daofactory)  from all my same overridden methods bussiness objects ?


was (Author: fop.net):
1- i resolved the problem relative to servlet injection primary problem.
in mey context.xml i added the listener. 
 <Listener className="org.apache.webbeans.web.tomcat7.ContextLifecycleListener" />

PS: in owb 1.27 it works fine without listener.
2-  Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [br.com.growupge.factory.DAOFactory] is not found with the qualifiers.

I removed all @Inject and @javax.enterprise.inject.Default annotation from my business objects and put only in my asbtract super class ConsultaBase.java, and i added in my inner jar beans.xml the alternative declaration to my alternative class
        <alternatives>
	 	<class>br.com.growupge.factory.SqlSrvDAOFactory</class>
	 </alternatives>

All injection points was validated with sucess and this problem did not show again, but the injection in inherited classes does not works anymore.

3- Question: Mark, How can i configure accordingly the @javax.enterprise.inject.Default  DAO class FbirdDAOFactory in method below
protected void setDaoFactory ( DAOFactory daofactory)  from all my same overridden methods bussiness objects ?

> Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [xxx] is not found with the qualifiers 
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: OWB-1140
>                 URL: https://issues.apache.org/jira/browse/OWB-1140
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Injection and Lookup
>    Affects Versions: 1.6.2
>         Environment: Tomcat 7.0.70
>            Reporter: Felipe
>             Fix For: 1.7.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> I was using Tomcat 7.0.54 with owb 1.2.7 and it was working fine.
> So i discovered a bug in tomcat version and then i updated to version 7.0.70, so the cdi stop working, and then i upgrade the owb to 1.6.2 too.
> This is my dependencies: 
> cdi-api-1.2.jar
> geronimo-annotation_1.2_spec-1.0.jar
> geronimo-atinject_1.0_spec-1.0.jar
> geronimo-interceptor_1.2_spec-1.0.jar
> geronimo-jcdi_1.0_spec-1.0.jar
> openwebbeans-el22-1.6.2.jar
> openwebbeans-impl-1.6.2.jar
> openwebbeans-spi-1.6.2.jar
> openwebbeans-tomcat7-1.6.2.jar
> openwebbeans-web-1.6.2.jar
> And i am gettin this following error:
> I have 2 classes:
> @javax.enterprise.inject.Default
> public class FbirdDAOFactory extends DAOFactory 
> @javax.enterprise.inject.Alternative
> public class SqlSrvDAOFactory extends DAOFactory 
> and 
> public abstract class ConsultaBase<DTO> implements Consulta<DTO>, SessaoUsuario {
>       @javax.inject.Inject
>      protected abstract void setDaoFactory(@DefaulDAO DAOFactory      daofactory);
> }
> This stop working because the error below:
> Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [br.com.growupge.factory.DAOFactory] is not found with the qualifiers 
> So i put create a qualifier in FbirdDAOFactory e referenced  the Qualifier in ConsultaBase and all children classes too. So i kept going to receive the same error



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)