-
1. Re: catching exceptions + stack trace
damianharvey Feb 20, 2007 11:58 AM (in response to damianharvey)Just tried the SeamSpace example as suggested in another thread and it also dumps the stack trace to the logs when a NotLoggedInException is encountered.
Any way to stop this? Aiming for tidy logs.
Thanks,
Damian. -
2. Re: catching exceptions + stack trace
shane.bryzak Feb 20, 2007 6:45 PM (in response to damianharvey)How did you get it to produce the stack trace? If you could create a JIRA issue with the details and assign to me I'll take a look at this for you.
-
3. Re: catching exceptions + stack trace
damianharvey Feb 21, 2007 6:39 AM (in response to damianharvey)Maybe my terminology is incorrect. What I see in the logs is this:
11:35:59,848 INFO [Lifecycle] starting up: org.jboss.seam.security.identity 11:36:12,167 ERROR [SeamPhaseListener] uncaught exception org.jboss.seam.security.NotLoggedInException: Error evaluating expression [#{identity.loggedIn}] - User not logged in at org.jboss.seam.security.Identity.checkRestriction(Identity.java:169) at org.jboss.seam.pages.Page.enter(Page.java:186) at org.jboss.seam.core.Pages.enterPage(Pages.java:239) at org.jboss.seam.jsf.AbstractSeamPhaseListener.enterPage(AbstractSeamPhaseListener.java:242) at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:193) at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:57) at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:373) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:29) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:43) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156) 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:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) 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:613)
Whereas I was hoping that this would be caught and not shown in the logs. -
4. Re: catching exceptions + stack trace
christian.bauer Feb 21, 2007 7:19 AM (in response to damianharvey)I also get both NotLoggedInException and AuthorizationException in the logs if I only handle them with in pages.xml. If I use the login-required="true" mechanism, at last the NotLoggedInException goes away.
I've read somewhere that this is currently expected behavior. Not sure that's going to make people happy long term :) -
5. Re: catching exceptions + stack trace
christian.bauer Feb 21, 2007 7:20 AM (in response to damianharvey)... if I handle them with >exception> in pages.xhtml.
-
6. Re: catching exceptions + stack trace
gavin.king Feb 21, 2007 10:50 AM (in response to damianharvey)Yes, currently the exception handling stuff *alway* logs the exception before swallowing it. In some cases this is probably not what you want, so I suppose we should introduce something like:
<exception class="MyException" log="false"> ... </exception>
-
7. Re: catching exceptions + stack trace
mindgame Oct 8, 2007 9:44 AM (in response to damianharvey)Have this attribute, log="false" been introduced in Seam 2.0 CR2? Or the issue has been addressed in other approach? Thanks.
-
8. Re: catching exceptions + stack trace
shane.bryzak Oct 8, 2007 11:31 AM (in response to damianharvey)This hasn't been implemented yet, however I've created a JIRA issue for it.
http://jira.jboss.com/jira/browse/JBSEAM-2071