You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Daniel Jue <te...@gmail.com> on 2008/01/07 09:04:28 UTC

Re: T5 Complex NPE in org.apache.tapestry.internal.util.Base64InputStream

I have not fixed this in my application yet.  I think there is a way
to tell Acegi to use a custom redirect filter you would provide.
That's where you can intercept the request URL (that initiated the
login procedure) and modify it.  So the modification would be to just
redirect to the page, stripping off the form variables and such.  (Or
if you are really good, you could strip off only the variables
references that were breaking the app.)

In the interim, I think there is a way in the Acegi XML to forward
back to a single URL, like the start page, instead of redirecting you
to the original request.
That would at least keep users from thinking the app is broken. =)

If someone on the list has implemented this already, please share if you can!
I'm not sure when I'll have time to fix this issue.

Daniel Jue

On Jan 6, 2008 3:30 PM, Steven Woolley <wo...@gmail.com> wrote:
> Daniel,
> did you ever figure out a workaround for this?  I am having the same problem
> and it happens all too often!
> Thanks,
> Steve
>
>
>
> On Nov 29, 2007 3:49 PM, Daniel Jue < teamphy6@gmail.com> wrote:
> >
> >
> >
> > I'm still having an issue with this.   Is there a quick fix or
> > workaround?  Or any idea where I should insert a hack?
> > Summary:
> > You log into your app and an ASO is created for you
> > You land on a page that has a form
> > You wait until your session times out (automatically)
> > You click the form submit.
> > Your app redirects you to a login page, to get your ASO
> > On success the app redirects you to your form submit request, which is
> > a form.OnAction
> > Tapestry gives you a NPE when trying to decode a null gzip'd stream
> >
> > I am using T5.0.5
> >
> >
> >
> >
> >
> >
> >
> > On Aug 23, 2007 1:56 AM, Daniel Jue <te...@gmail.com> wrote:
> > > I'll try my best to explain the situation, but please ask if you think
> > > other details would help determine the problem.
> > >
> > > I am using Acegi--with great success so far.
> > > When a user logs in and gets authenticated via Acegi, an ASO is
> > > created for the user, holding the user details, etc.
> > >
> > > I have a form in a component.  For simplicity, this form has only one
> > > item-a select/dropdown.
> > > The submit is handled through an onChange event that gets coded into the
> select.
> > >
> > > Here is the case:
> > > A logged in user can change the select box selection, and the method
> > > for the OnChange will
> > > 1st. Check to make sure the user's aso exists
> > > 2nd. Save the selection to the ASO if the ASO exists
> > >
> > > Let's say a user somehow gets logged out, either by timing out or
> > > opening another window and logging out.
> > >
> > > Now on the page that still displays the form, the user makes a
> selection.
> > >
> > > The application immediately takes me to my login form page, as defined
> in Acegi.
> > > The user enters their information and then it's suppose to redirect
> > > them back to the "refering url" as far as I understand.  But instead
> > > after logging in, applications gives me a NPE in a section of Tapestry
> > > Internal that I don't understand.
> > >
> > > Interestingly, if I manage to put in a url, say, back to the start
> > > page, I see that the user is logged in.  So the login/creation of the
> > > ASO _did_ happen.  Something else was going on here....
> > >
> > > Here is the stack trace:
> > >
> > > An unexpected application exception has occurred.
> > >
> > >     * org.apache.tapestry.ioc.internal.util.TapestryException
> > >     * java.lang.NullPointerException
> > >
> > >       Stack trace
> > >               o
> > >
> org.apache.tapestry.internal.util.Base64InputStream.decode(Base64InputStream.java:34)
> > >               o
> > >
> org.apache.tapestry.internal.util.Base64InputStream.<init>(Base64InputStream.java:29)
> > >               o
> > >
> org.apache.tapestry.internal.util.Base64ObjectInputStream.<init>(Base64ObjectInputStream.java
> :30)
> > >               o
> > > org.apache.tapestry.corelib.components.Form.onAction(Form.java:355)
> > >               o
> > >
> org.apache.tapestry.corelib.components.Form.handleComponentEvent(Form.java)
> > >               o
> > >
> org.apache.tapestry.internal.structure.ComponentPageElementImpl.handleEvent(ComponentPageElementImpl.java:893)
> > >               o
> > >
> org.apache.tapestry.internal.structure.ComponentPageElementImpl.triggerEvent
> (ComponentPageElementImpl.java:998)
> > >               o
> > >
> org.apache.tapestry.internal.services.ComponentActionRequestHandlerImpl.handle(ComponentActionRequestHandlerImpl.java:81)
> > >               o
> > >
> org.apache.tapestry.internal.services.InternalModule$11.handle(InternalModule.java:541)
> > >               o
> > >
> org.apache.tapestry.internal.services.ComponentActionDispatcher.dispatch(ComponentActionDispatcher.java
> :116)
> > >               o
> > >
> org.apache.tapestry.services.TapestryModule$12.service(TapestryModule.java:1066)
> > >               o
> > > myapp.wui.tapestry.services.AppModule$1.service(AppModule.java:71)
> > >               o
> > >
> org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:43)
> > >               o
> > >
> org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java
> :657)
> > >               o
> > >
> org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:63)
> > >               o
> > > org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke
> (CheckForUpdatesFilter.java:97)
> > >               o
> > >
> org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:88)
> > >               o
> > > org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead
> (ConcurrentBarrier.java:77)
> > >               o
> > >
> org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:110)
> > >               o
> > > org.apache.tapestry.services.TapestryModule$11.service
> (TapestryModule.java:1044)
> > >               o
> > >
> org.apache.tapestry.upload.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:42)
> > >               o
> > > org.apache.tapestry.TapestryFilter.doFilter (TapestryFilter.java:135)
> > >               o
> > >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
> > >               o
> > > org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:188)
> > >               o
> > >
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
> > >               o
> > > org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke
> (FilterSecurityInterceptor.java:107)
> > >               o
> > >
> org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
> > >               o
> > > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter
> (FilterChainProxy.java:275)
> > >               o
> > >
> org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
> > >               o
> > > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter
> (FilterChainProxy.java:275)
> > >               o
> > >
> org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
> > >               o
> > > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter
> (FilterChainProxy.java:275)
> > >               o
> > >
> org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:175)
> > >               o
> > > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter
> (FilterChainProxy.java:275)
> > >               o
> > >
> org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:229)
> > >               o
> > > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter
> (FilterChainProxy.java:275)
> > >               o
> > > org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
> > >               o
> > > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter
> (FilterChainProxy.java:275)
> > >               o
> > >
> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286)
> > >               o
> > > org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter
> (FilterChainProxy.java:275)
> > >               o
> > >
> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
> > >               o
> > > org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java
> :98)
> > >               o
> > >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
> > >               o
> > > org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:188)
> > >               o
> > >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
> > >               o
> > > org.apache.catalina.core.StandardContextValve.invoke
> (StandardContextValve.java:174)
> > >               o
> > >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> > >               o
> > > org.apache.catalina.valves.ErrorReportValve.invoke
> (ErrorReportValve.java:117)
> > >               o
> > >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
> > >               o
> > > org.apache.catalina.connector.CoyoteAdapter.service
> (CoyoteAdapter.java:151)
> > >               o
> > >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
> > >               o
> > >
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
> (Http11BaseProtocol.java:665)
> > >               o
> > >
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
> > >               o
> > > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
> (LeaderFollowerWorkerThread.java:81)
> > >               o
> > >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
> > >               o java.lang.Thread.run(Unknown Source)
> > >
> > >
> > > Context Path
> > >     /myapp
> > > Request Path
> > >     /setup/hierarchicalsetuppage.selectyear.selectyearsingleform
> > >
> > >
> > > Any clues as to what is going on?
> > >
> >
> > ---------------------------------------------------------------------
> >
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org