Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion ComponentNotFoundException when using TypedFactoryFacility

Received: by 10.52.21.103 with SMTP id u7mr7305588vde.12.1317362021676;
        Thu, 29 Sep 2011 22:53:41 -0700 (PDT)
X-BeenThere: castle-project-users@googlegroups.com
Received: by 10.52.24.163 with SMTP id v3ls3779963vdf.3.gmail; Thu, 29 Sep
 2011 22:53:39 -0700 (PDT)
Received: by 10.52.68.4 with SMTP id r4mr8216250vdt.31.1317362019569;
        Thu, 29 Sep 2011 22:53:39 -0700 (PDT)
Received: by 10.52.68.4 with SMTP id r4mr8216249vdt.31.1317362019552;
        Thu, 29 Sep 2011 22:53:39 -0700 (PDT)
Return-Path: <lord.in...@gmail.com>
Received: from mail-qy0-f178.google.com (mail-qy0-f178.google.com [209.85.216.178])
        by gmr-mx.google.com with ESMTPS id i18si1868672vde.1.2011.09.29.22.53.39
        (version=TLSv1/SSLv3 cipher=OTHER);
        Thu, 29 Sep 2011 22:53:39 -0700 (PDT)
Received-SPF: pass (google.com: domain of lord.in...@gmail.com designates 209.85.216.178 as permitted sender) client-ip=209.85.216.178;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of lord.in...@gmail.com designates 209.85.216.178 as permitted sender) smtp.mail=lord.in...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by mail-qy0-f178.google.com with SMTP id 14so1819923qyg.16
        for <castle-project-users@googlegroups.com>; Thu, 29 Sep 2011 22:53:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=mime-version:sender:in-reply-to:references:date
         :x-google-sender-auth:message-id:subject:from:to:content-type;
        bh=kPCxuSvY4xfJwMsB1cdWfFpik0zrY01tQ80jjaueuwY=;
        b=iAlL/WjWoUKznvXbw1kd6R23LcJmDMhgWni9o1SAnUsShjK9val9CWEP3hz77HOk+Q
         kUpOhW0Rt0aaViuuOJ0m6VcDkPFQ+sdJ0YTSV2tYi8wj0zsLOCPyYjaB4ASp4IR8dEE4
         Tk1sMJXS+wjRF023Rw0N3cDew8Gle/N3iH9SI=
MIME-Version: 1.0
Received: by 10.229.221.197 with SMTP id id5mr8832794qcb.108.1317362019285;
 Thu, 29 Sep 2011 22:53:39 -0700 (PDT)
Sender: lord.in...@gmail.com
Received: by 10.229.96.83 with HTTP; Thu, 29 Sep 2011 22:53:39 -0700 (PDT)
In-Reply-To: <4E85565A.9030...@gmail.com>
References: <0b54a41b-19b5-4379-9dbe-76d3c74c8...@z20g2000vbl.googlegroups.com>
	<4E84FA76.3070...@gmail.com>
	<CAEVvkPA18657L7aW-NB-zz2npJUN9g6xDwPLe+j+6c8W=Kq...@mail.gmail.com>
	<4E851105.4080...@gmail.com>
	<CAEVvkPDzbbWx=_ReFghXHEL8vS32pFx+aK+9gunQGNmSq=d...@mail.gmail.com>
	<4E852D4C.5080...@gmail.com>
	<CAEVvkPDZBsnG8T4mPA1rtBK-pS4o8owP0E+AfxFYSEkCR_2...@mail.gmail.com>
	<4E85312E.1000...@gmail.com>
	<CAEVvkPASnf2F5HY0NgEGcKjwkNnNywLmrb+NF8igXi3SO_7...@mail.gmail.com>
	<4E85565A.9030...@gmail.com>
Date: Fri, 30 Sep 2011 00:53:39 -0500
Message-ID: <CAEVvkPCGdtb6pj09=GVM4VCb7oK1Z=9jgRknYA99VtsO0dx...@mail.gmail.com>
Subject: Re: ComponentNotFoundException when using TypedFactoryFacility
From: Matthew Brubaker <matthewsbruba...@gmail.com>
To: castle-project-users@googlegroups.com
Content-Type: multipart/alternative; boundary=0016363b7ff2333c6004ae223faa

--0016363b7ff2333c6004ae223faa
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Do you have any idea when the release for 3.0 will be? i'm currently in the
process of integrating it into several of our projects at work and was
hoping the nuget package would have the release soon.

Matthew Brubaker
MatthewSBruba...@gmail.com
(785) 215-7061


2011/9/30 Krzysztof Ko=C5=BAmic <krzysztof.koz...@gmail.com>

