[jboss-user] [JBoss Seam] - Re: @Redirect issues - not redirecting to a page

zzzz8 do-not-reply at jboss.com
Sun Oct 1 05:25:21 EDT 2006


Hi Gavin,

Unfortunately, I'm still having problems with using the @Redirect annotation.  Perhaps I'm just missing something in translation about the purpose of the @Redirect annotation.

I corrected the bean (i.e client) that was used to call the ConnectionBean stateless session bean - instead of using a stateless session bean, I just made the client a stateful session bean.  Nevertheless, I don't think that should matter, as I will explain.  But here's the relevant code, nevertheless:

@Stateful
  | @Name("statusData")
  | public class StatusBean implements StatusLocal {
  |     @In(value = "Connection", create = true)
  |     private ConnectionLocal connection;
  | 
  |     @Out(value = "systemStatus")
  |     private GetSystemStatusResponse systemStatus = null;
  | 
  |     @Factory("systemStatus")
  |     public final void retrieveStatus() throws ConnectionException {
  |         systemStatus = connection.getStatus();
  |     }
  | 
  |     @Remove
  |     @Destroy
  |     public final void destroy() {
  | 
  |     }
  | }

In terms of the stateless session bean that is called, I just made a slight change to it (remove the try catch in the connectionInterceptor method):

@Name("Connection")
  | @Stateless
  | public final class ConnectionBean implements ConnectionLocal {
  |  
  | @AroundInvoke
  |     private Object connectionInterceptor(final InvocationContext ctx)
  |             throws Exception {
  |             ....
  | 
  |             return ctx.proceed();
  |         }
  | 
  |      public GetStatusResponse getStatus() throws ConnectionException {
  |         try {
  |             return ws.getStatus();
  |         } catch (RemoteException e) {
  |             throw new ConnectionException(e.toString());
  |         }
  |     }
  | }

The exception class is annotated with the @Redirect annotation (I tried Render and Redirect):

@Redirect(viewId = "/error.faces")
  | public class ConnectionException extends RuntimeException {
  |     ....
  | }

I get the following stack trace on the Tomcat console:

