Hi Ric,

I suspect that a server-side session is not established for some reason,
e.g. the browser does not send back the JSESSIONID cookie or something
invalidates the session. It is hard to tell without any source code
examples. You can try verify what is happening by putting breakpoints in
relevant parts of Tapestry. For example, if you use "@SessionAttribute",
find the SessionAttributeWorker in Tapesty
(package: org.apache.tapestry5.internal.transform), and set a breakpoint at
the beginning of the "get()" method of SessionKeyConduit.

Best regards,
Cezary


On Tue, Jun 18, 2019 at 8:23 PM Ric 2000 <erich.gorma...@gmail.com> wrote:

> Dear Tapestry users,
>
> I face the following problem:
> In a page I use a simple bean annotated as SessionState or SessionAttribute
> (problem is the same on both).
> It is initialized in the SetupRender method of the page and in other
> methods, called from within the SetupRender method, the object is in
> correct sttae and shows the expected values.
> But after a form submit triggered in this page, the SessionState or
> SessionAttribute object is suddenly "null" in the onValidate method of this
> form.
> How did I see that?
> The production mode flag is "false", so that I can debug the Tapestry
> managed objects. When the onValidate method is entered, the SessionState or
> SessionAttributehas still the expeceted state: it is not null and all
> properties in it are correctly filled.
> But when the object is "touched" the first time by calling a property
> getter or setter on it, it is directly "null" and an NPE is thrown when
> accessing it.
>
> The framework version is 5.4.3
>
> Do you have any explanations for that? Thanks in advance for your hints!
>
> Regards, Ric
>

Reply via email to