[jboss-user] [JBoss Seam] - Re: Value injection not always working with Seam 1.1
andrew.rw.robinson
do-not-reply at jboss.com
Thu Dec 21 13:52:38 EST 2006
Okay, that fixed the inner class problem (I moved my code to an external class). However, I am getting exceptions, where it *should* be working. I have a class that is called via EL, it is SESSION scoped, and the "@In(create=true)" variables are still null! I don't know if there is some kind of recursive dependency problem that is causing this, but I do know it was working fine in 1.0.1.
Here is the method it fails in:
| ...
| @In(create=true)
| private MemberSelectionDialogBean memberSelectionDialogBean;
| ...
| public void selectMember(Set<HierarchyDimensionMember> selected)
| {
| HierarchyDimensionMember newValue = selected.iterator().next();
|
| String oldValue = currentViewValues.get(currentDimensionName);
| currentViewValues.put(currentDimensionName, newValue.getKey());
| changeCurrentViewSelection(currentDimensionName, oldValue, newValue.getKey());
|
| memberSelectorVisible = false;
| memberSelectionDialogBean.setDimension(null); /* ERROR occurs
| here, as memberSelectionDialogBean is null */
| memberSelectionDialogBean.setVisible(false);
| memberSelectionDialogBean.setListener(null);
| }
Here is the declaration of the class:
@Name("memberSelectionDialogBean")
| @Scope(ScopeType.SESSION)
| public class MemberSelectionDialogBean
| implements Serializable {...}
Here is the stack (it is long...):
java.lang.NullPointerException
| at com.outlooksoft.cpm.usercontext.UserApplicationViewBean.selectMember(UserApplicationViewBean.java:297)
| at com.outlooksoft.cpm.usercontext.UserApplicationViewBean$$FastClassByCGLIB$$ff27af7e.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.GeneratedMethodAccessor450.invoke(Unknown Source)
| 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.GeneratedMethodAccessor449.invoke(Unknown Source)
| 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:51)
| at sun.reflect.GeneratedMethodAccessor448.invoke(Unknown Source)
| 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 com.outlooksoft.cpm.security.LoggedInInterceptor.checkLoggedIn(LoggedInInterceptor.java:35)
| at sun.reflect.GeneratedMethodAccessor454.invoke(Unknown Source)
| 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.GeneratedMethodAccessor447.invoke(Unknown Source)
| 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:38)
| at sun.reflect.GeneratedMethodAccessor446.invoke(Unknown Source)
| 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.GeneratedMethodAccessor451.invoke(Unknown Source)
| 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:144)
| at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:79)
| at com.outlooksoft.cpm.usercontext.UserApplicationViewBean$$EnhancerByCGLIB$$174481fc.selectMember(<generated>)
| at com.outlooksoft.cpm.faces.controls.UIMemberSelectionDialog.broadcast(UIMemberSelectionDialog.java:105)
| at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
| at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
| at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
| at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
|
I am not sure why this one is failing. If I make the call a 2nd time, everything works, it is that first call that doesn't, and I have no idea why as I have used "UserApplicationViewBean" before that call.
Something definately seems amiss with 1.1 and injection
Any ideas on this one?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995692#3995692
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995692
More information about the jboss-user
mailing list