You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Alan Chandler <al...@chandlerfamily.org.uk> on 2005/10/02 10:42:55 UTC
Help with error message
I just made a small change to my code to test some pagination, by reducing
page size.
As soon as I have tried this and run it I get an error message of the form
(more complete listing further down this e-mail)
"Could not find a strategy instance for class
uk.org.chandlerfamily.sqlmap.famtree.Person"
I don't understand what this error message means can someone explain please.
I strongly suspect it has something to do with the fact that I have a
"@DirectLink" component at the bottom of the page which is disabled when
there is no pagination - I have breakpoints set on getPersonList() routine,
and it seems to get called twice from the segment of code below (once for the
disabled of direct link, once for the if condition).
[ isLastPage() is a valid method of the returned PersonList, although its a
bit difficult (but not impossible) to put a breakpoint on this]
<span jwcid="@DirectLink"
listener="listener:doShowNextPage"
parameters="ognl:personList"
disabled="ognl:personList.lastPage"
><span jwcid="@If"
condition="ognl:!personList.lastPage"
><div class="page">Next</div>
</span>
</span>
uk.org.chandlerfamily.sqlmap.famtree.Person is the class of object in the
person list.
More of the actual stack trace ...
org.apache.hivemind.ApplicationRuntimeException
Could not find a strategy instance for class
uk.org.chandlerfamily.sqlmap.famtree.Person.
java.lang.IllegalArgumentException
Could not find a strategy instance for class
uk.org.chandlerfamily.sqlmap.famtree.Person.
Stack Trace:
org.apache.hivemind.lib.util.StrategyRegistryImpl.searchForAdaptor(StrategyRegistryImpl.java:176)
org.apache.hivemind.lib.util.StrategyRegistryImpl.getStrategy(StrategyRegistryImpl.java:74)
org.apache.tapestry.util.io.DataSqueezerImpl.squeeze(DataSqueezerImpl.java:125)
org.apache.tapestry.util.io.DataSqueezerImpl.squeeze(DataSqueezerImpl.java:146)
$DataSqueezer_106b061ac8f.squeeze($DataSqueezer_106b061ac8f.java)
org.apache.tapestry.services.impl.LinkFactoryImpl.squeeze(LinkFactoryImpl.java:180)
org.apache.tapestry.services.impl.LinkFactoryImpl.squeezeServiceParameters(LinkFactoryImpl.java:154)
org.apache.tapestry.services.impl.LinkFactoryImpl.constructLink(LinkFactoryImpl.java:102)
$LinkFactory_106b061ac91.constructLink($LinkFactory_106b061ac91.java)
org.apache.tapestry.engine.DirectService.getLink(DirectService.java:85)
$IEngineService_106b061ad13.getLink($IEngineService_106b061ad13.java)
org.apache.tapestry.services.impl.EngineServiceOuterProxy.getLink(EngineServiceOuterProxy.java:60)
org.apache.tapestry.link.AbstractLinkComponent.getLink(AbstractLinkComponent.java:199)
org.apache.tapestry.link.DirectLink.getLink(DirectLink.java:52)
org.apache.tapestry.link.DefaultLinkRenderer.renderLink(DefaultLinkRenderer.java:57)
org.apache.tapestry.link.AbstractLinkComponent.renderComponent(AbstractLinkComponent.java:95)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434)
org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:44)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434)
org.apache.tapestry.html.Body.renderComponent(Body.java:129)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434)
org.apache.tapestry.html.Shell.renderComponent(Shell.java:114)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:275)
org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:368)
org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(ResponseRendererImpl.java:71)
$ResponseRenderer_106b061acaf.renderResponse($ResponseRenderer_106b061acaf.java)
org.apache.tapestry.engine.HomeService.service(HomeService.java:65)
$IEngineService_106b061ad0f.service($IEngineService_106b061ad0f.java)
org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:65)
--
Alan Chandler
http://www.chandlerfamily.org.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Help with error message
Posted by Bernd <Be...@web.de>.
> > "Could not find a strategy instance for class
> > uk.org.chandlerfamily.sqlmap.famtree.Person"
>
> I think I understand this now - I pass a parameter of PersonList to the
> DirectLink listener. This has to be squeezed into a URL, and it doesn't know
> how to do this.
I had the same problem. My mistake was, that the class corresponding to your
"Person" didn“t implement the interface java.io.Serializable
Best Regards!
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Help with error message
Posted by Alan Chandler <al...@chandlerfamily.org.uk>.
On Sunday 02 Oct 2005 09:42, Alan Chandler wrote:
> I just made a small change to my code to test some pagination, by reducing
> page size.
>
> As soon as I have tried this and run it I get an error message of the form
> (more complete listing further down this e-mail)
>
> "Could not find a strategy instance for class
> uk.org.chandlerfamily.sqlmap.famtree.Person"
I think I understand this now - I pass a parameter of PersonList to the
DirectLink listener. This has to be squeezed into a URL, and it doesn't know
how to do this.
I don't know how to solve it directly, but in fact I was passing the parameter
because I didn't think the abstract property in the page class which held
"PersonList" would persist from the initial render until the listener is
called, However it seems to, so I found I did not need the parameter and
just removed it, and all works fine.
--
Alan Chandler
http://www.chandlerfamily.org.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org