Hi,
I can't get this solved. I had added some extra debugging output and
I waited for 48 hours and contacted the server again. As soon as my
dynamic text component tries to ask the page's visit class for a
specific
text (the database handling is not done inside the text component, I
get the following error:
Component exception : null
------------------------------------------------------------------------
--------
sun.reflect.GeneratedMethodAccessor138.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
se.pardeike.tapestry.Extras.DBTextSnippet.DBTextSnippet.renderComponent(
DBTextSnippet.java:44)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
org.apache.tapestry.AbstractComponent.renderBody
(AbstractComponent.java:624)
org.apache.tapestry.components.Conditional.renderComponent
(Conditional.java:56)
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.AbstractComponent.renderBody
(AbstractComponent.java:624)
org.apache.tapestry.components.RenderBody.renderComponent
(RenderBody.java:45)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
org.apache.tapestry.AbstractComponent.renderBody
(AbstractComponent.java:624)
org.apache.tapestry.components.Conditional.renderComponent
(Conditional.java:56)
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.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.AbstractEngine.handlePageRedirectException
(AbstractEngine.java:1045)
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:
899)
org.apache.tapestry.ApplicationServlet.doService
(ApplicationServlet.java:198)
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:
159)
javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch
(WebApplicationHandler.java:473)
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
org.mortbay.jetty.servlet.WebApplicationContext.handle
(WebApplicationContext.java:635)
org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
org.mortbay.http.HttpServer.service(HttpServer.java:954)
org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
244)
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
### Note:
### DBTextSnippet.java:44 is
### String txt = (String)snippetGetterMethod.invoke(visitObject,
arguments);
I've attached the two files that are involved to this email: the
page's visit
class and the dynamic text component class. The structure is simple:
a page has
a component <span jwcid="@pardeike:DynamicText" snippet="fshome-
menu1"/> which
is in my own component library. There 'DBTextSnippet' tries to call
getSnippetText()
in page.visit with two parameters (the id and the locale). That will
use cayenne
to fetch the text from a database and returns it to DBTextSnippet
which renders it.
Works perfectly until the server gets idle for a long time.
The code contains a few debugging statements which output:
page : [EMAIL PROTECTED]
visitObject : [EMAIL PROTECTED]
visitClass : class Fsys.Common.Visit
arguments[0] : fshome-menu1
arguments[1] : sv_SE
snippetGetterMethod : public java.lang.String
Fsys.Common.Visit.getSnippetText(java.lang.String,java.util.Locale)
which to me looks like all my stuff isn't null at all. I'm out of
ideas why
invoke fails here...
Regards,
Andreas Pardeike
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]