You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andy Maag <an...@gmail.com> on 2005/06/30 20:20:29 UTC
Sporadic problem with "in" parameters
In a Tapestry application my team is working on, we are seeing
sporadic problems with "in" parameters. By sporadic, I mean on the
order of 1 in 1000 requests.
The simplest manifestation of this problem is with the ServiceLink
component. Occasionally, we will see an error such as the one at the
bottom of this email. From my perusal of the Tapestry 3.0.3 source
code, this condition could only be reached if "null" were passed in as
the "service" parameter to the ServiceLink component. However, every
one of our ServiceLink instances uses one of the Tapestry constants
(i.e. @org.apache.tapestry.Tapestry@RESTART_SERVICE) for the service
parameter.
Have others seen issues with parameters not being connected properly?
We had seen one or two cases in our application code that were fixed
by changing the parameter to "auto".
I'm currently attempting to reproduce this with Tapestry Debug logging
turned on, but have been unable to do so thus far. BTW - we are
running Tapestry 3.0.3 under Tomcat 5.0.28.
Any insights will be greatly appreciated. Thanks.
-Andy
org.apache.tapestry.ApplicationRuntimeException
Engine does not implement a service named 'null'.
Stack Trace:
org.apache.tapestry.engine.AbstractEngine.getService(AbstractEngine.java:610)
org.apache.tapestry.link.AbstractLinkComponent.getLink(AbstractLinkComponent.java:211)
org.apache.tapestry.link.ServiceLink.getLink(ServiceLink.java:39)
org.apache.tapestry.link.DefaultLinkRenderer.renderLink(DefaultLinkRenderer.java:63)
org.apache.tapestry.link.AbstractLinkComponent.renderComponent(AbstractLinkComponent.java:103)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:624)
org.apache.tapestry.html.Body.renderComponent(Body.java:269)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:624)
org.apache.tapestry.html.Shell.renderComponent(Shell.java:124)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:118)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:300)
org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:368)
org.apache.tapestry.engine.AbstractEngine.renderResponse(AbstractEngine.java:749)
org.apache.tapestry.engine.PageService.service(PageService.java:77)
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:889)
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:198)
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:159)
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:117)
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:534)
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Sporadic problem with "in" parameters
Posted by Kent Tong <ke...@cpttm.org.mo>.
Andy Maag <andy.maag <at> gmail.com> writes:
> The simplest manifestation of this problem is with the ServiceLink
> component. Occasionally, we will see an error such as the one at the
> bottom of this email. From my perusal of the Tapestry 3.0.3 source
> code, this condition could only be reached if "null" were passed in as
> the "service" parameter to the ServiceLink component. However, every
> one of our ServiceLink instances uses one of the Tapestry constants
> (i.e. <at> org.apache.tapestry.Tapestry <at> RESTART_SERVICE) for the service
> parameter.
>
> Have others seen issues with parameters not being connected properly?
> We had seen one or two cases in our application code that were fixed
> by changing the parameter to "auto".
I'd guess that this is caused by concurrent accesses to the same page
instance. After the component is rendered, its parameters are reset
to their default value (null in most cases). If they're now accessed,
they'll return null. To verify, try overriding prepareForRender()
and cleanupAfterRender() to perform some logging.
However, in theory, each thread should get its own page instance, so
this could never happen.
--
Author of an e-Book for learning Tapestry (http://www.agileskills2.org/EWDT)
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org