>  Hi Matthew,
>
> you're right, it's not in breakingchanges.txt.
>
> I'll add that for beta 2... it must have slipped through the cracks. Than=
ks
> for pointing that out.
>
> cheers,
> Krzysztof
>
>
> On 30/09/2011 1:14 PM, Matthew Brubaker wrote:
>
> Thanks, I set FallbackToResolveByTypeIfNameNotFound to true and that fixe=
d
> the problem. I thought I had searched through all of the breaking changes
> that were included in the nuget package for Castle.Windsor.3.0.0.2001and
> couldn't find anything relating to that property.
>
>
>
> Matthew Brubaker
> MatthewSBruba...@gmail.com
> (785) 215-7061
>
>
> 2011/9/29 Krzysztof Ko=C5=BAmic <krzysztof.koz...@gmail.com>
>
>> Ok, that's fine.
>>
>> There are two parts to it. First of all the exception message you're
>> getting is misleading. In beta 2 and further on its actually:
>>
>> Castle.MicroKernel.ComponentNotFoundException : Requested component name=
d
>> 'watching.._bob.txt' was not found in the container. Did you forget to
>> register it?
>> There is one other component supporting requested service
>> 'Foo.Bar.IFileWatcher'. Is it what you were looking for?
>>
>> Second part of the issue is, as mentioned in the exception message, you'=
re
>> trying to resolve the component by name, and there's no component for th=
at
>> name.
>>
>> This is a breaking change from v2.5.3 and as described in
>> breakingchanges.txt, if you want to fallback to resolving by type when y=
ou
>> can't resolve by name set
>>                FallbackToResolveByTypeIfNameNotFound =3D true;
>> in your selector.
>>
>> HTH,
>> cheers,
>>  Krzysztof
>>
>>
>>
>> On 30/09/2011 12:50 PM, Matthew Brubaker wrote:
>>
>>>
>>>
>>>    public class FileWatcherSelector :
>>> DefaultTypedFactoryComponentSelector
>>>    {
>>>
>>>        protected override string GetComponentName(MethodInfo method,
>>> object[] arguments)
>>>        {
>>>            if (method.Name =3D=3D "GetFileWatcher" && arguments.Length =
=3D=3D 2)
>>>            {
>>>                var fileName =3D Convert.ToString(arguments[0]);
>>>                var scrubbedName =3D fileName.Replace('\\',
>>> '_').Replace(':', '_').Replace(' ', '_');
>>>
>>>                return "watching.{0}".FormatWith(scrubbedName);
>>>            }
>>>
>>>            return base.GetComponentName(method, arguments);
>>>        }
>>>    }
>>>
>>
>>   --
>> You received this message because you are subscribed to the Google Group=
s
>> "Castle Project Users" group.
>> To post to this group, send email to
>> castle-project-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> castle-project-users+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/castle-project-users?hl=3Den.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To post to this group, send email to castle-project-us...@googlegroups.co=
m
> .
> To unsubscribe from this group, send email to
> castle-project-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=3Den.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To post to this group, send email to castle-project-us...@googlegroups.co=
m
> .
> To unsubscribe from this group, send email to
> castle-project-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=3Den.
>

--0016363b7ff2333c6004ae223faa
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Do you have any idea when the release for 3.0 will be? i&#39;m currently in=
 the process of integrating it into several of our projects at work and was=
 hoping the nuget package would have the release soon.<div><br clear=3D"all=
">
Matthew Brubaker<br><a href=3D"mailto:MatthewSBruba...@gmail.com">MatthewSB=
ruba...@gmail.com</a><br>(785) 215-7061<br>
<br><br><div class=3D"gmail_quote">2011/9/30 Krzysztof Ko=C5=BAmic <span di=
r=3D"ltr">&lt;<a href=3D"mailto:krzysztof.koz...@gmail.com">krzysztof.kozmi=
c...@gmail.com</a>&gt;</span><br><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

 =20
   =20
 =20
  <div bgcolor=3D"#FFFFFF" text=3D"#000000">
    Hi Matthew,<br>
    <br>
    you&#39;re right, it&#39;s not in breakingchanges.txt.<br>
    <br>
    I&#39;ll add that for beta 2... it must have slipped through the cracks=
.
    Thanks for pointing that out.<br>
    <br>
    cheers,<br><font color=3D"#888888">
    Krzysztof</font><div><div></div><div class=3D"h5"><br>
    <br>
    On 30/09/2011 1:14 PM, Matthew Brubaker wrote:
    <blockquote type=3D"cite">Thanks, I set=C2=A0FallbackToResolveByTypeIfN=
ameNotFound=C2=A0to
      true and that fixed the problem. I thought I had searched through
      all of the breaking changes that were included in the nuget
      package for=C2=A0Castle.Windsor.3.0.0.2001and couldn&#39;t find anyth=
ing
      relating to that property.
      <div>
        <br>
      </div>
      <div><br>
      </div>
      <div><br clear=3D"all">
        Matthew Brubaker<br>
        <a href=3D"mailto:MatthewSBruba...@gmail.com" target=3D"_blank">Mat=
thewSBruba...@gmail.com</a><br>
        <a href=3D"tel:%28785%29%20215-7061" value=3D"+17852157061" target=
=3D"_blank">(785) 215-7061</a><br>
        <br>
        <br>
        <div class=3D"gmail_quote">2011/9/29 Krzysztof Ko=C5=BAmic <span di=
r=3D"ltr">&lt;<a href=3D"mailto:krzysztof.koz...@gmail.com" target=3D"_blan=
k">krzysztof.koz...@gmail.com</a>&gt;</span><br>
          <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bord=
