1 Reply Latest reply on Jun 25, 2010 9:36 AM by Serkan Eskici

    how can i get the Object which is in session from facesContext

    praveen jain Novice
      hi
      i am trying to get a managed bean form the session
      FacesContext context = FacesContext.getCurrentInstance();
                
      Object dtlFacede = context.getExternalContext().getSessionMap().get("DetailsFacade");

      the object is in session , but it is unabel to type cast
      java.lang.ClassCastException: org.javassist.tmp.java.lang.Object_$$_javassist_seam_16 cannot be cast to com.globalcollect.wpc.session.DetailsFacade
      12:14:30,034 ERROR [STDERR]     at com.globalcollect.wpc.session.ActionFacade.doAction(ActionFacade.java:140)
      12:14:30,034 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      12:14:30,034 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      12:14:30,034 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:14:30,034 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
      12:14:30,034 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
      12:14:30,034 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
      12:14:30,034 ERROR [STDERR]     at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
      12:14:30,034 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
      12:14:30,034 ERROR [STDERR]     at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
      12:14:30,034 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
      12:14:30,034 ERROR [STDERR]     at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
      12:14:30,034 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      12:14:30,049 ERROR [STDERR]     at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
      12:14:30,049 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      12:14:30,049 ERROR [STDERR]     at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:29)
      12:14:30,049 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      12:14:30,049 ERROR [STDERR]     at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:30)
      12:14:30,049 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      12:14:30,049 ERROR [STDERR]     at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
      12:14:30,049 ERROR [STDERR]     at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
      12:14:30,049 ERROR [STDERR]     at sun.reflect.GeneratedMethodAccessor327.invoke(Unknown Source)
      12:14:30,049 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:14:30,049 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
      12:14:30,049 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83)
      12:14:30,049 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70)
      12:14:30,049 ERROR [STDERR]     at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:59)
      12:14:30,049 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:76)
      12:14:30,049 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:62)
      12:14:30,049 ERROR [STDERR]     at sun.reflect.GeneratedMethodAccessor326.invoke(Unknown Source)
      12:14:30,049 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:14:30,049 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
      12:14:30,049 ERROR [STDERR]     at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
      12:14:30,049 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,049 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)
      12:14:30,049 ERROR [STDERR]     at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_21871231.invoke(InvocationContextInterceptor_z_fillMethod_21871231.java)
      12:14:30,049 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,049 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
      12:14:30,049 ERROR [STDERR]     at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_21871231.invoke(InvocationContextInterceptor_z_setup_21871231.java)
      12:14:30,049 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,065 ERROR [STDERR]     at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,065 ERROR [STDERR]     at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:60)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,065 ERROR [STDERR]     at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,065 ERROR [STDERR]     at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,065 ERROR [STDERR]     at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,065 ERROR [STDERR]     at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:194)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,065 ERROR [STDERR]     at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,065 ERROR [STDERR]     at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:201)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,065 ERROR [STDERR]     at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,065 ERROR [STDERR]     at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,065 ERROR [STDERR]     at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
      12:14:30,065 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      12:14:30,065 ERROR [STDERR]     at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:180)
      12:14:30,065 ERROR [STDERR]     at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:238)
      12:14:30,065 ERROR [STDERR]     at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:188)
      12:14:30,081 ERROR [STDERR]     at $Proxy424.doAction(Unknown Source)
      12:14:30,081 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      12:14:30,081 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      12:14:30,081 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:14:30,081 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
      12:14:30,081 ERROR [STDERR]     at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
      12:14:30,081 ERROR [STDERR]     at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)

      can u pleaase tell how can i get the Object which is in session from facesContext.