tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Grant (JIRA)" <tapestry-...@jakarta.apache.org>
Subject [jira] Commented: (TAPESTRY-701) NullPointerException in PageClientPropertyPersistenceScope when using 'client' persistence strategy and executing a ServiceLink
Date Wed, 09 Nov 2005 23:52:04 GMT
    [ http://issues.apache.org/jira/browse/TAPESTRY-701?page=comments#action_12357167 ] 

Bruce Grant commented on TAPESTRY-701:
--------------------------------------

Tapestry 4.0 beta 12 - WINXP - Tomcat 5.0.28 - JDK 1.5 

This same error occurs with the ExternalService and PageService in the following conditions:

In the listener method that was invoked from a form post, I call the following method to redirect
to a certain page.

  public void redirectAfterPost(IPage page, IRequestCycle cycle)
  {      
    String url = getPageService().getLink(cycle, false, page.getPageName()).getURL();
    
    throw new RedirectException(url);
  }

If the page I redirect to contains a client persisted property, I get the above error.   Same
thing happens if you replace "getPageService()" with "getExternalService()".

Here is the stack trace:

# org.apache.tapestry.record.PageClientPropertyPersistenceScope.shouldEncodeState(PageClientPropertyPersistenceScope.java:45)
# $ClientPropertyPersistenceScope_107764c6104.shouldEncodeState($ClientPropertyPersistenceScope_107764c6104.java)
# org.apache.tapestry.record.ClientPropertyPersistenceStrategy.addParametersForPersistentProperties(ClientPropertyPersistenceStrategy.java:126)
# $PropertyPersistenceStrategy_107764c6100.addParametersForPersistentProperties($PropertyPersistenceStrategy_107764c6100.java)
# $PropertyPersistenceStrategy_107764c6101.addParametersForPersistentProperties($PropertyPersistenceStrategy_107764c6101.java)
# org.apache.tapestry.record.PropertyPersistenceStrategySourceImpl.addParametersForPersistentProperties(PropertyPersistenceStrategySourceImpl.java:99)
# $PropertyPersistenceStrategySource_107764c6063.addParametersForPersistentProperties($PropertyPersistenceStrategySource_107764c6063.java)
# org.apache.tapestry.services.impl.LinkFactoryImpl.constructLink(LinkFactoryImpl.java:112)
# $LinkFactory_107764c5fec.constructLink($LinkFactory_107764c5fec.java)
# org.apache.tapestry.engine.PageService.getLink(PageService.java:52)
# $IEngineService_107764c6073.getLink($IEngineService_107764c6073.java)
# org.apache.tapestry.services.impl.EngineServiceOuterProxy.getLink(EngineServiceOuterProxy.java:60)
# mytest.testapp.tapestry.pages.FoundationPage.redirectAfterPost(FoundationPage.java:85)
# mytest.testapp.tapestry.pages.SecuredPage.pageValidate(SecuredPage.java:66)
# org.apache.tapestry.AbstractPage.firePageValidate(AbstractPage.java:585)
# org.apache.tapestry.AbstractPage.validate(AbstractPage.java:307)
# mytest.testapp.tapestry.pages.UpdateAccount.validate(UpdateAccount.java:51)
# org.apache.tapestry.engine.RequestCycle.activate(RequestCycle.java:628)
# org.apache.tapestry.engine.RequestCycle.activate(RequestCycle.java:614)
# org.apache.tapestry.engine.PageService.service(PageService.java:67)
# $IEngineService_107764c6073.service($IEngineService_107764c6073.java)
# org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:65)
# org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:248)
# org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
# $WebRequestServicer_107764c604e.service($WebRequestServicer_107764c604e.java)
# org.apache.tapestry.services.impl.DisableCachingFilter.service(DisableCachingFilter.java:48)
# $WebRequestServicerFilter_107764c6050.service($WebRequestServicerFilter_107764c6050.java)
# $WebRequestServicer_107764c6052.service($WebRequestServicer_107764c6052.java)
# $WebRequestServicer_107764c604a.service($WebRequestServicer_107764c604a.java)
# org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56)
# $ServletRequestServicer_107764c602e.service($ServletRequestServicer_107764c602e.java)
# org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
# $ServletRequestServicerFilter_107764c602a.service($ServletRequestServicerFilter_107764c602a.java)
# $ServletRequestServicer_107764c6030.service($ServletRequestServicer_107764c6030.java)
# org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
# $ServletRequestServicerFilter_107764c6028.service($ServletRequestServicerFilter_107764c6028.java)
# $ServletRequestServicer_107764c6030.service($ServletRequestServicer_107764c6030.java)
# org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
# $ServletRequestServicerFilter_107764c602c.service($ServletRequestServicerFilter_107764c602c.java)
# $ServletRequestServicer_107764c6030.service($ServletRequestServicer_107764c6030.java)
# $ServletRequestServicer_107764c6022.service($ServletRequestServicer_107764c6022.java)
# org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:141)
# org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:97)
# javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
# javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
# org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
# org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
# org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
# org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
# org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
# org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
# org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
# org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
# org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
# org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
# org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
# org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
# org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
# org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
# org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
# org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
# org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
# org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
# org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
# org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
# org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
# org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
# org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
# java.lang.Thread.run(Thread.java:595)


> NullPointerException in PageClientPropertyPersistenceScope when using 'client' persistence
strategy and executing a ServiceLink
> -------------------------------------------------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-701
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-701
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>  Environment: WinXP Pro, JBOSS 4.0.3RC1
>     Reporter: Scott Jarvi
>     Priority: Minor

>
> A page that's using the 'client' persistence strategy for one of its properties includes
a ServiceLink that triggers a subclass of RestartService. The service logs the user out, invalidates
the session and then tries to redirect the user back to the 'Home' page, using HomeService.getLink().
 However, trying to get the link from the HomeService resulted in a NPE...
> org.apache.tapestry.record.PageClientPropertyPersistenceScope.shouldEncodeState(PageClientPropertyPersistenceScope.java:45)
> $ClientPropertyPersistenceScope_106dad08dcb.shouldEncodeState($ClientPropertyPersistenceScope_106dad08dcb.java)
> org.apache.tapestry.record.ClientPropertyPersistenceStrategy.addParametersForPersistentProperties(ClientPropertyPersistenceStrategy.java:136)
> $PropertyPersistenceStrategy_106dad08dc7.addParametersForPersistentProperties($PropertyPersistenceStrategy_106dad08dc7.java)
> $PropertyPersistenceStrategy_106dad08dc8.addParametersForPersistentProperties($PropertyPersistenceStrategy_106dad08dc8.java)
> org.apache.tapestry.record.PropertyPersistenceStrategySourceImpl.addParametersForPersistentProperties(PropertyPersistenceStrategySourceImpl.java:99)
> $PropertyPersistenceStrategySource_106dad08d18.addParametersForPersistentProperties($PropertyPersistenceStrategySource_106dad08d18.java)
> org.apache.tapestry.services.impl.LinkFactoryImpl.constructLink(LinkFactoryImpl.java:112)
> $LinkFactory_106dad08ca2.constructLink($LinkFactory_106dad08ca2.java)
> org.apache.tapestry.engine.HomeService.getLink(HomeService.java:58)
> (rest of stack trace omitted)
> It seems that the NullPointer is caused by a null IPage in the RequestCycle, which PageClientPropertyPersistenceScope
tries to check to determine if encoding should be applied.  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


Mime
View raw message