2 Replies Latest reply on Nov 27, 2006 6:45 PM by Daniel Young

    @Redirect exception - FacesMessages added twice

    Daniel Young Novice

      Hi all,

      I've upgraded to 1.1CR1 and started to use the @Redirect/@Render annotations for exception handling.

      My error.xhtml page that I redirect to contains this:

      <h:messages globalOnly="true" layout="table" styleClass="errors"/>

      I have a Seam action as a trivial test that simply throws my application exception, but I've found that the exception message gets added to the FacesMessages twice.

      I've done a small bit of debugging and seen that ExceptionHandler.handle() is being called twice, but I haven't been able to work out why, the stack trace is too convoluted for me to follow, due to interceptors.

      My next step is to run against the Seam source and try work it out, but I'm wondering if anybody has an idea. I have both the SeamInterceptor running against my action classes and I have the ExceptionFilter installed in my web.xml.

      My logs are showing the following, only ONCE:
      07:57:28,468 DEBUG [Contexts] found in conversation context: org.jboss.seam.core.persistenceContexts
      07:57:28,468 DEBUG [Component] instantiating Seam component: org.jboss.seam.core.exceptions
      07:57:28,468 DEBUG [Component] initializing new instance of: org.jboss.seam.core.exceptions
      07:57:28,468 DEBUG [Component] done initializing: org.jboss.seam.core.exceptions
      07:57:28,468 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.exceptions
      07:57:28,468 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.exceptions
      07:57:28,468 INFO [ExceptionInterceptor] no exceptions.xml file found
      07:57:28,468 DEBUG [Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.exceptions
      07:57:28,468 DEBUG [RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@90067, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@13fc0f{ url=null ,addedOrder=0}
      07:57:28,468 DEBUG [ExceptionInterceptor] rendering: /error.xhtml