You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2005/06/03 15:14:03 UTC

Re: Workbench: java.lang.IllegalArgumentException,Could not find a strategy instance for class org.apache.hivemind.util.ContextResource.

This has been fixed in CVS HEAD, by-the-way.

On 5/21/05, Howard Lewis Ship <hl...@gmail.com> wrote:
> It's a strategy for mapping a particular implementation of Resource to
> an AssetFactory that can provide a matching IAsset, from which a URL
> can be created.  I'll look into it.
> 
> On 5/21/05, Richard Lewis-Shell <rl...@mac.com> wrote:
> > I'm getting another error from the workbench.  This time it's:
> >
> > Unable to instantiate component Home/$Border: Could not find a strategy
> > instance for class org.apache.hivemind.util.ContextResource.
> > component:      $Border_1@1a4181c[Home/$Border]
> > location:       context:/Home.html, line 1
> > 1       <span jwcid="@Border">
> > 2
> > 3       <p>This is the Tapestry Workbench. It is a testing ground for Tapestry.
> > 4       Each tab above links to a new page, or set of pages, that demonstrate
> > Tapestry components and
> > 5       features.
> > 6
> >
> >
> > java.lang.IllegalArgumentException
> > Could not find a strategy instance for class
> > org.apache.hivemind.util.ContextResource.
> > Stack Trace:
> >
> >     * org.apache.hivemind.lib.util.StrategyRegistryImpl.searchForAdaptor(StrategyRegistryImpl.java:176)
> >
> >     * org.apache.hivemind.lib.util.StrategyRegistryImpl.getStrategy(StrategyRegistryImpl.java:74)
> >
> >     * $AssetFactory_103fdb976e7._getStrategy($AssetFactory_103fdb976e7.java)
> >
> >     * $AssetFactory_103fdb976e7.createAsset($AssetFactory_103fdb976e7.java)
> >     * $AssetFactory_103fdb975f0.createAsset($AssetFactory_103fdb975f0.java)
> >     * $AssetFactory_103fdb975ef.createAsset($AssetFactory_103fdb975ef.java)
> >     * org.apache.tapestry.asset.AssetSourceImpl.findAsset(AssetSourceImpl.java:65)
> >
> >     * $AssetSource_103fdb9768c.findAsset($AssetSource_103fdb9768c.java)
> >     * $AssetSource_103fdb9768b.findAsset($AssetSource_103fdb9768b.java)
> >     * org.apache.tapestry.pageload.PageLoader.convertAsset(PageLoader.java:644)
> >
> >     * org.apache.tapestry.pageload.PageLoader.addAssets(PageLoader.java:628)
> >
> >     * org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:396)
> >
> >     * org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.java:456)
> >
> >     * $IPageLoader_103fdb9767f.createImplicitComponent($IPageLoader_103fdb9767f.java)
> >
> >     * $IPageLoader_103fdb97680.createImplicitComponent($IPageLoader_103fdb97680.java)
> >
> >
> > What is a strategy instance, and why can't one be found for ContextResource?
> >
> > Richard
> >
> >
> 
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> 
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: Workbench: java.lang.IllegalArgumentException,Could not find a strategy instance for class org.apache.hivemind.util.ContextResource.

Posted by Howard Lewis Ship <hl...@gmail.com>.
Parts of Tapestry are using HiveMind's ContextResource, and other
parts are using WebContextResource (which hides the differences
between servlet and portlet). I needed to add a strategy mapping for
the WebContextResource so that the correct AssetFactory could convert
those resources to assets.

On 6/3/05, Richard Lewis-Shell <rl...@mac.com> wrote:
> Wonderful!  It wasn't clear to me from the commit messages what the fix
> was - can you elaborate?
> 
> Howard Lewis Ship wrote:
> > This has been fixed in CVS HEAD, by-the-way.
> >
> > On 5/21/05, Howard Lewis Ship <hl...@gmail.com> wrote:
> >
> >>It's a strategy for mapping a particular implementation of Resource to
> >>an AssetFactory that can provide a matching IAsset, from which a URL
> >>can be created.  I'll look into it.
> >>
> >>On 5/21/05, Richard Lewis-Shell <rl...@mac.com> wrote:
> >>
> >>>I'm getting another error from the workbench.  This time it's:
> >>>
> >>>Unable to instantiate component Home/$Border: Could not find a strategy
> >>>instance for class org.apache.hivemind.util.ContextResource.
> >>>component:      $Border_1@1a4181c[Home/$Border]
> >>>location:       context:/Home.html, line 1
> >>>1       <span jwcid="@Border">
> >>>2
> >>>3       <p>This is the Tapestry Workbench. It is a testing ground for Tapestry.
> >>>4       Each tab above links to a new page, or set of pages, that demonstrate
> >>>Tapestry components and
> >>>5       features.
> >>>6
> >>>
> >>>
> >>>java.lang.IllegalArgumentException
> >>>Could not find a strategy instance for class
> >>>org.apache.hivemind.util.ContextResource.
> >>>Stack Trace:
> >>>
> >>>    * org.apache.hivemind.lib.util.StrategyRegistryImpl.searchForAdaptor(StrategyRegistryImpl.java:176)
> >>>
> >>>    * org.apache.hivemind.lib.util.StrategyRegistryImpl.getStrategy(StrategyRegistryImpl.java:74)
> >>>
> >>>    * $AssetFactory_103fdb976e7._getStrategy($AssetFactory_103fdb976e7.java)
> >>>
> >>>    * $AssetFactory_103fdb976e7.createAsset($AssetFactory_103fdb976e7.java)
> >>>    * $AssetFactory_103fdb975f0.createAsset($AssetFactory_103fdb975f0.java)
> >>>    * $AssetFactory_103fdb975ef.createAsset($AssetFactory_103fdb975ef.java)
> >>>    * org.apache.tapestry.asset.AssetSourceImpl.findAsset(AssetSourceImpl.java:65)
> >>>
> >>>    * $AssetSource_103fdb9768c.findAsset($AssetSource_103fdb9768c.java)
> >>>    * $AssetSource_103fdb9768b.findAsset($AssetSource_103fdb9768b.java)
> >>>    * org.apache.tapestry.pageload.PageLoader.convertAsset(PageLoader.java:644)
> >>>
> >>>    * org.apache.tapestry.pageload.PageLoader.addAssets(PageLoader.java:628)
> >>>
> >>>    * org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:396)
> >>>
> >>>    * org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.java:456)
> >>>
> >>>    * $IPageLoader_103fdb9767f.createImplicitComponent($IPageLoader_103fdb9767f.java)
> >>>
> >>>    * $IPageLoader_103fdb97680.createImplicitComponent($IPageLoader_103fdb97680.java)
> >>>
> >>>
> >>>What is a strategy instance, and why can't one be found for ContextResource?
> >>>
> >>>Richard
> >>>
> >>>
> >>
> >>
> >>--
> >>Howard M. Lewis Ship
> >>Independent J2EE / Open-Source Java Consultant
> >>Creator, Jakarta Tapestry
> >>Creator, Jakarta HiveMind
> >>
> >>Professional Tapestry training, mentoring, support
> >>and project work.  http://howardlewisship.com
> >>
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: Workbench: java.lang.IllegalArgumentException,Could not find a strategy instance for class org.apache.hivemind.util.ContextResource.

