13 Replies Latest reply on Nov 14, 2006 1:08 PM by Chris Fraser

    Seam 1.1 beta1&2 (dis?)injecting issue

    Peter Brewer Novice

      I've got a web app built on JBoss Seam 1.0.1.GA that works fine. I've tried to upgrade to both 1.1beta1 and 1.1beta2, but I get an error when seam trys to inject a value.

      I've stepped through some of the code:

      extract from Component.java

      1513 private void setFieldValue(Object bean, Field field, String name, Object value)
      1514 {
      1515 try
      1516 {
      1517 Reflections.set(field, bean, value);
      1518 }
      1519 catch (Exception e)
      1520 {
      1521 throw new IllegalArgumentException("could not set field value: " + getAttributeMessage(name), e);
      1522 }
      1523 }
      


      and have discovered that the bean parameter refers to one of my Seam beans (the ResourceLoader class) and the field parameter's declaring class is an entirely different class (the LoginAction class). The name parameter is "loggedInUser" and the value is null.

      Even more odd is that ResourceLoader has no @In annotated fields - just a @PersistenceContext annotation.

      The error is shown in the log extract below. The bold line in the log is the last line displayed before my breakpoint is hit in Component at line 1517.

      Any hints, ideas or suggestions would be gratefully received. If you need more information, please don't hesitate to ask.

      Cheers, Pete
      Error log:
      13-11 12:24:57 DEBUG [Lifecycle] Session started
      13-11 12:24:57 TRACE [SeamPhaseListener] before phase: RESTORE_VIEW(1)
      13-11 12:24:57 DEBUG [Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      13-11 12:24:57 DEBUG [AbstractSeamPhaseListener] beginning transaction prior to phase: RESTORE_VIEW(1)
      13-11 12:24:57 DEBUG [Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      13-11 12:24:57 DEBUG [Lifecycle] >>> Begin web request
      13-11 12:24:57 DEBUG [Component] instantiating Seam component: events
      13-11 12:24:57 DEBUG [Component] initializing new instance of: events
      13-11 12:24:57 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.events
      13-11 12:24:57 INFO [Events] no events.xml file found
      13-11 12:24:57 DEBUG [Events] Processing event:org.jboss.seam.postCreate.events
      13-11 12:24:57 DEBUG [Component] instantiating Seam component: localeSelector
      13-11 12:24:57 DEBUG [Component] initializing new instance of: localeSelector
      13-11 12:24:57 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.localeSelector
      13-11 12:24:57 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.localeSelector
      13-11 12:24:57 DEBUG [Events] Processing event:org.jboss.seam.postCreate.localeSelector
      13-11 12:24:57 TRACE [SeamPhaseListener] after phase: RESTORE_VIEW(1)
      13-11 12:24:57 DEBUG [Component] instantiating Seam component: org.jboss.seam.core.manager
      13-11 12:24:57 DEBUG [Component] initializing new instance of: org.jboss.seam.core.manager
      13-11 12:24:57 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.manager
      13-11 12:24:57 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.manager
      13-11 12:24:57 DEBUG [Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.manager
      13-11 12:24:58 DEBUG [Component] instantiating Seam component: org.jboss.seam.core.facesPage
      13-11 12:24:58 DEBUG [Component] initializing new instance of: org.jboss.seam.core.facesPage
      13-11 12:24:58 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.facesPage
      13-11 12:24:58 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.facesPage
      13-11 12:24:58 DEBUG [Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.facesPage
      13-11 12:24:58 DEBUG [Manager] No stored conversation, or concurrent call to the stored conversation
      13-11 12:24:58 DEBUG [Component] instantiating Seam component: pageflow
      13-11 12:24:58 DEBUG [Component] initializing new instance of: pageflow
      13-11 12:24:58 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.pageflow
      13-11 12:24:58 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.pageflow
      13-11 12:24:58 DEBUG [Events] Processing event:org.jboss.seam.postCreate.pageflow
      13-11 12:24:58 DEBUG [AbstractSeamPhaseListener] After restoring conversation context: ConversationContext(1)
      13-11 12:24:58 DEBUG [Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      13-11 12:24:58 DEBUG [AbstractSeamPhaseListener] committing transaction after phase: RESTORE_VIEW(1)
      13-11 12:24:58 DEBUG [Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      13-11 12:24:59 TRACE [SeamPhaseListener] before phase: RENDER_RESPONSE(6)
      13-11 12:24:59 DEBUG [Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      13-11 12:24:59 DEBUG [AbstractSeamPhaseListener] beginning transaction prior to phase: RENDER_RESPONSE(6)
      13-11 12:24:59 DEBUG [Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      13-11 12:24:59 DEBUG [Component] instantiating Seam component: org.jboss.seam.core.pages
      13-11 12:24:59 DEBUG [Component] initializing new instance of: org.jboss.seam.core.pages
      13-11 12:24:59 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.pages
      13-11 12:24:59 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.pages
      13-11 12:24:59 INFO [Pages] reading pages.xml
      13-11 12:25:00 DEBUG [Component] instantiating Seam component: businessProcess
      13-11 12:25:00 DEBUG [Component] initializing new instance of: businessProcess
      13-11 12:25:00 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.businessProcess
      13-11 12:25:00 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.businessProcess
      13-11 12:25:00 DEBUG [Events] Processing event:org.jboss.seam.postCreate.businessProcess
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Contexts] found in application context: expressions
      13-11 12:25:00 DEBUG [Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.pages
      13-11 12:25:00 DEBUG [Events] Processing event:org.jboss.seam.preRemoveVariable.conversationList
      13-11 12:25:00 DEBUG [Events] Processing event:org.jboss.seam.postRemoveVariable.conversationList
      13-11 12:25:00 DEBUG [Events] Processing event:org.jboss.seam.preRemoveVariable.switcher
      13-11 12:25:00 DEBUG [Events] Processing event:org.jboss.seam.postRemoveVariable.switcher
      13-11 12:25:00 DEBUG [Events] Processing event:org.jboss.seam.preRemoveVariable.conversationStack
      13-11 12:25:00 DEBUG [Events] Processing event:org.jboss.seam.postRemoveVariable.conversationStack
      13-11 12:25:01 DEBUG [SeamVariableResolver] resolving name: login
      13-11 12:25:01 DEBUG [Component] instantiating Seam component: login
      13-11 12:25:01 DEBUG [Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      13-11 12:25:01 DEBUG [Component] instantiating Seam component: reloadableResource
      13-11 12:25:01 DEBUG [Component] initializing new instance of: reloadableResource
      13-11 12:25:01 TRACE [RootInterceptor] intercepted: reloadableResource.POST_CONSTRUCT
      13-11 12:25:01 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.reloadableResource
      13-11 12:25:01 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.reloadableResource
      13-11 12:25:01 DEBUG [Events] Processing event:org.jboss.seam.postCreate.reloadableResource
      13-11 12:25:01 TRACE [RootInterceptor] intercepted: reloadableResource.getResourceBundle
      13-11 12:25:01 TRACE [BijectionInterceptor] injecting dependencies of: reloadableResource
      13-11 12:25:01 DEBUG [Component] trying to inject with hierarchical context search: sessionContext
      13-11 12:25:01 DEBUG [Contexts] found in application context: sessionContext
      13-11 12:25:02 DEBUG [Component] initializing new instance of: login
      13-11 12:25:02 TRACE [RootInterceptor] intercepted: login.POST_CONSTRUCT
      13-11 12:25:02 TRACE [RootInterceptor] intercepted: login.loadResourceBundle
      13-11 12:25:02 TRACE [BijectionInterceptor] injecting dependencies of: login
      13-11 12:25:02 DEBUG [Component] trying to inject with hierarchical context search: loggedInUser
      13-11 12:25:02 DEBUG [Component] instantiating Seam component: loggedInUser
      13-11 12:25:02 DEBUG [Component] initializing new instance of: loggedInUser
      13-11 12:25:02 TRACE [RootInterceptor] intercepted: loggedInUser.POST_CONSTRUCT
      13-11 12:25:02 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.loggedInUser
      13-11 12:25:02 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.loggedInUser
      13-11 12:25:02 DEBUG [Events] Processing event:org.jboss.seam.postCreate.loggedInUser
      13-11 12:25:02 TRACE [RootInterceptor] intercepted: loggedInUser.getUserService
      13-11 12:25:02 TRACE [BijectionInterceptor] injecting dependencies of: loggedInUser
      13-11 12:25:02 DEBUG [Component] trying to inject with hierarchical context search: mysiteEm
      13-11 12:25:02 DEBUG [Component] instantiating Seam component: mysiteEm
      13-11 12:25:02 DEBUG [Component] initializing new instance of: mysiteEm
      13-11 12:25:02 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.mysiteEm
      13-11 12:25:02 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.mysiteEm
      13-11 12:25:02 DEBUG [Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      13-11 12:25:02 DEBUG [Component] instantiating Seam component: org.jboss.seam.core.persistenceContexts
      13-11 12:25:02 DEBUG [Component] initializing new instance of: org.jboss.seam.core.persistenceContexts
      13-11 12:25:02 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.persistenceContexts
      13-11 12:25:02 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.persistenceContexts
      13-11 12:25:02 DEBUG [Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.persistenceContexts
      13-11 12:25:02 DEBUG [Contexts] found in conversation context: org.jboss.seam.core.persistenceContexts
      13-11 12:25:02 DEBUG [ManagedPersistenceContext] created seam managed persistence context for persistence unit: java:/EntityManagerFactories/mysiteEMF
      13-11 12:25:02 DEBUG [Events] Processing event:org.jboss.seam.postCreate.mysiteEm
      13-11 12:25:02 DEBUG [Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      13-11 12:25:02 DEBUG [Component] trying to inject with hierarchical context search: loggedInUserId
      13-11 12:25:03 TRACE [BijectionInterceptor] disinjecting dependencies of: loggedInUser
      13-11 12:28:19 DEBUG [Contexts] found in conversation context: org.jboss.seam.core.persistenceContexts
      13-11 12:28:19 TRACE [RootInterceptor] intercepted: login.PRE_DESTORY
      13-11 12:28:19 DEBUG [Component] initializing new instance of: login
      13-11 12:28:19 TRACE [RootInterceptor] intercepted: login.POST_CONSTRUCT
      13-11 12:28:19 TRACE [RootInterceptor] intercepted: login.logError
      13-11 12:28:19 TRACE [BijectionInterceptor] injecting dependencies of: login
      13-11 12:28:19 DEBUG [Component] trying to inject with hierarchical context search: loggedInUser
      13-11 12:28:19 DEBUG [Contexts] found in event context: loggedInUser
      13-11 12:28:19 TRACE [RootInterceptor] intercepted: loggedInUser.getUserService
      13-11 12:28:19 TRACE [BijectionInterceptor] injecting dependencies of: loggedInUser
      13-11 12:28:19 DEBUG [Component] trying to inject with hierarchical context search: mysiteEm
      13-11 12:28:19 DEBUG [Contexts] found in conversation context: mysiteEm
      13-11 12:28:19 DEBUG [Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      13-11 12:28:19 DEBUG [Component] trying to inject with hierarchical context search: loggedInUserId
      13-11 12:28:19 TRACE [BijectionInterceptor] disinjecting dependencies of: loggedInUser
      13-11 12:28:19 DEBUG [Contexts] found in conversation context: org.jboss.seam.core.persistenceContexts
      13-11 12:28:19 TRACE [RootInterceptor] intercepted: login.PRE_DESTORY
      13-11 12:28:19 ERROR [ReloadableResource] Unable to access ResourceLoader bean.
      javax.ejb.EJBTransactionRolledbackException: java.lang.IllegalArgumentException: could not set field value: login.loggedInUser
       at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)
       at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
       at $Proxy106.loadResourceBundle(Unknown Source)
       at uk.co.iblocks.mysite.web.ReloadableResource.loadResourceBundle(ReloadableResource.java:158)
       at uk.co.iblocks.mysite.web.ReloadableResource.getResourceBundle(ReloadableResource.java:107)
       at uk.co.iblocks.mysite.web.ReloadableResource$$FastClassByCGLIB$$7e9fba4e.invoke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
       at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:51)
       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:585)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
       at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:79)
       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:585)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
       at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
       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:585)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
       at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:33)
       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:585)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
       at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:55)
       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:585)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
       at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:50)
       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:585)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
       at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:28)
       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:585)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
       at org.jboss.seam.interceptors.SynchronizationInterceptor.serialize(SynchronizationInterceptor.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:585)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
       at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
       at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
       at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:128)
       at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:69)
       at uk.co.iblocks.mysite.web.ReloadableResource$$EnhancerByCGLIB$$5d3ec42a.getResourceBundle(<generated>)
       at uk.co.iblocks.jsf.Utils.getResourceBundle(Utils.java:138)
       at uk.co.iblocks.jsf.Utils.getBundleMessage(Utils.java:122)
       at uk.co.iblocks.jsf.Utils.getBundleMessage(Utils.java:103)
       at uk.co.iblocks.jsf.Utils.getBundleMessage(Utils.java:96)
       at uk.co.iblocks.mysite.web.LoginAction.resetInfo(LoginAction.java:102)
       at uk.co.iblocks.mysite.web.LoginAction.<init>(LoginAction.java:98)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
       at org.jboss.ejb3.EJBContainer.construct(EJBContainer.java:478)
       at org.jboss.ejb3.AbstractPool.create(AbstractPool.java:62)
       at org.jboss.ejb3.ThreadlocalPool.get(ThreadlocalPool.java:48)
       at org.jboss.ejb3.cache.NoPassivationCache.create(NoPassivationCache.java:70)
       at org.jboss.ejb3.stateful.StatefulContainer.createSession(StatefulContainer.java:210)
       at org.jboss.ejb3.stateful.StatefulLocalProxyFactory.createProxy(StatefulLocalProxyFactory.java:100)
       at org.jboss.ejb3.JndiProxyFactory.getObjectInstance(JndiProxyFactory.java:52)
       at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
       at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1131)
       at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1148)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:706)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       at org.jboss.seam.Component.instantiateSessionBean(Component.java:999)
       at org.jboss.seam.Component.instantiate(Component.java:986)
       at org.jboss.seam.Component.newInstance(Component.java:1665)
       at org.jboss.seam.Component.getInstance(Component.java:1583)
       at org.jboss.seam.Component.getInstance(Component.java:1557)
       at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:45)
       at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
       at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:574)
       at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
       at org.apache.myfaces.el.ValueBindingImpl.resolveToBaseAndProperty(ValueBindingImpl.java:455)
       at org.apache.myfaces.el.MethodBindingImpl.resolveToBaseAndProperty(MethodBindingImpl.java:180)
       at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:114)
       at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:59)
       at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:71)
       at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:97)
       at org.jboss.seam.core.Pages.callAction(Pages.java:276)
       at org.jboss.seam.core.Pages.callAction(Pages.java:254)
       at org.jboss.seam.jsf.AbstractSeamPhaseListener.callPageActions(AbstractSeamPhaseListener.java:201)
       at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:149)
       at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:50)
       at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:373)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:67)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:223)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.IllegalArgumentException: could not set field value: login.loggedInUser
       at org.jboss.seam.Component.setFieldValue(Component.java:1521)
       at org.jboss.seam.Component.injectFields(Component.java:1312)
       at org.jboss.seam.Component.inject(Component.java:1082)
       at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:48)
       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:585)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
       at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:79)
       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:585)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
       at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
       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:585)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
       at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:55)
       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:585)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
       at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:50)
       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:585)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
       at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
       at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
       at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:46)
       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:585)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
       at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
       ... 165 more
      Caused by: java.lang.IllegalArgumentException: Could not set field value by reflection: LoginAction.loggedInUser on: uk.co.iblocks.mysite.web.ResourceLoaderBean with null value
       at org.jboss.seam.util.Reflections.set(Reflections.java:75)
       at org.jboss.seam.Component.setFieldValue(Component.java:1517)
       ... 223 more
      Caused by: java.lang.IllegalArgumentException
       at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:37)
       at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:57)
       at java.lang.reflect.Field.set(Field.java:656)
       at org.jboss.seam.util.Reflections.set(Reflections.java:61)
       ... 224 more
      


        • 1. Re: Seam 1.1 beta1&2 (dis?)injecting issue
          Gavin King Master

          This looks like a bug in Seam, and I kinda "half" see what is going on (and I think I know the fix), but I don't quite see everything. Can you please submit a cut-down testcase to JIRA so I can reproduce this?

          TIA

          • 2. Re: Seam 1.1 beta1&2 (dis?)injecting issue
            Gavin King Master

            What I don't get is exactly *why* is the reloadableResource component getting instantiated when it is - what causes it to get instantiated right *then*.

            • 3. Re: Seam 1.1 beta1&2 (dis?)injecting issue
              Gavin King Master

              I committed a change to CVS that probably fixes this issue, but I still need to understand why it was needed.

              • 4. Re: Seam 1.1 beta1&2 (dis?)injecting issue
                Peter Brewer Novice

                Thanks for the prompt response. Perhaps what I'm doing is a little unusual. I've created a simple way to update resource bundle messages that is intended to be a stop-gap until java 6 sorts out ResourceBundles.

                My application also has a login component that takes a username and password. But the username textbox is pre-populated with a prompt for a user name, and it gets that from the reloadable resource.

                So when the loginAction is created, it needs to access/ create the reloadable resource. See the code extracts below.

                I'll checkout cvs head and give it a go. Did you still want a test-case for this issue? Let me know if you need any more info.

                Cheers, Pete.

                LoginAction.java extract:

                @Stateful
                @Scope(CONVERSATION)
                @Name ( "login" )
                @TransactionAttribute(NOT_SUPPORTED)
                @Intercept(ALWAYS)
                public class LoginAction implements Login, Serializable {
                
                 private static final long serialVersionUID = -3794420136503008665L;
                
                 private static final Logger LOG = Logger.getLogger( LoginAction.class );
                
                 public static final String LOGIN_USER_KEY = "loggedInUser";
                 public static final String LOGIN_USER_ID_KEY = "loggedInUserId";
                
                 @PersistenceContext(type=EXTENDED)
                 private EntityManager em;
                
                 @In(create=true, required=false, value=LOGIN_USER_KEY)
                 private User loggedInUser ;
                
                 @In (create=true)
                 private Context sessionContext;
                
                 @In(create = true)
                 private transient FacesMessages facesMessages;
                
                 @In ( create = true )
                 private Actor actor;
                
                 private String username ;
                 private String password ;
                 private String newPassword = "" ;
                 private String repeatPassword ="" ;
                
                 public LoginAction() {
                 resetInfo() ;
                 }
                
                 private void resetInfo() {
                 // default to the username prompt...
                 setUserName( Utils.getBundleMessage("username") );
                 setPassword( "" );
                 setNewPassword("") ;
                 setRepeatPassword("") ;
                 }
                 ...
                

                Utils.java extract:
                ...
                 public static String getBundleMessage(String messageId) {
                
                 FacesContext facesContext = FacesContext.getCurrentInstance();
                 String bundleName = facesContext.getApplication().getMessageBundle();
                 Locale locale = facesContext.getViewRoot().getLocale();
                
                 String message = "?" + messageId + "?";
                 if ( bundleName != null ) {
                 try {
                 message = getResourceBundle(bundleName, locale).getProperty(messageId) ;
                
                 if ( params != null ) {
                 MessageFormat mf = new MessageFormat( message, locale );
                 message = mf.format( params ).toString();
                 }
                
                 } catch (MissingResourceException e ) {
                 LOG.debug("Cannot find message for bundle " + bundleName + " message Id = " + messageId);
                 }
                 }
                 return message;
                 }
                
                 public static Properties getResourceBundle(String bundleName, Locale locale) {
                 return ReloadableResource.instance().getResourceBundle(bundleName, locale) ;
                 }
                ...
                


                ReloadableResource.java extract:
                ...
                 public static ReloadableResource instance() {
                 if (Contexts.isSessionContextActive()) {
                 return (ReloadableResource) Component.getInstance( "reloadableResource", true ) ;
                 } else {
                 LOG.debug("ResourceBundle is being accessed outside of web context.") ;
                 return new ReloadableResource() ;
                 }
                 }
                ...
                


                • 5. Re: Seam 1.1 beta1&2 (dis?)injecting issue
                  Peter Brewer Novice

                  Unfortunately, cvs head (includes Component.java version 1.206) doesn't seem to solve the problem. I get exactly the same error.

                  If you still want me to, I'll look into building a test case sometime tomorrow. Not fully understanding the error, it may take me a little while to get the test case to a sufficiently small state.

                  Cheers, Pete.

                  • 6. Re: Seam 1.1 beta1&2 (dis?)injecting issue
                    Gavin King Master

                    thanks, i need the test

                    • 7. Re: Seam 1.1 beta1&2 (dis?)injecting issue
                      Gavin King Master

                      I did a second commit, try again now.

                      • 8. Re: Seam 1.1 beta1&2 (dis?)injecting issue
                        Chris Fraser Newbie

                        I'm experiencing this same problem, even after synching with the latest CVS rev. Here's a really simple set of classes that should help you recreate the problem:

                        TestService EJB interface...

                        package com.testcase.service;
                        
                        import javax.ejb.Local;
                        
                        @Local
                        public interface TestService {
                         public Object getObject(Long objectId);
                        
                        }


                        TestService EJB impl...
                        package com.testcase.service;
                        
                        import javax.ejb.Stateless;
                        
                        @Stateless
                        public class TestServiceBean implements TestService {
                        
                         public Object getObject (Long objectId) {
                         return new Object();
                         }
                        }


                        TestObject EJB Seam Component interface...
                        package com.testcase.faces;
                        
                        import javax.ejb.Local;
                        
                        @Local
                        public interface TestObject {
                         public Object getObject();
                        
                         public void destroy();
                        }


                        package com.testcase.faces;
                        
                        import static org.jboss.seam.ScopeType.EVENT;
                        
                        import javax.ejb.EJB;
                        import javax.ejb.Remove;
                        import javax.ejb.Stateful;
                        
                        import org.jboss.seam.annotations.Destroy;
                        import org.jboss.seam.annotations.Logger;
                        import org.jboss.seam.annotations.Name;
                        import org.jboss.seam.annotations.Scope;
                        import org.jboss.seam.annotations.Unwrap;
                        import org.jboss.seam.log.Log;
                        
                        import com.testcase.service.TestService;
                        
                        /**
                         * Stateful Seam component named "TesObject", scoped to the EVENT (life of the
                         * request) context.
                         *
                         */
                        @Stateful
                        @Scope(EVENT)
                        @Name("TestObject")
                        public class TestObjectBean implements TestObject {
                        
                         @Logger
                         private Log log;
                        
                         @EJB
                         private TestService _testService;
                        
                         @Unwrap
                         public Object getObject() {
                         Object object = _testService.getObject(new Long(1));
                         log.debug("got object");
                         return object;
                         }
                        
                         @Destroy @Remove
                         public void destroy() {}
                        }


                        TestPage.xhtml...
                        <?xml version="1.0" encoding="utf-8"?>
                        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                        <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                         xmlns:ui="http://java.sun.com/jsf/facelets"
                         xmlns:h="http://java.sun.com/jsf/html"
                         xmlns:f="http://java.sun.com/jsf/core"
                         xmlns:c="http://java.sun.com/jstl/core"
                         template="/templates/DefaultPage.xhtml">
                         <ui:define name="body">
                        
                        #{TestObject.object}
                        
                         </ui:define>
                        </ui:composition>


                        Deploy that in a webapp, call up the TesPage.xhtml and watch for this in your server logs:

                        Caused by: java.lang.IllegalArgumentException: could not set field value: TestObject.log
                         at org.jboss.seam.Component.setFieldValue(Component.java:1525)
                         at org.jboss.seam.Component.injectLog(Component.java:1106)
                         at org.jboss.seam.Component.initialize(Component.java:1057)
                         at org.jboss.seam.intercept.RootInterceptor.postConstruct(RootInterceptor.java:125)
                         at org.jboss.seam.intercept.SessionBeanInterceptor.postConstruct(SessionBeanInterceptor.java:213)
                         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:585)
                         at org.jboss.ejb3.interceptor.LifecycleInvocationContextImpl.proceed(LifecycleInvocationContextImpl.java:131)
                         at org.jboss.ejb3.interceptor.LifecycleInterceptorHandler.postConstruct(LifecycleInterceptorHandler.java:109)
                         ... 151 more
                        Caused by: java.lang.IllegalArgumentException: Could not set field value by reflection: TestObjectBean.log on: com.testcase.service.TestServiceBean with value:
                        class org.jboss.seam.log.LogImpl
                         at org.jboss.seam.util.Reflections.set(Reflections.java:149)
                         at org.jboss.seam.Component.setFieldValue(Component.java:1521)
                         ... 161 more
                        Caused by: java.lang.IllegalArgumentException
                         at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:37)
                         at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:57)
                         at java.lang.reflect.Field.set(Field.java:656)
                         at org.jboss.seam.util.Reflections.set(Reflections.java:121)
                         ... 162 more
                        


                        • 9. Re: Seam 1.1 beta1&2 (dis?)injecting issue
                          Gavin King Master

                          Pete, were you using @EJB anywhere?

                          • 10. Re: Seam 1.1 beta1&2 (dis?)injecting issue
                            Gavin King Master

                            Oh OK, now I understand stuff.

                            Made a third commit.

                            Please try it out for me. Thanks.

                            • 12. Re: Seam 1.1 beta1&2 (dis?)injecting issue
                              Peter Brewer Novice

                              Thanks Gavin. Just checked out the latest CVS head and that solves the problem completely. Thanks to superflav for posting the testcase, too.

                              I wasn't using @EJB annotation but did do a jndi lookup for a different bean, which is the same thing according to the JIRA issue. Sorry I didn't spot the jira bug before.

                              The beta's looking pretty good so far, looking forward to seeing the final release!

                              • 13. Re: Seam 1.1 beta1&2 (dis?)injecting issue
                                Chris Fraser Newbie

                                That worked for me as well. Thanks for the quick turnaround, Gavin!!

                                -Chris Fraser