Can you try to give me a demo project and I'll try it to see if I get the
behaviour too. At minimum can you provide a stack trace with line numbers.

This may be caused by the change in r5097.

On Fri, Jul 24, 2009 at 4:24 AM, Cesar Sanz <[email protected]>wrote:

>  Hello,
>
> It doesn't happens in all machines..
>
> In my computer it works, in another computer it doesn't..
>
> I cannot warranty that if I provide a demo app it will fail. Don't know in
> which conditions if fails.
>
> I have debbugged a little and the error, as the stack trace points, occurs
> in
>
>  
> NVelocity.Runtime.Resource.Loader.AssemblyResourceLoader.Init(ExtendedProperties
> configuration)
>
> It is the method
>
>  public override 
> void<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Void>
> *Init<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://NVelocity:1.0.3.0:407dd0808d44fbdc/NVelocity.Runtime.Resource.Loader.AssemblyResourceLoader/Init%28Commons.Collections.ExtendedProperties%29>
> *(ExtendedProperties<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://NVelocity:1.0.3.0:407dd0808d44fbdc/Commons.Collections.ExtendedProperties>configuration)
>     {
>         
> object<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Object>
> *value* = configuration["assembly"];
>         if (value is 
> string<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.String>
> )
>         {
>             
> List<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Collections.Generic.List%3C%3E>
> <string<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.String>>
> *assemblies *= new 
> List<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Collections.Generic.List%3C%3E>
> <string<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.String>
> >();
>             
> assemblies.Add<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Collections.Generic.List%3C%3E/Add%28%3C%210%3E%29>
> ((string<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.String>)
> configuration["assembly"]);
>             ...
>         }
>         else
>         {
>             if (!(value is 
> List<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Collections.Generic.List%3C%3E>
> <string<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.String>
> >))
>             {
>                 throw new 
> VelocityException<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://NVelocity:1.0.3.0:407dd0808d44fbdc/NVelocity.Exception.VelocityException/.ctor%28String%29>
> ("Expected property 'assembly' to be of type string or List<string>.");
>             }
>             
> this.assemblyNames<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://NVelocity:1.0.3.0:407dd0808d44fbdc/NVelocity.Runtime.Resource.Loader.AssemblyResourceLoader/assemblyNames:System.Collections.Generic.List%3CString%3E>=
> configuration.GetStringList<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://NVelocity:1.0.3.0:407dd0808d44fbdc/Commons.Collections.ExtendedProperties/GetStringList%28String%29:System.Collections.Generic.List%3CString%3E>
> ("assembly");
>         }
>     }
>
> The configuration["assembly"] is neither string nor List<String>
>
> As I said, I does not occurre in all machines
>
>
> ----- Original Message -----
> *From:* Jonathon Rossi <[email protected]>
> *To:* [email protected]
> *Sent:* Wednesday, July 15, 2009 3:37 AM
> *Subject:* Re: [Monorail] - Scaffolding error (Urgent)
>
> Can you provide a demo app or a test case that I can use. It looks like it
> may be a NVelocity issue, however it is difficult to confirm with a stack
> trace without line numbers.
>
> On Wed, Jul 15, 2009 at 1:07 AM, [email protected] <
> [email protected]> wrote:
>
>>
>> Hello,
>>
>> I have an application that manage some catalogs.. In order to achive
>> this I use scaffolding
>> The problem is that it is generating this exception:
>>
>> Cannot convert an object of type  'System.Collections.ArrayList' to
>> 'System.Collections.Generic.List`1[System.String]'.
>>
>> StackTrace
>>
>> [InvalidCastException: Cannot convert an object of type
>> 'System.Collections.ArrayList' to 'System.Collections.Generic.List`1
>> [System.String]'.
>>   Commons.Collections.ExtendedProperties.GetStringList(String key)
>> +85
>>   NVelocity.Runtime.Resource.Loader.AssemblyResourceLoader.Init
>> (ExtendedProperties configuration) +48
>>   NVelocity.Runtime.Resource.ResourceManagerImpl.Initialize
>> (IRuntimeServices rs) +420
>>   NVelocity.Runtime.RuntimeInstance.initializeResourceManager() +428
>>   NVelocity.Runtime.RuntimeInstance.Init() +101
>>   NVelocity.Runtime.RuntimeInstance.Init(ExtendedProperties p) +66
>>   NVelocity.App.VelocityEngine.Init(ExtendedProperties p) +42
>>
>>
>> Castle.Components.Common.TemplateEngine.NVelocityTemplateEngine.NVelocityTemplateEngine.BeginInit
>> () +1070
>>
>>
>> Castle.MonoRail.ActiveRecordSupport.Scaffold.ScaffoldingSupport.InitializeTemplateEngine
>> () +99
>>
>> Castle.MonoRail.ActiveRecordSupport.Scaffold.ScaffoldingSupport.Process
>> (IEngineContext context, IController controller, IControllerContext
>> controllerContext) +95
>>   Castle.MonoRail.Framework.Controller.ProcessScaffoldIfAvailable()
>> +169
>>   Castle.MonoRail.Framework.Controller.PrepareToExecuteAction
>> (IEngineContext engineContext, IControllerContext context) +108
>>   Castle.MonoRail.Framework.Controller.Process(IEngineContext
>> engineContext, IControllerContext context) +40
>>   Castle.MonoRail.Framework.BaseHttpHandler.Process(HttpContext
>> context) +150
>>
>> [MonoRailException: Error processing MonoRail request. Action list on
>> controller operator]
>>   Castle.MonoRail.Framework.BaseHttpHandler.Process(HttpContext
>> context) +444
>>   Castle.MonoRail.Framework.BaseHttpHandler.ProcessRequest
>> (HttpContext context) +36
>>
>>
>> System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute
>> () +181
>>   System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
>> Boolean& completedSynchronously) +75
>>
>>
>>
>>
>>
>
>
> --
> Jono
> >
>


-- 
Jono

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