Posted by Richard Lewis-Shell <rl...@mac.com>.
Wonderful!  It wasn't clear to me from the commit messages what the fix 
was - can you elaborate?

Howard Lewis Ship wrote:
> This has been fixed in CVS HEAD, by-the-way.
> 
> On 5/21/05, Howard Lewis Ship <hl...@gmail.com> wrote:
> 
>>It's a strategy for mapping a particular implementation of Resource to
>>an AssetFactory that can provide a matching IAsset, from which a URL
>>can be created.  I'll look into it.
>>
>>On 5/21/05, Richard Lewis-Shell <rl...@mac.com> wrote:
>>
>>>I'm getting another error from the workbench.  This time it's:
>>>
>>>Unable to instantiate component Home/$Border: Could not find a strategy
>>>instance for class org.apache.hivemind.util.ContextResource.
>>>component:      $Border_1@1a4181c[Home/$Border]
>>>location:       context:/Home.html, line 1
>>>1       <span jwcid="@Border">
>>>2
>>>3       <p>This is the Tapestry Workbench. It is a testing ground for Tapestry.
>>>4       Each tab above links to a new page, or set of pages, that demonstrate
>>>Tapestry components and
>>>5       features.
>>>6
>>>
>>>
>>>java.lang.IllegalArgumentException
>>>Could not find a strategy instance for class
>>>org.apache.hivemind.util.ContextResource.
>>>Stack Trace:
>>>
>>>    * org.apache.hivemind.lib.util.StrategyRegistryImpl.searchForAdaptor(StrategyRegistryImpl.java:176)
>>>
>>>    * org.apache.hivemind.lib.util.StrategyRegistryImpl.getStrategy(StrategyRegistryImpl.java:74)
>>>
>>>    * $AssetFactory_103fdb976e7._getStrategy($AssetFactory_103fdb976e7.java)
>>>
>>>    * $AssetFactory_103fdb976e7.createAsset($AssetFactory_103fdb976e7.java)
>>>    * $AssetFactory_103fdb975f0.createAsset($AssetFactory_103fdb975f0.java)
>>>    * $AssetFactory_103fdb975ef.createAsset($AssetFactory_103fdb975ef.java)
>>>    * org.apache.tapestry.asset.AssetSourceImpl.findAsset(AssetSourceImpl.java:65)
>>>
>>>    * $AssetSource_103fdb9768c.findAsset($AssetSource_103fdb9768c.java)
>>>    * $AssetSource_103fdb9768b.findAsset($AssetSource_103fdb9768b.java)
>>>    * org.apache.tapestry.pageload.PageLoader.convertAsset(PageLoader.java:644)
>>>
>>>    * org.apache.tapestry.pageload.PageLoader.addAssets(PageLoader.java:628)
>>>
>>>    * org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:396)
>>>
>>>    * org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.java:456)
>>>
>>>    * $IPageLoader_103fdb9767f.createImplicitComponent($IPageLoader_103fdb9767f.java)
>>>
>>>    * $IPageLoader_103fdb97680.createImplicitComponent($IPageLoader_103fdb97680.java)
>>>
>>>
>>>What is a strategy instance, and why can't one be found for ContextResource?
>>>
>>>Richard
>>>
>>>
>>
>>
>>--
>>Howard M. Lewis Ship
>>Independent J2EE / Open-Source Java Consultant
>>Creator, Jakarta Tapestry
>>Creator, Jakarta HiveMind
>>
>>Professional Tapestry training, mentoring, support
>>and project work.  http://howardlewisship.com
>>
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org