INFO  01-10 02:01:59,248 (LogImpl.java:info:98)  -Calling: getStatus
  | test.ConnectionException
  |         at test.ConnectionBean.connectionInterceptor(ConnectionBean.java:154)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationCo
  | ntextImpl.java:146)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:56)
  |         at org.jboss.seam.interceptors.ValidationInterceptor.validateTargetCompo
  | nent(ValidationInterceptor.java:64)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(Outco
  | meInterceptor.java:21)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(R
  | ollbackInterceptor.java:30)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponen
  | t(BijectionInterceptor.java:49)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRun
  | ningConversation(ConversationInterceptor.java:58)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusiness
  | ProcessContext(BusinessProcessInterceptor.java:54)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.ConversationalInterceptor.checkConversati
  | onForConversationalBean(ConversationalInterceptor.java:80)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(Remov
  | eInterceptor.java:39)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(Exc
  | eptionInterceptor.java:44)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.ejb.SeamInterceptor.invokeInContexts(SeamInterceptor.j
  | ava:196)
  |         at org.jboss.seam.ejb.SeamInterceptor.invoke(SeamInterceptor.java:169)
  |         at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:
  | 156)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationCo
  | ntextImpl.java:118)
  |         at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3Int
  | erceptorsInterceptor.java:63)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invok
  | e(TransactionScopedEntityManagerInterceptor.java:54)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsI
  | nterceptor.java:47)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
  |         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(TxPropagationInt
  | erceptor.java:76)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(Stateles
  | sInstanceInterceptor.java:62)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.aspects.security.AuthenticationInterceptor.invoke(Authentic
  | ationInterceptor.java:78)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterce
  | ptor.java:47)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(Asynchrono
  | usInterceptor.java:106)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessCont
  | ainer.java:181)
  |         at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalPro
  | xy.java:79)
  |         at $Proxy58.getStatus(Unknown Source)
  |         at test.ConnectionLocal$$FastClassBy
  | CGLIB$$3c178fa0.invoke(<generated>)
  |         at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
  |         at org.jboss.seam.interceptors.ClientSideInterceptor$1.proceed(ClientSid
  | eInterceptor.java:73)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:56)
  |         at org.jboss.seam.ejb.SeamInterceptor.invokeInContexts(SeamInterceptor.j
  | ava:196)
  |         at org.jboss.seam.ejb.SeamInterceptor.invoke(SeamInterceptor.java:169)
  |         at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:
  | 156)
  |         at org.jboss.seam.interceptors.ClientSideInterceptor.interceptInvocation
  | (ClientSideInterceptor.java:44)
  |         at org.jboss.seam.interceptors.ClientSideInterceptor.intercept(ClientSid
  | eInterceptor.java:38)
  |         at test.ConnectionLocal$$EnhancerByCGLIB$$8010c191.getStatus(<generated>)
  |         at test.StatusBean.retrieveStatus(StatusBean.java:88)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:109)
  |         at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationCo
  | ntextImpl.java:166)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:56)
  |         at org.jboss.seam.interceptors.ValidationInterceptor.validateTargetCompo
  | nent(ValidationInterceptor.java:64)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponen
  | t(BijectionInterceptor.java:49)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundIn
  | voke(ManagedEntityIdentityInterceptor.java:77)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(Outco
  | meInterceptor.java:21)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(R
  | ollbackInterceptor.java:30)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRun
  | ningConversation(ConversationInterceptor.java:58)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusiness
  | ProcessContext(BusinessProcessInterceptor.java:54)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.ConversationalInterceptor.checkConversati
  | onForConversationalBean(ConversationalInterceptor.java:80)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(Remov
  | eInterceptor.java:39)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(Exc
  | eptionInterceptor.java:44)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java
  | :172)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:65)
  |         at org.jboss.seam.ejb.SeamInterceptor.invokeInContexts(SeamInterceptor.j
  | ava:196)
  |         at org.jboss.seam.ejb.SeamInterceptor.invoke(SeamInterceptor.java:169)
  |         at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:
  | 156)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationCo
  | ntextImpl.java:118)
  |         at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3Int
  | erceptorsInterceptor.java:63)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationIntercepto
  | r.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invok
  | e(TransactionScopedEntityManagerInterceptor.java:54)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsI
  | nterceptor.java:47)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
  |         at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java
  | :197)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInt
  | erceptor.java:76)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulIn
  | stanceInterceptor.java:81)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.aspects.security.AuthenticationInterceptor.invoke(Authentic
  | ationInterceptor.java:78)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterce
  | ptor.java:47)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(Asynchrono
  | usInterceptor.java:106)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
  | java:98)
  |         at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContain
  | er.java:189)
  |         at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.
  | java:98)
  |         at $Proxy57.retrieveStatus(Unknown Source)
  |         at test.StatusLocal$$FastClassByCGL
  | IB$$72d42c54.invoke(<generated>)
  |         at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
  |         at org.jboss.seam.interceptors.ClientSideInterceptor$1.proceed(ClientSid
  | eInterceptor.java:73)
  |         at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocat
  | ionContext.java:56)
  |         at org.jboss.seam.ejb.SeamInterceptor.invokeInContexts(SeamInterceptor.j
  | ava:196)
  |         at org.jboss.seam.ejb.SeamInterceptor.invoke(SeamInterceptor.java:169)
  |         at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:
  | 156)
  |         at org.jboss.seam.interceptors.ClientSideInterceptor.interceptInvocation
  | (ClientSideInterceptor.java:44)
  |         at org.jboss.seam.interceptors.ClientSideInterceptor.intercept(ClientSid
  | eInterceptor.java:38)
  |         at test.StatusLocal$$EnhancerByCGLI
  | B$$8858d145.retrieveStatus(<generated>)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
  |         at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:82)
  |         at org.jboss.seam.Component.callComponentMethod(Component.java:1592)
  |         at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1473)
  |         at org.jboss.seam.Component.getInstance(Component.java:1423)
  |         at org.jboss.seam.Component.getInstance(Component.java:1407)
  |         at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableR
  | esolver.java:44)
  |         at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVari
  | able(ValueBindingImpl.java:569)
  |         at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
  |         at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:140)
  |         at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java
  | :378)
  |         at javax.faces.component.UIOutput.getValue(UIOutput.java:75)
  |         at org.apache.myfaces.renderkit.RendererUtils.getStringValue(RendererUti
  | ls.java:225)
  |         at org.apache.myfaces.renderkit.html.HtmlTextRendererBase.renderOutput(H
  | tmlTextRendererBase.java:65)
  |         at org.apache.myfaces.renderkit.html.HtmlTextRendererBase.encodeEnd(Html
  | TextRendererBase.java:53)
  |         at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:
  | 331)
  |         at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.
  | java:450)
  |         at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.renderChildren
  | (HtmlGridRendererBase.java:203)
  |         at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd(Html
  | GridRendererBase.java:85)
  |         at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:
  | 331)
  |         at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:349)
  |         at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:253)
  |         at org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponent
  | BodyTagBase.java:55)
  |         at org.apache.jsp.WEB_002dINF.faces.header.statusNoAjax_jspx._jspx_meth_
  | h_panelGrid_0(org.apache.jsp.WEB_002dINF.faces.header.statusNoAjax_jspx:245)
  |         at org.apache.jsp.WEB_002dINF.faces.header.statusNoAjax_jspx._jspService
  | (org.apache.jsp.WEB_002dINF.faces.header.statusNoAjax_jspx:92)
  |         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  |         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
  | .java:332)
  |         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
  | 14)
  |         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
  | icationFilterChain.java:252)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
  | ilterChain.java:173)
  |         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
  | atcher.java:672)
  |         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
  | ispatcher.java:574)
  |         at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
  | patcher.java:499)
  |         at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary
  | .java:966)
  |         at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.jav
  | a:614)
  |         at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99
  | )
  |         at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
  |         at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760
  | )
  |         at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(Inser
  | tTag.java:892)
  |         at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
  | 
  |         at org.apache.jsp.WEB_002dINF.faces.layout.informationBarLayout_jspx._js
  | px_meth_tiles_insert_1(org.apache.jsp.WEB_002dINF.faces.layout.informationBarLay
  | out_jspx:163)
  |         at org.apache.jsp.WEB_002dINF.faces.layout.informationBarLayout_jspx._js
  | pService(org.apache.jsp.WEB_002dINF.faces.layout.informationBarLayout_jspx:64)
  |         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  |         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
  | .java:332)
  |         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
  | 14)
  |         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
  | icationFilterChain.java:252)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
  | ilterChain.java:173)
  |         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
  | atcher.java:672)
  |         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
  | ispatcher.java:574)
  |         at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
  | patcher.java:499)
  |         at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary
  | .java:966)
  |         at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.jav
  | a:614)
  |         at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99
  | )
  |         at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
  |         at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760
  | )
  |         at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(Inser
  | tTag.java:892)
  |         at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
  | 
  |         at org.apache.jsp.WEB_002dINF.faces.layout.headerLayout_jspx._jspx_meth_
  | tiles_insert_0(org.apache.jsp.WEB_002dINF.faces.layout.headerLayout_jspx:109)
  |         at org.apache.jsp.WEB_002dINF.faces.layout.headerLayout_jspx._jspService
  | (org.apache.jsp.WEB_002dINF.faces.layout.headerLayout_jspx:60)
  |         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  |         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
  | .java:332)
  |         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
  | 14)
  |         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
  | icationFilterChain.java:252)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
  | ilterChain.java:173)
  |         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
  | atcher.java:672)
  |         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
  | ispatcher.java:574)
  |         at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
  | patcher.java:499)
  |         at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary
  | .java:966)
  |         at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.jav
  | a:614)
  |         at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99
  | )
  |         at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
  |         at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760
  | )
  |         at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(Inser
  | tTag.java:892)
  |         at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
  | 
  |         at org.apache.jsp.WEB_002dINF.faces.layout.mainLayout_jspx._jspx_meth_ti
  | les_insert_0(org.apache.jsp.WEB_002dINF.faces.layout.mainLayout_jspx:235)
  |         at org.apache.jsp.WEB_002dINF.faces.layout.mainLayout_jspx._jspx_meth_f_
  | subview_0(org.apache.jsp.WEB_002dINF.faces.layout.mainLayout_jspx:171)
  |         at org.apache.jsp.WEB_002dINF.faces.layout.mainLayout_jspx._jspService(o
  | rg.apache.jsp.WEB_002dINF.faces.layout.mainLayout_jspx:92)
  |         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  |         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
  | .java:332)
  |         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
  | 14)
  |         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
  | icationFilterChain.java:252)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
  | ilterChain.java:173)
  |         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
  | atcher.java:672)
  |         at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
  | tionDispatcher.java:463)
  |         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
  | ispatcher.java:398)
  |         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
  | patcher.java:301)
  |         at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatc
  | h(ServletExternalContextImpl.java:415)
  |         at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.dispatch(J
  | spTilesViewHandlerImpl.java:233)
  |         at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView
  | (JspTilesViewHandlerImpl.java:219)
  |         at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:
  | 352)
  |         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
  | icationFilterChain.java:252)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
  | ilterChain.java:173)
  |         at test.RefreshRateFilter.doFilter(RefreshRateF
  | ilter.java:100)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
  | icationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
  | ilterChain.java:173)
  |         at test.SecurityFilter.doFilter(SecurityFilter.
  | java:93)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
  | icationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
  | ilterChain.java:173)
  |         at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter
  | .java:34)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
  | icationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
  | ilterChain.java:173)
  |         at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(Exte
  | nsionsFilter.java:122)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
  | icationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
  | ilterChain.java:173)
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
  | alve.java:213)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
  | alve.java:178)
  |         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
  | torBase.java:524)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
  | ava:126)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
  | ava:105)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
  | ve.java:107)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
  | a:148)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
  | :869)
  |         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
  | rocessConnection(Http11BaseProtocol.java:667)
  |         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
  | int.java:527)
  |         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
  | lowerWorkerThread.java:80)
  |         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
  | ool.java:684)
  |         at java.lang.Thread.run(Thread.java:595)

So what I did to test this is to force a ConnectionException to be thrown.  What's interesting is that the ConnectionException is thrown and is bubbled up, but it doesn't redirect the user to the error.faces page (as set in the viewId of the @Redirect annotation).  Even with the client code (i.e. the StatusBean class), I assumed that the throwing of the ConnectionException in the getStatus method of the ConnectionBean would cause an immediate redirect to the error.faces page (or am I incorrect in this assumption - I'm just wondering why the ConnectionException gets back to the StatusBean class)...  What am I doing wrong - or did I make a stupid mistake again?  Again, my main goal is that if any of my methods in the ConnectionBean class throws a ConnectionException, I want the user immediately redirected to the error.faces page.  Thanks!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975320#3975320

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975320



More information about the jboss-user mailing list