[weld-issues] [JBoss JIRA] Assigned: (WELD-381) Proxied EJBs as Injection point, wrong interface chosen

Pete Muir (JIRA) jira-events at lists.jboss.org
Mon Jan 25 12:17:19 EST 2010


     [ https://jira.jboss.org/jira/browse/WELD-381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pete Muir reassigned WELD-381:
------------------------------

    Assignee: Pete Muir


> Proxied EJBs as Injection point, wrong interface chosen
> -------------------------------------------------------
>
>                 Key: WELD-381
>                 URL: https://jira.jboss.org/jira/browse/WELD-381
>             Project: Weld
>          Issue Type: Bug
>          Components: Resolution (Typesafe and by Name)
>    Affects Versions: 1.0.0.GA
>         Environment: GF v3, JDK 1.6, Windows
>            Reporter: John Ament
>            Assignee: Pete Muir
>             Fix For: 1.0.1.CR1
>
>
> Based on the forum post, The following EJB cannot be injected into clients:
> @DAO
> @Local(ResultDAOBean.class)
> @Stateless
> public ResultDAO extends AbstractDAO<Result> implements ResultDAOBean
> Happens the same with/without @Local
> The problem comes in when AbstractDAO implements something (e.g. AbstractDAOBean<E>) or ResultDAOBean extends an interfacet (e.g.AbstractDAOBean<E>).  The interface AbstractDAOBean isn't marked as an EJB itnerface, and only one of these two would implement/extend it (ideally, ResultDAOBean).
> The injection point results in the following exception:
> Caused by: java.lang.IllegalStateException: Unable to convert ejbRef for ejb ResultDAO to a business object of type interface AbstractDAOBean
>         at com.sun.ejb.containers.EjbContainerServicesImpl.getBusinessObject(EjbContainerServicesImpl.java:104)
>         at org.glassfish.weld.ejb.SessionObjectReferenceImpl.getBusinessObject(SessionObjectReferenceImpl.java:60)
>         at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:121)
>         at jpa.dao.EvaluationDAOBean_$$_javassist_110.getEM(EvaluationDAOBean_$$_javassist_110.java)
>         at NewSessionBean.init(NewSessionBean.java:30)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at com.sun.ejb.containers.interceptors.BeanCallbackInterceptor.intercept(InterceptorManager.java:1006)
>         at com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:61)
>         at com.sun.ejb.containers.interceptors.CallbackInvocationContext.proceed(CallbackInvocationContext.java:109)
>         at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCallback(SystemInterceptorProxy.java:133)
>         at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.init(SystemInterceptorProxy.java:115)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at com.sun.ejb.containers.interceptors.CallbackInterceptor.intercept(InterceptorManager.java:961)
>         at com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:61)
>         at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:390)
>         at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:373)
>         at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:518)
>         ... 38 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list