You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Janko Muzykant <um...@gmail.com> on 2007/09/20 13:58:31 UTC

T5 NullPointerException during Form submitting

i just noticed a weird thing while form submitting - it fails if session
expire in a meantime. following are steps i have done:
- session timeout set to 1 minute
- visited form with submit button
- session expires before submit has been pushed
- acegi redirects to login page
- after login tapestry returns:

org.apache.tapestry.ioc.internal.util.TapestryException
org.apache.tapestry.ioc.internal.util.TapestryException
	at org.apache.tapestry.corelib.components.Form.onAction(Form.java:375)
	at
org.apache.tapestry.corelib.components.Form.handleComponentEvent(Form.java)
	at
org.apache.tapestry.internal.structure.ComponentPageElementImpl.handleEvent(ComponentPageElementImpl.java:893)
	at
org.apache.tapestry.internal.structure.ComponentPageElementImpl.triggerEvent(ComponentPageElementImpl.java:998)
	at
org.apache.tapestry.internal.services.ComponentActionRequestHandlerImpl.handle(ComponentActionRequestHandlerImpl.java:81)
	at
org.apache.tapestry.internal.services.InternalModule$11.handle(InternalModule.java:541)
	at
$ComponentActionRequestHandler_11522b0b9b2.handle($ComponentActionRequestHandler_11522b0b9b2.java)
	at
$ComponentActionRequestHandler_11522b0b964.handle($ComponentActionRequestHandler_11522b0b964.java)
	at
org.apache.tapestry.internal.services.ComponentActionDispatcher.dispatch(ComponentActionDispatcher.java:116)
	at $Dispatcher_11522b0b966.dispatch($Dispatcher_11522b0b966.java)
	at $Dispatcher_11522b0b959.dispatch($Dispatcher_11522b0b959.java)
	at
org.apache.tapestry.services.TapestryModule$12.service(TapestryModule.java:1066)
	at
org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:43)
	at $RequestHandler_11522b0b95a.service($RequestHandler_11522b0b95a.java)
	at
org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:657)
	at $RequestHandler_11522b0b95a.service($RequestHandler_11522b0b95a.java)
	at
org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:63)
	at $RequestHandler_11522b0b95a.service($RequestHandler_11522b0b95a.java)
	at
org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:97)
	at
org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:88)
	at
org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
	at
org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:110)
	at $RequestHandler_11522b0b95a.service($RequestHandler_11522b0b95a.java)
	at $RequestHandler_11522b0b953.service($RequestHandler_11522b0b953.java)
	at
org.apache.tapestry.services.TapestryModule$11.service(TapestryModule.java:1044)
	at
$HttpServletRequestHandler_11522b0b952.service($HttpServletRequestHandler_11522b0b952.java)
	at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:135)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
	at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
	at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
	at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	at
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
	at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	at
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	at
org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	at
org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
	at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:108)
	at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	at
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:193)
	at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	at
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
	at
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:595)

Caused by: java.lang.NullPointerException
	at
org.apache.tapestry.internal.util.Base64InputStream.decode(Base64InputStream.java:34)
	at
org.apache.tapestry.internal.util.Base64InputStream.<init>(Base64InputStream.java:29)
	at
org.apache.tapestry.internal.util.Base64ObjectInputStream.<init>(Base64ObjectInputStream.java:30)
	at org.apache.tapestry.corelib.components.Form.onAction(Form.java:355)

is it my fault or something is wrong with form submitting inside T5 ?

thanks,
jm.

-- 
View this message in context: http://www.nabble.com/T5-NullPointerException-during-Form-submitting-tf4487069.html#a12795623
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T5 NullPointerException during Form submitting

Posted by Janko Muzykant <um...@gmail.com>.
if anyone is interested why the problem arises, here is some explanation:

http://jroller.com/agrebnev/entry/how_do_not_lose_data

in short, the problem is acegi itself. it does not restore POST data after
re-authentication.
anyway, it would be nice to have such a case validated inside tapestry :)

regards,
jm.



Janko Muzykant wrote:
> 
> ok, it's actually not a problem of submitting, it's a problem of such a
> link:
> 
> http://localhost:8080/mygreat-webapp/reports/reportusers.filter.form
> 
> if i try to go directly to this link exception mentioned before occurs.
> filter is my component inside reportusers page. obviously it contains a
> form which seems to be a trouble. could someone give me a hint why this
> url causes such a problem?
> 
> thanks,
> jm.
> 
> 
> 
> Janko Muzykant wrote:
>> 
>> i just noticed a weird thing while form submitting - it fails if session
>> expire in a meantime. following are steps i have done:
>> - session timeout set to 1 minute
>> - visited form with submit button
>> - session expires before submit has been pushed
>> - acegi redirects to login page
>> - after login tapestry returns:
>> 
>> [cut]
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T5-NullPointerException-during-Form-submitting-tf4487069.html#a12813572
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T5 NullPointerException during Form submitting

Posted by Josh Canfield <jo...@thedailytube.com>.
http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/src-html/org/apache/tapestry/corelib/components/Form.html#line.347

Looks like a missing null check on the FORM_DATA parameter. You are trying
to "get" a form that expects a hidden field that is missing.

Josh


On 9/20/07, Janko Muzykant <um...@gmail.com> wrote:
>
>
> ok, it's actually not a problem of submitting, it's a problem of such a
> link:
>
> http://localhost:8080/mygreat-webapp/reports/reportusers.filter.form
>
> if i try to go directly to this link exception mentioned before occurs.
> filter is my component inside reportusers page. obviously it contains a
> form
> which seems to be a trouble. could someone give me a hint why this url
> causes such a problem?
>
> thanks,
> jm.
>
>
>
> Janko Muzykant wrote:
> >
> > i just noticed a weird thing while form submitting - it fails if session
> > expire in a meantime. following are steps i have done:
> > - session timeout set to 1 minute
> > - visited form with submit button
> > - session expires before submit has been pushed
> > - acegi redirects to login page
> > - after login tapestry returns:
> >
> > [cut]
> >
>
> --
> View this message in context:
> http://www.nabble.com/T5-NullPointerException-during-Form-submitting-tf4487069.html#a12797597
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

Re: T5 NullPointerException during Form submitting

Posted by Janko Muzykant <um...@gmail.com>.
ok, it's actually not a problem of submitting, it's a problem of such a link:

http://localhost:8080/mygreat-webapp/reports/reportusers.filter.form

if i try to go directly to this link exception mentioned before occurs.
filter is my component inside reportusers page. obviously it contains a form
which seems to be a trouble. could someone give me a hint why this url
causes such a problem?

thanks,
jm.



Janko Muzykant wrote:
> 
> i just noticed a weird thing while form submitting - it fails if session
> expire in a meantime. following are steps i have done:
> - session timeout set to 1 minute
> - visited form with submit button
> - session expires before submit has been pushed
> - acegi redirects to login page
> - after login tapestry returns:
> 
> [cut]
> 

-- 
View this message in context: http://www.nabble.com/T5-NullPointerException-during-Form-submitting-tf4487069.html#a12797597
Sent from the Tapestry - User mailing list archive at Nabble.com.


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