[seam-issues] [JBoss JIRA] (SOLDER-333) @Unwraps annotation requires @Named(value="something") on declaring bean

Egor Kolesnikov (JIRA) jira-events at lists.jboss.org
Fri Jul 6 21:53:12 EDT 2012


Egor Kolesnikov created SOLDER-333:
--------------------------------------

             Summary: @Unwraps annotation requires @Named(value="something") on declaring bean
                 Key: SOLDER-333
                 URL: https://issues.jboss.org/browse/SOLDER-333
             Project: Solder
          Issue Type: Feature Request
    Affects Versions: 3.1.0.Final
         Environment: JBoss-7.1.1.Final
            Reporter: Egor Kolesnikov


Solder throws "Could not find declaring bean for @Unwrap method class com.esk.diyweb.web.admin.domain.DomainHolder.getSelectedDomain" exception when @Named annotation has no value on a bean declaring @Unwraps method. If this is expected behaviour, please add a note on Solder documentation.

{code}
@SessionScoped
@Named //this fails
public class DomainHolder implements Serializable {

    private Domain selectedDomain;

    @Unwraps
    public Domain getSelectedDomain() {
        return this.selectedDomain;
    }
}

/*-----------------*/

@SessionScoped
@Named(value="domainHolder") //this works
public class DomainHolder implements Serializable {

    private Domain selectedDomain;

    @Unwraps
    public Domain getSelectedDomain() {
        return this.selectedDomain;
    }
}

{code}

Stacktrace follows:

Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Could not find declaring bean for @Unwrap method class com.esk.diyweb.web.admin.domain.DomainHolder.getSelectedDomain
	at org.jboss.solder.unwraps.UnwrapsInvocationHandler.<init>(UnwrapsInvocationHandler.java:61) [solder-impl-3.1.1.Final.jar:3.1.1.Final]
	at org.jboss.solder.unwraps.UnwrapsProducerBean.create(UnwrapsProducerBean.java:177) [solder-impl-3.1.1.Final.jar:3.1.1.Final]
	at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:61) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:616) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:681) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:118) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:703) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:712) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:161) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:157) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:131) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:153) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:290) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.seam.faces.context.ViewScopedContext.get(ViewScopedContext.java:75) [seam-faces-3.1.0.Final.jar:3.1.0.Final]
	at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at com.esk.diyweb.web.admin.website.PageAction$Proxy$_$$_WeldClientProxy.prepareView(PageAction$Proxy$_$$_WeldClientProxy.java) [classes:]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [classes.jar:1.6.0_33]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [classes.jar:1.6.0_33]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [classes.jar:1.6.0_33]
	at java.lang.reflect.Method.invoke(Method.java:597) [classes.jar:1.6.0_33]
	at org.apache.el.parser.AstValue.invoke(AstValue.java:262) [jbossweb-7.0.13.Final.jar:]
	at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278) [jbossweb-7.0.13.Final.jar:]
	at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) [jsf-impl-2.1.7-jbossorg-2.jar:]
	at org.jboss.seam.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:63) [seam-faces-api-3.1.0.Final.jar:3.1.0.Final]
	... 38 more


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list