I'm actually the only one working with this code...regardless, thanks
for your help and I'm glad I was able to get past it! Please let me
know if I can do any future beta testing for you to reciprocate.

On Jan 26, 9:49 am, Krzysztof Koźmic (2) <[email protected]> wrote:
> Other than the check that throws the exception (rightfully so) that
> was added, no other changes were made for this release in this part of
> the codebase.
>
> My guess is that recently someone from your team made a change either
> to inheritance structure or to the registration in the .config file
> and just just didn't use that type, hence it wasn't noticed until you
> upgraded to the new version of Windsor which caught the issue.
>
> cheers,
> Krzysztof
>
> On 26 Sty, 15:08, Mark Richman <[email protected]> wrote:
>
> > That is definitely the problem. I added the generic interface to the
> > class declaration (even though it is redundant and compiles without
> > it). I no longer get the error when using the web.config <component>
> > definition:
>
> > public class WebAdminEntityPickerEntityUrlsProvider<T>
> >     : WebAdminEntityUrlsProvider<T>
> >       , IWebAdminEntityPickerEntityUrlsProvider,
> > IWebAdminEntityPickerEntityUrlsProvider<T>
> >     where T : class, IEntity
> > {...}
>
> > I guess now my question is why did this ever work with the older
> > version of Castle? Was there less strict generic type checking in the
> > old version which allowed this to work?
>
> > On Jan 26, 9:03 am, Krzysztof Ko 1/4 mic (2) <[email protected]> wrote:
>
> > > Mark,
>
> > > the code you provided here, resolves non-generic version. In xml you
> > > register generic version of the interface.
> > > The class does not implement generic version of the interface, but it
> > > does implement non-generic version.
>
> > > Krzysztof
>
> > > On 26 Sty, 14:54, Mark Richman <[email protected]> wrote:
>
> > > > It actually resolves the instance just fine. I can even step into the
> > > > implementation class' source code while debugging. I have a helper
> > > > class called "GenericTypeResolver" which I use to resolve component
> > > > instances from the container. I call the helper on this component as
> > > > follows:
>
> > > > var urlsProvider = IocHelpers
> > > >         .GenericTypeResolver
> > > >         .ResolveInstance<IWebAdminEntityPickerEntityUrlsProvider>(
> > > >         typeof (IWebAdminEntityPickerEntityUrlsProvider<>),
> > > >         IocHelpers.GetTypeByAlias(firstAliasToUse)
> > > >         );
>
> > > > This code always works, regardless of which Castle version I use. I
> > > > have dozens of components registered, and this
> > > > IWebAdminEntityPickerEntityUrlsProvider is the only one that seems to
> > > > be "broken" across Castle versions. I will post the source to my
> > > > helper class as well.
>
> > > > Thanks,
> > > > Mark
>
> > > > On Jan 26, 8:33 am, Krzysztof Ko 1/4 mic (2) <[email protected]> 
> > > > wrote:
>
> > > > > Mark,
>
> > > > > That's what I did. You did succeed at registering the component,
> > > > > because AddComponentLifeStyle does not check if you pass valid types.
> > > > > However if you tried to resolve the component you would get an
> > > > > exception then.
>
> > > > > Krzysztof
>
> > > > > On 26 Sty, 14:23, Mark Richman <[email protected]> wrote:
>
> > > > > > Try commenting out the <component> line in web.config, and uncomment
> > > > > > the line in Global.asax. You'll see it works fine using it that way.
> > > > > > So, what's wrong with my syntax in the web.config? This worked 
> > > > > > until I
> > > > > > upgraded Castle.
>
> > > > > > On Jan 26, 8:19 am, Krzysztof Ko 1/4 mic (2) <[email protected]> 
> > > > > > wrote:
>
> > > > > > > Mark,
>
> > > > > > > Windsor is fine.
> > > > > > > Your class does not implement that interface.
>
> > > > > > > Krzysztof
>
> > > > > > > On 26 Sty, 13:48, Mark Richman <[email protected]> wrote:
>
> > > > > > > > I uploaded a test website that demonstrates the issue. Please 
> > > > > > > > seehttp://groups.google.com/group/castle-project-users/web/WindsorTest.zip
>
> > > > > > > > Thank you!
>
> > > > > > > > On Jan 26, 8:08 am, Krzysztof Ko 1/4 mic 
> > > > > > > > <[email protected]>
> > > > > > > > wrote:
>
> > > > > > > > > were you able to create a reproduction you could post here?
>
> > > > > > > > > Krzysztof
>
> > > > > > > > > On 2010-01-26 02:18, Mark Richman wrote:
>
> > > > > > > > > > Oddly, this imperative version works perfectly:
>
> > > > > > > > > > container.AddComponentLifeStyle("entityurlsprovider.picker",
> > > > > > > > > >                                      typeof
> > > > > > > > > > (IWebAdminEntityPickerEntityUrlsProvider<>),
> > > > > > > > > >                                      typeof
> > > > > > > > > > (WebAdminEntityPickerEntityUrlsProvider<>),
> > > > > > > > > >                                      
> > > > > > > > > > LifestyleType.Transient);
>
> > > > > > > > > > the declarative version still fails though...syntax error?
>
> > > > > > > > > > <component id="entityurlsprovider.picker"
>
> > > > > > > > > > service="KGroup.KMS.Administration.IWebAdminEntityPickerEntityUrlsProvider`1,
> > > > > > > > > > KGroup.KMS.Core"
>
> > > > > > > > > > type="KGroup.KMS.Administration.Common.WebAdminEntityPickerEntityUrlsProvider`1,
> > > > > > > > > > KGroup.KMS.Core"
> > > > > > > > > >                   lifestyle="transient"/>
>
> > > > > > > > > > Thanks,
> > > > > > > > > > Mark
>
> > > > > > > > > > On Jan 25, 5:24 pm, Krzysztof Ko 1/4 
> > > > > > > > > > mic<[email protected]>
> > > > > > > > > > wrote:
>
> > > > > > > > > >> By reproduction I mean a minimalistic solution that 
> > > > > > > > > >> exhibits the issue.
> > > > > > > > > >> I just tried to re-create your scenario and I hate to tell 
> > > > > > > > > >> you that it
> > > > > > > > > >> works on my machine.
>
> > > > > > > > > >> The fact that the exception message says
>
> > > > > > > > > >> Type ''
>
> > > > > > > > > >> is misleading.
> > > > > > > > > >> It means you used open generic type. If the type was 
> > > > > > > > > >> indeed not being
> > > > > > > > > >> found, an other exception would be thrown.
> > > > > > > > > >> Try to isolate the issue and post the solution here.
> > > > > > > > > >> At this point I can't really think of anything that could 
> > > > > > > > > >> cause this issue.
>
> > > > > > > > > >> Krzysztof
>
> > > > > > > > > >> On 2010-01-25 23:20, Mark Richman wrote:
>
> > > > > > > > > >>> What do you mean by reproduction? There is nothing I'm 
> > > > > > > > > >>> doing
> > > > > > > > > >>> explicitly in my code to try loading the class other than 
> > > > > > > > > >>> new
> > > > > > > > > >>> WindsorContainer(new XmlInterpreter()). From there, the 
> > > > > > > > > >>> Windsor code
> > > > > > > > > >>> takes over and eventually throws an exception. Seems to 
> > > > > > > > > >>> me like the
> > > > > > > > > >>> method for parsing the web.config<component>    element 
> > > > > > > > > >>> may have
> > > > > > > > > >>> changed, causing an empty string to be passed as the 
> > > > > > > > > >>> 'type' argument
> > > > > > > > > >>> to
> > > > > > > > > >>> Castle.Windsor.Installer.DefaultComponentInstaller.AssertImplementsService
> > > > > > > > > >>> (id,service,type). Like I mentioned, I have made zero 
> > > > > > > > > >>> changes to my
> > > > > > > > > >>> code, other than replacing the Castle*.dll files.
>
> > > > > > > > > >>> On Jan 25, 5:00 pm, Krzysztof Ko 1/4 
> > > > > > > > > >>> mic<[email protected]>
> > > > > > > > > >>> wrote:
>
> > > > > > > > > >>>> Stack trace is not really helpful here.
> > > > > > > > > >>>> Can you create a reproduction and post it?
> > > > > > > > > >>>> This does not really seem to make much sense to me
>
> > > > > > > > > >>>> Krzysztof
>
> > > > > > > > > >>>> On 2010-01-25 22:42, Mark Richman wrote:
>
> > > > > > > > > >>>>> Maybe this stack trace will help:
>
> > > > > > > > > >>>>> [Exception: Could not set up component 
> > > > > > > > > >>>>> 'entityurlsprovider.picker'.
> > > > > > > > > >>>>> Type '' does not implement service
> > > > > > > > > >>>>> 'KGroup.KMS.Administration.IWebAdminEntityPickerEntityUrlsProvider`1,
> > > > > > > > > >>>>> KGroup.KMS.Core, Version=1.0.0.0, Culture=neutral,
> > > > > > > > > >>>>> PublicKeyToken=null']
>
> > > > > > > > > >>>>> Castle.Windsor.Installer.DefaultComponentInstaller.AssertImplementsService
> > > > > > > > > >>>>> (String id, Type service, Type type) +255
> > > > > > > > > >>>>>       
> > > > > > > > > >>>>> Castle.Windsor.Installer.DefaultComponentInstaller.SetUpComponents
> > > > > > > > > >>>>> (IConfiguration[] configurations, IWindsorContainer 
> > > > > > > > > >>>>> container) +348
> > > > > > > > > >>>>>       
> > > > > > > > > >>>>> Castle.Windsor.Installer.DefaultComponentInstaller.SetUp
> > > > > > > > > >>>>> (IWindsorContainer container, IConfigurationStore 
> > > > > > > > > >>>>> store) +124
> > > > > > > > > >>>>>       Castle.Windsor.WindsorContainer.RunInstaller() +98
> > > > > > > > > >>>>>       
> > > > > > > > > >>>>> Castle.Windsor.WindsorContainer..ctor(IConfigurationInterpreter
> > > > > > > > > >>>>> interpreter) +167
> > > > > > > > > >>>>>       Global.Application_Start(Object sender, EventArgs 
> > > > > > > > > >>>>> e)
>
> > > > > > > > > >>>>> On Jan 25, 4:33 pm, Mark 
> > > > > > > > > >>>>> Richman<[email protected]>     wrote:
>
> > > > > > > > > >>>>>> I did a Clean Solution, Rebuild Solution. I even 
> > > > > > > > > >>>>>> deleted the contents
> > > > > > > > > >>>>>> of /bin and rebuilt. I get the same error.
>
> > > > > > > > > >>>>>> On Jan 25, 4:25 pm, Krzysztof Ko 1/4 
> > > > > > > > > >>>>>> mic<[email protected]>
> > > > > > > > > >>>>>> wrote:
>
> > > > > > > > > >>>>>>> Looks like it somehow does not pick your 
> > > > > > > > > >>>>>>> implementation type. Do Clean
> > > > > > > > > >>>>>>> in Visual Studio, and then Build all projects
>
> > > > > > > > > >>>>>>> On 2010-01-25 22:16, Mark Richman wrote:
>
> > > > > > > > > >>>>>>>> I am trying to upgrade from these versions:
>
> > > > > > > > > >>>>>>>> Castle.Core 1.1.0.542
> > > > > > > > > >>>>>>>> Castle.DynamicProxy2 2.1.0.5642
> > > > > > > > > >>>>>>>> Castle.MicroKernel 2.0.0.5642
> > > > > > > > > >>>>>>>> Castle.Windsor 2.0.0.5642
>
> > > > > > > > > >>>>>>>> to the current versions:
>
> > > > > > > > > >>>>>>>> Castle.Core 1.2.0.6623
> > > > > > > > > >>>>>>>> Castle.DynamicProxy2 2.2.0.6628
> > > > > > > > > >>>>>>>> Castle.MicroKernel 2.1.0.6655
> > > > > > > > > >>>>>>>> Castle.Windsor 2.1.0.6655
>
> > > > > > > > > >>>>>>>> I get the following exception at startup:
>
> > > > > > > > > >>>>>>>> Could not set up component 
> > > > > > > > > >>>>>>>> 'entityurlsprovider.picker'. Type '' does
> > > > > > > > > >>>>>>>> not implement service
> > > > > > > > > >>>>>>>> 'KGroup.KMS.Administration.IWebAdminEntityPickerEntityUrlsProvider`1,
> > > > > > > > > >>>>>>>> KGroup.KMS.Core, Version=1.0.0.0, Culture=neutral,
> > > > > > > > > >>>>>>>> PublicKeyToken=null'
>
> > > > > > > > > >>>>>>>> in this line of code in
>
> ...
>
> read more >>

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to