Tynamo
  1. Tynamo
  2. TYNAMO-121

Ability to plug into ExceptionPage for the same exception type

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: security-0.4.1, exceptionpage-0.1.1
    • Fix Version/s: security-0.4.3
    • Component/s: exceptionpage, security
    • Labels:
      None
    • Environment:
      Any
    • Number of attachments :
      0

      Description

      Right now, I catch ShiroException in my code to do logging and additional processing.
      With the new Tynamo 0.4.1 and exceptionpage way of doing things, I can no longer plug into
      the exception.

      I am looking for a way to decorate an existing assistant for an existing exception,
      specifically the ExceptionHandlerAssistant in SecurityModule.java
      I don't believe it is possible to do this at this time.

        Activity

        Hide
        Kalle Korhonen added a comment -

        How Lenny overrode the current handler (http://code.google.com/p/flowlogix/source/detail?r=c87d6260b74dc9984b090f541dfc45005e4ccb73) is the right way to do it. I'll take an action item to document it properly and close the issue after that.

        Show
        Kalle Korhonen added a comment - How Lenny overrode the current handler ( http://code.google.com/p/flowlogix/source/detail?r=c87d6260b74dc9984b090f541dfc45005e4ccb73 ) is the right way to do it. I'll take an action item to document it properly and close the issue after that.
        Hide
        Kalle Korhonen added a comment -

        After reconsidering, I'll make the current assistant implementation a public class so you inherit from extend if you so wish. Configuration override is still absolutely the way to go.

        Show
        Kalle Korhonen added a comment - After reconsidering, I'll make the current assistant implementation a public class so you inherit from extend if you so wish. Configuration override is still absolutely the way to go.
        Hide
        Lenny Primak added a comment -

        The cookie save functionality is now causing NPEs in Glassfish / Tomcat:

        --------------------

        WARNING: StandardWrapperValve[default]: PWC1406: Servlet.service() for servlet default threw exception
        org.apache.shiro.subject.ExecutionException: java.lang.NullPointerException
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:382)
        at org.tynamo.security.services.impl.SecurityConfiguration.service(SecurityConfiguration.java:104)
        at $HttpServletRequestFilter_127d3c01b61f30b4.service(Unknown Source)
        at $HttpServletRequestHandler_127d3c01b61f30b9.service(Unknown Source)
        at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
        at $HttpServletRequestHandler_127d3c01b61f30b9.service(Unknown Source)
        at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
        at $HttpServletRequestFilter_127d3c01b61f30b2.service(Unknown Source)
        at $HttpServletRequestHandler_127d3c01b61f30b9.service(Unknown Source)
        at org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852)
        at $HttpServletRequestHandler_127d3c01b61f30b9.service(Unknown Source)
        at $HttpServletRequestHandler_127d3c01b61f30b1.service(Unknown Source)
        at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
        at com.sun.grizzly.comet.CometEngine.executeServlet(CometEngine.java:444)
        at com.sun.grizzly.comet.CometEngine.handle(CometEngine.java:308)
        at com.sun.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:87)
        at com.sun.grizzly.arp.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:171)
        at com.sun.grizzly.arp.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:143)
        at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:94)
        at com.sun.grizzly.http.TaskBase.run(TaskBase.java:193)
        at com.sun.grizzly.http.TaskBase.execute(TaskBase.java:175)
        at com.sun.grizzly.arp.DefaultAsyncHandler.handle(DefaultAsyncHandler.java:145)
        at com.sun.grizzly.arp.AsyncProtocolFilter.execute(AsyncProtocolFilter.java:204)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
        at java.lang.Thread.run(Thread.java:680)
        Caused by: java.lang.NullPointerException
        at com.sun.enterprise.web.pwc.connector.coyote.PwcCoyoteRequest.getFormHintFieldEncoding(PwcCoyoteRequest.java:224)
        at com.sun.enterprise.web.pwc.connector.coyote.PwcCoyoteRequest.setRequestEncodingFromSunWebXml(PwcCoyoteRequest.java:187)
        at com.sun.enterprise.web.pwc.connector.coyote.PwcCoyoteRequest.getCharacterEncoding(PwcCoyoteRequest.java:128)
        at org.apache.catalina.connector.RequestFacade.getCharacterEncoding(RequestFacade.java:361)
        at org.apache.shiro.web.util.WebUtils.determineEncoding(WebUtils.java:368)
        at org.apache.shiro.web.util.WebUtils.decodeRequestString(WebUtils.java:344)
        at org.apache.shiro.web.util.WebUtils.getContextPath(WebUtils.java:255)
        at org.apache.shiro.web.util.WebUtils.getPathWithinApplication(WebUtils.java:111)
        at org.tynamo.security.internal.SecurityExceptionHandlerAssistant.handleRequestException(SecurityExceptionHandlerAssistant.java:55)
        at com.flowlogix.web.services.internal.ExceptionHandlerAssistantImpl.handleRequestException(ExceptionHandlerAssistantImpl.java:48)
        at org.tynamo.exceptionpage.services.ConfigurableRequestExceptionHandler.handleRequestException(ConfigurableRequestExceptionHandler.java:112)
        at com.flowlogix.web.services.ServicesModule$1.handleRequestException(ServicesModule.java:87)
        at $RequestExceptionHandler_127d3c01b61f30c7.handleRequestException(Unknown Source)
        at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42)
        at $RequestHandler_127d3c01b61f30c9.service(Unknown Source)
        at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902)
        at $RequestHandler_127d3c01b61f30c9.service(Unknown Source)
        at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892)
        at $RequestHandler_127d3c01b61f30c9.service(Unknown Source)
        at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)
        at $RequestHandler_127d3c01b61f30c9.service(Unknown Source)
        at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:105)
        at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:95)
        at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
        at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:119)
        at $RequestHandler_127d3c01b61f30c9.service(Unknown Source)
        at $RequestHandler_127d3c01b61f30b8.service(Unknown Source)
        at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253)
        at com.flowlogix.web.services.internal.GwtCachingFilter.service(GwtCachingFilter.java:78)
        at $HttpServletRequestHandler_127d3c01b61f30b9.service(Unknown Source)
        at org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
        at $HttpServletRequestHandler_127d3c01b61f30b9.service(Unknown Source)
        at org.tynamo.security.services.impl.SecurityConfiguration$2.call(SecurityConfiguration.java:106)
        at org.tynamo.security.services.impl.SecurityConfiguration$2.call(SecurityConfiguration.java:104)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:380)
        ... 45 more

        Show
        Lenny Primak added a comment - The cookie save functionality is now causing NPEs in Glassfish / Tomcat: -------------------- WARNING: StandardWrapperValve [default] : PWC1406: Servlet.service() for servlet default threw exception org.apache.shiro.subject.ExecutionException: java.lang.NullPointerException at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:382) at org.tynamo.security.services.impl.SecurityConfiguration.service(SecurityConfiguration.java:104) at $HttpServletRequestFilter_127d3c01b61f30b4.service(Unknown Source) at $HttpServletRequestHandler_127d3c01b61f30b9.service(Unknown Source) at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) at $HttpServletRequestHandler_127d3c01b61f30b9.service(Unknown Source) at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) at $HttpServletRequestFilter_127d3c01b61f30b2.service(Unknown Source) at $HttpServletRequestHandler_127d3c01b61f30b9.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852) at $HttpServletRequestHandler_127d3c01b61f30b9.service(Unknown Source) at $HttpServletRequestHandler_127d3c01b61f30b1.service(Unknown Source) at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828) at com.sun.grizzly.comet.CometEngine.executeServlet(CometEngine.java:444) at com.sun.grizzly.comet.CometEngine.handle(CometEngine.java:308) at com.sun.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:87) at com.sun.grizzly.arp.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:171) at com.sun.grizzly.arp.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:143) at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:94) at com.sun.grizzly.http.TaskBase.run(TaskBase.java:193) at com.sun.grizzly.http.TaskBase.execute(TaskBase.java:175) at com.sun.grizzly.arp.DefaultAsyncHandler.handle(DefaultAsyncHandler.java:145) at com.sun.grizzly.arp.AsyncProtocolFilter.execute(AsyncProtocolFilter.java:204) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.NullPointerException at com.sun.enterprise.web.pwc.connector.coyote.PwcCoyoteRequest.getFormHintFieldEncoding(PwcCoyoteRequest.java:224) at com.sun.enterprise.web.pwc.connector.coyote.PwcCoyoteRequest.setRequestEncodingFromSunWebXml(PwcCoyoteRequest.java:187) at com.sun.enterprise.web.pwc.connector.coyote.PwcCoyoteRequest.getCharacterEncoding(PwcCoyoteRequest.java:128) at org.apache.catalina.connector.RequestFacade.getCharacterEncoding(RequestFacade.java:361) at org.apache.shiro.web.util.WebUtils.determineEncoding(WebUtils.java:368) at org.apache.shiro.web.util.WebUtils.decodeRequestString(WebUtils.java:344) at org.apache.shiro.web.util.WebUtils.getContextPath(WebUtils.java:255) at org.apache.shiro.web.util.WebUtils.getPathWithinApplication(WebUtils.java:111) at org.tynamo.security.internal.SecurityExceptionHandlerAssistant.handleRequestException(SecurityExceptionHandlerAssistant.java:55) at com.flowlogix.web.services.internal.ExceptionHandlerAssistantImpl.handleRequestException(ExceptionHandlerAssistantImpl.java:48) at org.tynamo.exceptionpage.services.ConfigurableRequestExceptionHandler.handleRequestException(ConfigurableRequestExceptionHandler.java:112) at com.flowlogix.web.services.ServicesModule$1.handleRequestException(ServicesModule.java:87) at $RequestExceptionHandler_127d3c01b61f30c7.handleRequestException(Unknown Source) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42) at $RequestHandler_127d3c01b61f30c9.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902) at $RequestHandler_127d3c01b61f30c9.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892) at $RequestHandler_127d3c01b61f30c9.service(Unknown Source) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90) at $RequestHandler_127d3c01b61f30c9.service(Unknown Source) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:105) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:95) at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:119) at $RequestHandler_127d3c01b61f30c9.service(Unknown Source) at $RequestHandler_127d3c01b61f30b8.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253) at com.flowlogix.web.services.internal.GwtCachingFilter.service(GwtCachingFilter.java:78) at $HttpServletRequestHandler_127d3c01b61f30b9.service(Unknown Source) at org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44) at $HttpServletRequestHandler_127d3c01b61f30b9.service(Unknown Source) at org.tynamo.security.services.impl.SecurityConfiguration$2.call(SecurityConfiguration.java:106) at org.tynamo.security.services.impl.SecurityConfiguration$2.call(SecurityConfiguration.java:104) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:380) ... 45 more
        Hide
        Lenny Primak added a comment -

        This is being caused by something else that was introduced in 0.4.3

        Show
        Lenny Primak added a comment - This is being caused by something else that was introduced in 0.4.3
        Hide
        Alejandro Scandroli added a comment -

        bulk closing issues that have been resolved for more than a year.

        Show
        Alejandro Scandroli added a comment - bulk closing issues that have been resolved for more than a year.

          People

          • Assignee:
            Kalle Korhonen
            Reporter:
            Lenny Primak
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: