[Clustering/JBoss] - Problems with Duke-Clustering example
by delta296
Hi all,
i have deployed the duke bank clustering application without any errors, but after logging in I got the following error:
2006-10-01 15:12:29,600 DEBUG [org.jboss.security.auth.spi.UsersRolesLoginModule] Loaded properties, users=[200]
2006-10-01 15:12:29,603 DEBUG [org.jboss.security.auth.spi.UsersRolesLoginModule] Loaded properties, users=[200]
2006-10-01 15:12:30,443 INFO [STDOUT] Debug: Creating bean manager.
2006-10-01 15:12:30,930 INFO [STDOUT] Debug: Unable to lookup home: java:comp/env/ejb/customerControllerCould not dereference object
2006-10-01 15:12:30,951 INFO [STDOUT] Debug: Unable to lookup home: java:comp/env/ejb/accountControllerCould not dereference object
2006-10-01 15:12:31,010 INFO [STDOUT] Debug: Unable to lookup home: java:comp/env/ejb/txControllerCould not dereference object
2006-10-01 15:12:31,011 INFO [STDOUT] Debug: /main
2006-10-01 15:12:31,011 INFO [STDOUT] Debug: Forwarding to template.
2006-10-01 15:12:31,307 INFO [STDOUT] Debug: Unable to lookup home: java:comp/env/ejb/customerControllerCould not dereference object
2006-10-01 15:12:31,328 INFO [STDOUT] Debug: Unable to lookup home: java:comp/env/ejb/accountControllerCould not dereference object
2006-10-01 15:12:31,350 INFO [STDOUT] Debug: Unable to lookup home: java:comp/env/ejb/txControllerCould not dereference object
2006-10-01 15:12:31,605 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/bank].[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at com.sun.ebank.web.CustomerBean.getAccounts(CustomerBean.java:113)
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.apache.commons.el.ArraySuffix.evaluate(ArraySuffix.java:314)
at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190)
at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:922)
at org.apache.jsp.template.links_jsp._jspx_meth_c_set_0(org.apache.jsp.template.links_jsp:161)
at org.apache.jsp.template.links_jsp._jspService(org.apache.jsp.template.links_jsp:84)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:604)
at com.sun.ebank.web.template.InsertTag.doTag(InsertTag.java:82)
at org.apache.jsp.template.template_jsp._jspx_meth_tt_insert_2(org.apache.jsp.template.template_jsp:897)
at org.apache.jsp.template.template_jsp._jspService(org.apache.jsp.template.template_jsp:87)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.sun.ebank.web.Dispatcher.doGet(Dispatcher.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
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.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:81)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
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:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
2006-10-01 15:12:31,741 DEBUG [org.jboss.web.tomcat.tc5.session.JBossCacheManager] check to see if needs to store and replicate session with id v1nYLs1NXcXEceWMgfrGig**
2006-10-01 15:12:31,741 DEBUG [org.jboss.web.tomcat.tc5.session.ClusteredSession] processSessionRepl(): session is dirty. Will increment version from: 3 and replicate.
2006-10-01 15:12:31,757 INFO [STDOUT] java.io.NotSerializableException: com.sun.ebank.web.BeanManager
2006-10-01 15:12:31,759 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
2006-10-01 15:12:31,760 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
2006-10-01 15:12:31,761 INFO [STDOUT] at java.util.HashMap.writeObject(HashMap.java:1039)
2006-10-01 15:12:31,762 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2006-10-01 15:12:31,763 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2006-10-01 15:12:31,764 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2006-10-01 15:12:31,764 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
2006-10-01 15:12:31,764 INFO [STDOUT] at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
2006-10-01 15:12:31,765 INFO [STDOUT] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
2006-10-01 15:12:31,765 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
2006-10-01 15:12:31,765 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
2006-10-01 15:12:31,765 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
2006-10-01 15:12:31,766 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.SessionBasedClusteredSession.writeExternal(SessionBasedClusteredSession.java:288)
2006-10-01 15:12:31,766 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.JBossCacheService.externalizeSession(JBossCacheService.java:771)
2006-10-01 15:12:31,766 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.JBossCacheService.putSession(JBossCacheService.java:229)
2006-10-01 15:12:31,766 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.SessionBasedClusteredSession.processSessionRepl(SessionBasedClusteredSession.java:165)
2006-10-01 15:12:31,767 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.JBossCacheManager.processSessionRepl(JBossCacheManager.java:606)
2006-10-01 15:12:31,767 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.JBossCacheManager.storeSession(JBossCacheManager.java:375)
2006-10-01 15:12:31,767 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:38)
2006-10-01 15:12:31,768 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:91)
2006-10-01 15:12:31,768 INFO [STDOUT] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
2006-10-01 15:12:31,773 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
2006-10-01 15:12:31,774 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
2006-10-01 15:12:31,775 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
2006-10-01 15:12:31,776 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
2006-10-01 15:12:31,776 INFO [STDOUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
2006-10-01 15:12:31,776 INFO [STDOUT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
2006-10-01 15:12:31,776 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
2006-10-01 15:12:31,777 INFO [STDOUT] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
2006-10-01 15:12:31,777 INFO [STDOUT] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
2006-10-01 15:12:31,777 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
Can somebody help me?
thanxs
delta296
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975329#3975329
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975329
17 years, 8 months
[JBoss Seam] - Backing Bean not being updated
by alpheratz-jb
Hi all,
I am trying to build a simple test app with a single page that
links to a second form page that on submission adds data to be displayed by the first page
My problem is that the backing entity bean is never updated by the form.
For example, regardless of whatever I enter into the 'disaster' field,
when I print its value within the appropriate 'add' method I ALWAYS see
the initial value:
22:57:52,620 INFO [DisasterAddAction] Add: disaster: wft
Code follows.
I would be VERY grateful for any assistance.
Thanks
Alph.
=======================
I have a form page home.xhtml which indirectly invokes the problematic
form:
===
... excerpt begin
<t:commandLink action="#{disasterFlow.form}" styleClass="t_cl_class white middle" value="[ + ]"></t:commandLink> Disaster</h:panelGroup></f:facet>
#{cc.disaster}
... excerpt end
===
The sole purpose of DisasterFlow is to kick off to the form page
/test.xhtml:
===
package dnd;
import org.jboss.seam.annotations.Name;
@Name("disasterFlow")
public class DisasterFlow
{
public String form()
{
return "/test.xhtml";
}
}
===
The test.xhtml page is:
===
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:s="http://jboss.com/products/seam/taglib">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
TEST
<f:view>
<h:form>
<h1>TEST</h1>
<s:validateAll>
<h:inputText value="#{disaster.disaster}" />
<h:inputText value="#{disaster.description}" />
</s:validateAll>
<s:link action="#{disasterAdder.add}" value="Add" linkStyle="button" />
</h:form>
</f:view>
===
DisasterAdder is a Stateless bean:
===
package dnd.ejb3.session;
import java.io.Serializable;
import javax.ejb.Remove;
import javax.ejb.Stateless;
import org.hibernate.validator.Valid;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.log.Log;
import dnd.ejb3.entity.Disaster;
@Stateless
@Name("disasterAdder")
public class DisasterAddAction implements Serializable, DisasterAdder
{
private static final long serialVersionUID = 5940066174527954201L;
@Logger
private Log log;
@In(create=true) @Valid
private Disaster disaster;
public String add()
{
log.info("Add: disaster: " + disaster.getDisaster());
return "/home.xhtml";
}
@Remove
public void destroy() {}
}
===
Disaster is an Entity:
===
package dnd.ejb3.entity;
import static javax.persistence.FetchType.LAZY;
import static org.jboss.seam.ScopeType.EVENT;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Collection;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.OneToMany;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
@Entity
@Name("disaster")
@Scope(EVENT)
public class Disaster implements Serializable
{
private static final long serialVersionUID = -7111093778919494970L;
private String disaster;
private Integer disasterPk;
private Timestamp creationTimeStamp;
private String description;
private Collection referenceCollection;
public Disaster(String disaster, String description)
{
super();
this.disaster = disaster;
this.description = description;
}
public Disaster()
{
this.disaster = "wft";
this.description = "this is NEVER updated!";
}
@Length(min=4,max=32) @NotNull
public String getDisaster()
{
return disaster;
}
public void setDisaster(String disaster)
{
System.out.println("setDisaster: " + disaster);
this.disaster = disaster;
}
@Id
@Column(name = "disaster_PK", nullable = false)
public Integer getDisasterPk()
{
return disasterPk;
}
public void setDisasterPk(Integer disasterPk)
{
this.disasterPk = disasterPk;
}
@Column(name = "CREATION_TIME_STAMP")
public Timestamp getCreationTimeStamp()
{
return creationTimeStamp;
}
public void setCreationTimeStamp(Timestamp creationTimeStamp)
{
this.creationTimeStamp = creationTimeStamp;
}
@Lob
@Length(max=64) @NotNull
public String getDescription()
{
return description;
}
public void setDescription(String description)
{
this.description = description;
}
@OneToMany(fetch=LAZY,mappedBy = "disaster")
public Collection getReferenceCollection()
{
return referenceCollection;
}
public void setReferenceCollection(Collection referenceCollection)
{
this.referenceCollection = referenceCollection;
}
public Reference addReference(Reference reference)
{
getReferenceCollection().add(reference);
reference.setdisaster(this);
return reference;
}
public Reference removeReference(Reference reference)
{
getReferenceCollection().remove(reference);
reference.setdisaster(null);
return reference;
}
}
===
faces-config is:
===
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config
PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
<!-- Facelets support -->
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
<!-- Select one of the two standard persistence lifecycle models for the Seam application -->
<phase-listener>org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener</phase-listener>
<!-- phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener -->
</faces-config>
===
Web.xml is:
===
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<!-- Seam -->
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
<!-- Propagate conversations across redirects -->
<filter-name>Seam Redirect Filter</filter-name>
<filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
<filter-mapping>
<filter-name>Seam Redirect Filter</filter-name>
<url-pattern>*.seam</url-pattern>
</filter-mapping>
<filter-name>Seam Exception Filter</filter-name>
<filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
<filter-mapping>
<filter-name>Seam Exception Filter</filter-name>
<url-pattern>*.seam</url-pattern>
</filter-mapping>
<!-- JSF -->
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.seam</url-pattern>
</servlet-mapping>
<!-- MyFaces -->
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
<!-- JSF RI -->
<!--
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
-->
<context-param>
<param-name>facelets.LIBRARIES</param-name>
<param-value>/WEB-INF/tomahawk.taglib.xml</param-value>
</context-param>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>maxFileSize</param-name>
<param-value>20m</param-value>
</init-param>
<!-- extension mapping for adding , , and other resource tags to JSF-pages -->
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
<!-- filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>*.seam</url-pattern>
</filter-mapping -->
</web-app>
===
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975328#3975328
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975328
17 years, 8 months
[JBossCache] - Is JBossCache suitable for my problem?
by rlhr
Hello,
I'm implementing a web application that uses JBoss as application server.
Some pages served by the application are heavily used and contains readonly data stored in the database.
I don't want to access the database everytime such a page is served as it is not very good performance wise.
The requirements are the following:
- The data can be changed but rarely and not by the user.
- I'd like to load the data from the database only once at server start.
- it should also work in a clustered environement.
One simple solution would be to put the data in a hashmap.
I would just have to restart each server in a clustered environement and the new data would be available.
Another solution I think would be to use the JBossCache. I started reading the documentation and I'm sure it would do the job. But isn't it an overkill in my situation or is JBossCache actually designed for that kind of situation?
Thanks for your help.
Richard
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975327#3975327
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975327
17 years, 8 months
[JBoss Seam] - Re: @Redirect issues - not redirecting to a page
by zzzz8
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
17 years, 8 months