You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Dan Adams <da...@ifactory.com> on 2006/05/24 22:10:47 UTC
Having trouble with creating an ASO
I'm trying the following in my hivemind.xml:
<contribution configuration-id="tapestry.state.ApplicationObjects">
<state-object name="user-data" scope="session">
<invoke-factory
object="instance:org.apache.tapestry.engine.state.NamedClassStateObjectFactory,className=com.ifactory.cms.UserData" />
</state-object>
</contribution>
and I'm getting a NPE in NamedClassStateObjectFactory:
public Object createStateObject()
{
try
{
Class c = _classResolver.findClass(_className); !!!! NPE IS
HERE
return c.newInstance();
}
catch (Exception ex)
{
throw new
ApplicationRuntimeException(StateMessages.unableToInstantiateObject(
_className,
ex), getLocation(), ex);
}
}
But before I was doing it this way with no problem:
<contribution configuration-id="tapestry.state.ApplicationObjects">
<state-object name="user-data" scope="session">
<invoke-factory object="service:UserDataFactory" />
</state-object>
</contribution>
<service-point id="UserDataFactory"
interface="org.apache.tapestry.engine.state.StateObjectFactory">
<invoke-factory service-id="hivemind.BuilderFactory">
<construct class="UserDataFactory" />
</invoke-factory>
</service-point>
Where UserDataFactory just extended NamedClassStateObjectFactory and set
className. Any suggestions?
--
Dan Adams
Software Engineer
Interactive Factory
617.235.5857
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org