You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by LLTYK <LL...@mailinator.com> on 2010/09/16 17:18:25 UTC
NPE in getSession of an anonymous Request class?
I was wondering where these anonymous request classes are created... they
don't have debug line number information. Somehow getSession(false) is
throwing a NullPointerException when a component tries to set a parameter to
null.
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Error
persisting field WizardPage:redirect: java.lang.NullPointerException [at
classpath:com/x/y/pages/WizardPage.tml, line 2]
at
org.apache.tapestry5.internal.bindings.PropBinding.set(PropBinding.java:75)
at
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.write(InternalComponentResourcesImpl.java:540)
... 141 more
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Error
persisting field WizardPage:redirect: java.lang.NullPointerException
at
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.persistFieldChange(InternalComponentResourcesImpl.java:289)
at com.x.y.pages.WizardPage._$write_redirect(WizardPage.java)
at com.x.y.pages.WizardPage.setRedirect(WizardPage.java)
at
$PropertyConduit_12b1ac1fed0.set($PropertyConduit_12b1ac1fed0.java)
at
org.apache.tapestry5.internal.bindings.PropBinding.set(PropBinding.java:71)
... 142 more
Caused by: java.lang.NullPointerException
at $Request_12b1ac1fc77.getSession($Request_12b1ac1fc77.java)
at $Request_12b1ac1fc3d.getSession($Request_12b1ac1fc3d.java)
at
org.apache.tapestry5.internal.services.AbstractSessionPersistentFieldStrategy.postChange(AbstractSessionPersistentFieldStrategy.java:124)
at
org.apache.tapestry5.internal.services.PersistentFieldManagerImpl.postChange(PersistentFieldManagerImpl.java:82)
at
$PersistentFieldManager_12b1ac1fc98.postChange($PersistentFieldManager_12b1ac1fc98.java)
at
org.apache.tapestry5.internal.structure.PageImpl.persistFieldChange(PageImpl.java:160)
at
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.persistFieldChange(InternalComponentResourcesImpl.java:285)
... 146 more
--
View this message in context: http://tapestry-users.832.n2.nabble.com/NPE-in-getSession-of-an-anonymous-Request-class-tp5538899p5538899.html
Sent from the Tapestry Users 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: NPE in getSession of an anonymous Request class?
Posted by LLTYK <LL...@mailinator.com>.
Well it boiled down to the commented out line below. I changed the forward to
the requestGlobals one and it works.
try
{
requestGlobals.getResponse().sendRedirect("nontapestrypage.html");
//request.getRequestDispatcher("nontapestrypage.html").forward(request,
response);
return null;
} finally {
redirect = null;
}
--
View this message in context: http://tapestry-users.832.n2.nabble.com/NPE-in-getSession-of-an-anonymous-Request-class-tp5538899p5542335.html
Sent from the Tapestry Users 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