er-left:1px #ccc solid;padding-left:1ex">
            Ok, that&#39;s fine.<br>
            <br>
            There are two parts to it. First of all the exception
            message you&#39;re getting is misleading. In beta 2 and further
            on its actually:<br>
            <br>
            Castle.MicroKernel.ComponentNotFoundException : Requested
            component named &#39;watching.._bob.txt&#39; was not found in t=
he
            container. Did you forget to register it?<br>
            There is one other component supporting requested service
            &#39;Foo.Bar.IFileWatcher&#39;. Is it what you were looking for=
?<br>
            <br>
            Second part of the issue is, as mentioned in the exception
            message, you&#39;re trying to resolve the component by name, an=
d
            there&#39;s no component for that name.<br>
            <br>
            This is a breaking change from v2.5.3 and as described in
            breakingchanges.txt, if you want to fallback to resolving by
            type when you can&#39;t resolve by name set<br>
            =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Fallback=
ToResolveByTypeIfNameNotFound =3D true;<br>
            in your selector.<br>
            <br>
            HTH,<br>
            cheers,<br>
            <font color=3D"#888888">
              Krzysztof</font>
            <div><br>
              <br>
              <br>
              On 30/09/2011 12:50 PM, Matthew Brubaker wrote:<br>
              <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex">
                <br>
                <br>
                =C2=A0 =C2=A0public class FileWatcherSelector :
                DefaultTypedFactoryComponentSelector<br>
                =C2=A0 =C2=A0{<br>
                <br>
                =C2=A0 =C2=A0 =C2=A0 =C2=A0protected override string
                GetComponentName(MethodInfo method, object[] arguments)<br>
                =C2=A0 =C2=A0 =C2=A0 =C2=A0{<br>
                =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (method.Name =
=3D=3D &quot;GetFileWatcher&quot;
                &amp;&amp; arguments.Length =3D=3D 2)<br>
                =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{<br>
                =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0var =
fileName =3D
                Convert.ToString(arguments[0]);<br>
                =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0var =
scrubbedName =3D fileName.Replace(&#39;\\&#39;,
                &#39;_&#39;).Replace(&#39;:&#39;, &#39;_&#39;).Replace(&#39=
; &#39;, &#39;_&#39;);<br>
                <br>
                =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0retu=
rn &quot;watching.{0}&quot;.FormatWith(scrubbedName);<br>
                =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}<br>
                <br>
                =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return base.GetCom=
ponentName(method,
                arguments);<br>
                =C2=A0 =C2=A0 =C2=A0 =C2=A0}<br>
                =C2=A0 =C2=A0}<br>
              </blockquote>
              <br>
            </div>
            <div>
              <div>
                -- <br>
                You received this message because you are subscribed to
                the Google Groups &quot;Castle Project Users&quot; group.<b=
r>
                To post to this group, send email to <a href=3D"mailto:cast=
le-project-users@googlegroups.com" target=3D"_blank">castle-project-users@g=
ooglegroups.com</a>.<br>
                To unsubscribe from this group, send email to <a href=3D"ma=
ilto:castle-project-users%2Bunsubscribe@googlegroups.com" target=3D"_blank"=
>castle-project-users+unsubscribe@googlegroups.com</a>.<br>
                For more options, visit this group at <a href=3D"http://gro=
ups.google.com/group/castle-project-users?hl=3Den" target=3D"_blank">http:/=
/groups.google.com/group/castle-project-users?hl=3Den</a>.<br>
                <br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      -- <br>
      You received this message because you are subscribed to the Google
      Groups &quot;Castle Project Users&quot; group.<br>
      To post to this group, send email to
      <a href=3D"mailto:castle-project-users@googlegroups.com" target=3D"_b=
lank">castle-project-users@googlegroups.com</a>.<br>
      To unsubscribe from this group, send email to
      <a href=3D"mailto:castle-project-users+unsubscribe@googlegroups.com" =
target=3D"_blank">castle-project-users+unsubscribe@googlegroups.com</a>.<br=
>
      For more options, visit this group at
      <a href=3D"http://groups.google.com/group/castle-project-users?hl=3De=
n" target=3D"_blank">http://groups.google.com/group/castle-project-users?hl=
=3Den</a>.<br>
    </blockquote>
    <br>
  </div></div></div><div><div></div><div class=3D"h5">


<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;Castle Project Users&quot; group.<br>
To post to this group, send email to <a href=3D"mailto:castle-project-users=
@googlegroups.com" target=3D"_blank">castle-project-users@googlegroups.com<=
/a>.<br>
To unsubscribe from this group, send email to <a href=3D"mailto:castle-proj=
ect-users%2Bunsubscribe@googlegroups.com" target=3D"_blank">castle-project-=
users+unsubscribe@googlegroups.com</a>.<br>

For more options, visit this group at <a href=3D"http://groups.google.com/g=
roup/castle-project-users?hl=3Den" target=3D"_blank">http://groups.google.c=
om/group/castle-project-users?hl=3Den</a>.<br>


</div></div></blockquote></div><br></div>

--0016363b7ff2333c6004ae223faa--