I don't know if this is a bug in the RC3 activator but here's a sample
custom component activator and how to use it:
http://wcpierce.spaces.live.com/blog/cns!676A55AA5C4FB1BE!247.entry

By "ilmerging" I meant using ILMerge, a utility for merging multiple .NET
assemblies into a single .NET assembly.

--
Mauricio

2010/6/17 omer katz <[email protected]>

>
> I assumed it's Windsor because you told me and because nothing seems out of
> order in my classes.
> The line that throws is:
>
> controller = windsorContainer.Resolve<
> ApplicationController>();
> Each class has a constructor with this signuture:
>
> public
> FooDataService(IRepository<AccountGetServiceAbsence> repository)
>
> :
> base(repository)
>
> {
>
> }
> And the abstract base class holds the repository. Moving it to the
> concreate class doesn't help. Removing the base class doesn't help.
> It throws no matter what I do.
> 2010/6/17 Krzysztof Koźmic <[email protected]>
>
>> Ok, but this is your code.
>> Why do you assume that the issue lies in Windsor?
>>
>> Have you tried debugging it? Which line throws the exception?
>>
>>
>>
>> On 17/06/2010 10:24 PM, omer katz wrote:
>>
>>   I know only that for every class in my DataServices it cannot
>> initialize himself.
>> I have an example on the stackoverflow question.
>>
>> 2010/6/17 Krzysztof Koźmic <[email protected]>
>>
>>> Well perhaps it would be good if you could narrow down the scope of the
>>> search to for example place where the exception is thrown or something.
>>> At this point I can't really help you when you don't have the clue of
>>> where the problem lies.
>>>
>>> K
>>>
>>>
>>> On 17/06/2010 10:05 PM, omer katz wrote:
>>>
>>>
>>> I actually have *NO CLUE*.
>>> From the top.
>>> What's wrong? What do I need to do and how?
>>> Do you have any example?
>>> 2010/6/17 Krzysztof Koźmic <[email protected]>
>>>
>>>> In your comment on SO you pointed to the code in
>>>> DefaultComponentActivator where it throws because some type argument was
>>>> null, is that correct?
>>>>
>>>>
>>>> On 17/06/2010 9:46 PM, omer katz wrote:
>>>>
>>>>   I actually have no idea what throws.
>>>> It just says that it cannot initialize any of my interfaces.
>>>>
>>>> 2010/6/17 Krzysztof Koźmic <[email protected]>
>>>>
>>>>> Grab DefaultComponentActivator and override the method that throws the
>>>>> exception. Is as simple as that. You have the code already.
>>>>>
>>>>>
>>>>> On 17/06/2010 9:34 PM, omer katz wrote:
>>>>>
>>>>>   And how exactly do I do that?
>>>>> Got any examples?
>>>>>
>>>>> 2010/6/17 Krzysztof Koźmic <[email protected]>
>>>>>
>>>>>> Than if you're trapped with the old version and there's a bug in the
>>>>>> DefaultComponentActivator that prevents you from successfully running 
>>>>>> your
>>>>>> app, perhaps simply replacing the activator with your own implementation
>>>>>> that does not have the bug would be the solution worth pursuing?
>>>>>> K
>>>>>>
>>>>>>
>>>>>> On 17/06/2010 7:21 PM, omer katz wrote:
>>>>>>
>>>>>>   Turns out I am using Rhino.Commons.ActiveRecord which uses the old
>>>>>> version of the Castle components.
>>>>>> I can't upgrade...
>>>>>>
>>>>>> 2010/6/17 omer katz <[email protected]>
>>>>>>
>>>>>>> Ohhh my boss won't be happy, dammit.
>>>>>>> What do you mean by 'ilmerging'? Can't find it in the dictionary. You
>>>>>>> mean removing them?
>>>>>>> The problem started with some types not registering correctly.
>>>>>>> I have consulted with Krzysztof Koźmic about this issue and he said I
>>>>>>> have probably discovered some bug.
>>>>>>> Therefor I need to upgrade to the latest version.
>>>>>>> See this 
>>>>>>> question<http://stackoverflow.com/questions/3044805/problem-with-initializing-a-type-with-winsdorcontainer/3045400>for
>>>>>>>  more info. If you have a better idea please let me know.
>>>>>>> The problem is the domino effect. Upgrading ActiveRecord involves
>>>>>>> upgrading NHibernate which has breaking changes (I wish this would have 
>>>>>>> been
>>>>>>> handled when the new version came to life but it wasn't :( )
>>>>>>>
>>>>>>> Thank you,
>>>>>>> Omer
>>>>>>> 2010/6/17 Mauricio Scheffer <[email protected]>
>>>>>>>
>>>>>>> ActiveRecord 1.0.3.0 depends on Core 1.0.3.0, while Windsor 2.1.1
>>>>>>>> depends on Core 1.2.0.0
>>>>>>>> You could try assembly 
>>>>>>>> redirection<http://msdn.microsoft.com/en-us/library/7wd6ex19.aspx>but 
>>>>>>>> it probably won't work due to changes from 1.0.3.0 to 1.2.0.0.
>>>>>>>> Another option would be ilmerging Windsor 2.1.1 with its Castle.Core
>>>>>>>> 1.2.0.0 and  possibly everything depending on Core 1.2.0.0, like
>>>>>>>> DynamicProxy, facilities, etc.
>>>>>>>>
>>>>>>>> --
>>>>>>>> Mauricio
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Jun 16, 2010 at 10:32 AM, the_drow <[email protected]>wrote:
>>>>>>>>
>>>>>>>>> Hello, I'm trying to upgrade to the latest version of Winsdor but I
>>>>>>>>> need to keep the old ActiveRecord version (1.0.3.0)  now.
>>>>>>>>> My exception is thrown here:
>>>>>>>>>        public ApplicationView(string[] args)
>>>>>>>>>        {
>>>>>>>>>            InitializeComponent();
>>>>>>>>>
>>>>>>>>>            string configFilePath =
>>>>>>>>> Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
>>>>>>>>> "log4net.config");
>>>>>>>>>            FileInfo configFileInfo = new FileInfo(configFilePath);
>>>>>>>>>            XmlConfigurator.ConfigureAndWatch(configFileInfo);
>>>>>>>>>
>>>>>>>>>            IConfigurationSource configSource =
>>>>>>>>> ConfigurationManager.GetSection("ActiveRecord") as
>>>>>>>>> IConfigurationSource; // Throws here
>>>>>>>>>            Assembly assembly =
>>>>>>>>> Assembly.Load("Danel.Nursing.Model");
>>>>>>>>>            ActiveRecordStarter.Initialize(assembly,
>>>>>>>>> configSource);
>>>>>>>>>
>>>>>>>>>            WindsorContainer windsorContainer =
>>>>>>>>> ApplicationUtils.GetWindsorContainer();
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> windsorContainer.Kernel.AddComponentInstance<ApplicationView>(this);
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> windsorContainer.Kernel.AddComponent(typeof(ApplicationController).Name,
>>>>>>>>> typeof(ApplicationController));
>>>>>>>>>
>>>>>>>>>            IDataServicesInitiator dsi = new
>>>>>>>>> DataServicesInitiator();
>>>>>>>>>            dsi.AddToIocContainer(ref windsorContainer);
>>>>>>>>>
>>>>>>>>>            controller =
>>>>>>>>> windsorContainer.Resolve<ApplicationController>();
>>>>>>>>>
>>>>>>>>>            OnApplicationLoad(args);
>>>>>>>>>        }
>>>>>>>>>
>>>>>>>>> {"An error occurred creating the configuration section handler for
>>>>>>>>> ActiveRecord: Exception has been thrown by the target of an
>>>>>>>>> invocation. (E:\\Agile\\Scheduling\\Danel.Nursing.Scheduling\\bin\
>>>>>>>>> \Debug\\Danel.Nursing.Scheduling.vshost.exe.Config line 4)"}
>>>>>>>>>
>>>>>>>>> {"Could not load file or assembly 'Castle.Core, Version=1.0.3.0,
>>>>>>>>> Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its
>>>>>>>>> dependencies. The located assembly's manifest definition does not
>>>>>>>>> match the assembly reference. (Exception from HRESULT:
>>>>>>>>> 0x80131040)":"Castle.Core, Version=1.0.3.0, Culture=neutral,
>>>>>>>>> PublicKeyToken=407dd0808d44fbdc"}
>>>>>>>>>
>>>>>>>>> For some reason it still tries to load the old core version.
>>>>>>>>> How do I make it fetch the new version?
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> 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]<castle-project-users%[email protected]>
>>>>>>>>> .
>>>>>>>>> For more options, visit this group at
>>>>>>>>> http://groups.google.com/group/castle-project-users?hl=en.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>  --
>>>>>>>> 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]<castle-project-users%[email protected]>
>>>>>>>> .
>>>>>>>> For more options, visit this group at
>>>>>>>> http://groups.google.com/group/castle-project-users?hl=en.
>>>>>>>>
>>>>>>> --
>>>>>> 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.
>>>>>>
>>>>>>
>>>>>>  --
>>>>>> 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]<castle-project-users%[email protected]>
>>>>>> .
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/castle-project-users?hl=en.
>>>>>>
>>>>> --
>>>>> 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.
>>>>>
>>>>>
>>>>>  --
>>>>> 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]<castle-project-users%[email protected]>
>>>>> .
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/castle-project-users?hl=en.
>>>>>
>>>> --
>>>> 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.
>>>>
>>>>
>>>>  --
>>>> 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]<castle-project-users%[email protected]>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/castle-project-users?hl=en.
>>>>
>>> --
>>> 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.
>>>
>>>
>>>  --
>>> 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]<castle-project-users%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/castle-project-users?hl=en.
>>>
>> --
>> 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.
>>
>>
>>   --
>> 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]<castle-project-users%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/castle-project-users?hl=en.
>>
>  --
> 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]<castle-project-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
>

-- 
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