Field not found: 'NVelocity.Runtime.Directive.Directive.runtimeServices' exception after moving from RC3 to trunk build 1040

2009-02-10 Thread Alexandra Tikhonova

Hi
We have moved our project from RC3 to the trunk build 1040.
After fixing some breaking changes like objects renaming and removing
monorail http module, we managed to build our project. But when we run
it we got the following exception:

Exception Details: System.MissingFieldException: Field not found:
'NVelocity.Runtime.Directive.Directive.runtimeServices'.

[MissingFieldException: Field not found:
'NVelocity.Runtime.Directive.Directive.runtimeServices'.]
 
Castle.MonoRail.Framework.Views.NVelocity.CustomDirectives.AbstractComponentDirective.Render
(IInternalContextAdapter context, TextWriter writer, INode node) +0
   NVelocity.Runtime.Parser.Node.ASTDirective.Render
(IInternalContextAdapter context, TextWriter writer) +23
   NVelocity.Runtime.Parser.Node.SimpleNode.Render
(IInternalContextAdapter context, TextWriter writer) +52
   NVelocity.Template.Merge(IContext context, TextWriter writer) +146
 
Castle.MonoRail.Framework.Views.NVelocity.NVelocityViewEngine.RenderLayout
(String layoutName, String contents, IContext ctx, TextWriter output)
+121
 
Castle.MonoRail.Framework.Views.NVelocity.NVelocityViewEngine.ProcessLayoutRecursively
(StringWriter writer, IEngineContext context, IController controller,
IControllerContext controllerContext, IContext ctx, TextWriter
finalOutput) +361
 
Castle.MonoRail.Framework.Views.NVelocity.NVelocityViewEngine.Process
(String viewName, TextWriter output, IEngineContext context,
IController controller, IControllerContext controllerContext) +564
   Castle.MonoRail.Framework.Services.DefaultViewEngineManager.Process
(String templateName, TextWriter output, IEngineContext context,
IController controller, IControllerContext controllerContext) +238
   Castle.MonoRail.Framework.Controller.ProcessView() +146
   Castle.MonoRail.Framework.Controller.RunActionAndRenderView() +2841
   Castle.MonoRail.Framework.Controller.Process(IEngineContext
engineContext, IControllerContext context) +63
   Castle.MonoRail.Framework.BaseHttpHandler.Process(HttpContext
context) +161

[MonoRailException: Error processing MonoRail request. Action Index on
controller Overview]
   Castle.MonoRail.Framework.BaseHttpHandler.Process(HttpContext
context) +477
   Castle.MonoRail.Framework.BaseHttpHandler.ProcessRequest
(HttpContext context) +37
 
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute
() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean completedSynchronously) +75

After we replaced current action view with a simple view with no
components on it everything worked fine. When we tried to add a
component on the test view we got the exception above again.

We found a suggestion to replace NVelocity.dll with the latest one
from the build. We did so but the exception repeated.

Please advise.

--~--~-~--~~~---~--~~
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-users@googlegroups.com
To unsubscribe from this group, send email to 
castle-project-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~--~~~~--~~--~--~---



Re: Field not found: 'NVelocity.Runtime.Directive.Directive.runtimeServices' exception after moving from RC3 to trunk build 1040

2009-02-11 Thread Alexandra Tikhonova

The problem was resolved! :)
The update of NVelocity.dll to the latest one from the build really
helps.

The reason of our error was that we did not notice, that we also use
NVelocity in a dependent project for mail message generation, and
after move to trunk we did not change NVelocity.dll there. So during
the solution build the old NVelocity.dll from the dependency always
overwrote the new NVelocity.dll in our web project.


On 10 фев, 20:06, Alexandra Tikhonova shuren...@gmail.com wrote:
 Hi
 We have moved our project from RC3 to the trunk build 1040.
 After fixing some breaking changes like objects renaming and removing
 monorail http module, we managed to build our project. But when we run
 it we got the following exception:

 Exception Details: System.MissingFieldException: Field not found:
 'NVelocity.Runtime.Directive.Directive.runtimeServices'.

 [MissingFieldException: Field not found:
 'NVelocity.Runtime.Directive.Directive.runtimeServices'.]

 Castle.MonoRail.Framework.Views.NVelocity.CustomDirectives.AbstractComponentDirective.Render
 (IInternalContextAdapter context, TextWriter writer, INode node) +0
    NVelocity.Runtime.Parser.Node.ASTDirective.Render
 (IInternalContextAdapter context, TextWriter writer) +23
    NVelocity.Runtime.Parser.Node.SimpleNode.Render
 (IInternalContextAdapter context, TextWriter writer) +52
    NVelocity.Template.Merge(IContext context, TextWriter writer) +146

 Castle.MonoRail.Framework.Views.NVelocity.NVelocityViewEngine.RenderLayout
 (String layoutName, String contents, IContext ctx, TextWriter output)
 +121

 Castle.MonoRail.Framework.Views.NVelocity.NVelocityViewEngine.ProcessLayoutRecursively
 (StringWriter writer, IEngineContext context, IController controller,
 IControllerContext controllerContext, IContext ctx, TextWriter
 finalOutput) +361

 Castle.MonoRail.Framework.Views.NVelocity.NVelocityViewEngine.Process
 (String viewName, TextWriter output, IEngineContext context,
 IController controller, IControllerContext controllerContext) +564
    Castle.MonoRail.Framework.Services.DefaultViewEngineManager.Process
 (String templateName, TextWriter output, IEngineContext context,
 IController controller, IControllerContext controllerContext) +238
    Castle.MonoRail.Framework.Controller.ProcessView() +146
    Castle.MonoRail.Framework.Controller.RunActionAndRenderView() +2841
    Castle.MonoRail.Framework.Controller.Process(IEngineContext
 engineContext, IControllerContext context) +63
    Castle.MonoRail.Framework.BaseHttpHandler.Process(HttpContext
 context) +161

 [MonoRailException: Error processing MonoRail request. Action Index on
 controller Overview]
    Castle.MonoRail.Framework.BaseHttpHandler.Process(HttpContext
 context) +477
    Castle.MonoRail.Framework.BaseHttpHandler.ProcessRequest
 (HttpContext context) +37

 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute
 () +181
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
 Boolean completedSynchronously) +75

 After we replaced current action view with a simple view with no
 components on it everything worked fine. When we tried to add a
 component on the test view we got the exception above again.

 We found a suggestion to replace NVelocity.dll with the latest one
 from the build. We did so but the exception repeated.

 Please advise.
--~--~-~--~~~---~--~~
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-users@googlegroups.com
To unsubscribe from this group, send email to 
castle-project-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~--~~~~--~~--~--~---



Invalid https links generated using DefaultUrlBuilder

2009-03-03 Thread Alexandra Tikhonova

Hi

Assume we have public home page (http://mydomain/Home/Index.rails)
which has a link to a secure registration page (https://mydomain/
Registration/Form.rails)

While the home page index view generation our custom LinkHelper builds
link url for the secure registration page using DefaultUrlBuilder.
For this minimal set of parameters:
absolute : true
protocol : https
area :
controller : Registration
action : Form
we got the following URL: https://mydomain:80/Registration/Form.rails.
Looks strange and is invalid.

We added explicit ssl port to the parameters passed to
DefaultUrlBuilder:
absolute : true
protocol : https
port: 443
area :
controller : Registration
action : Form
and got more surprising result: https://mydomain:0/Registration/Form.rails.

This is the part of
DefaultUrlBuilder.ApplyBasePathOrAbsolutePathIfNecessary method which
generates an absolute path part

if (createAbsolutePath)
{
string domain = parameters.Domain ?? current.Domain;
string subdomain = parameters.Subdomain ?? current.Subdomain;
string protocol = parameters.Protocol ?? current.Protocol;
int port = (parameters.Port == 0) ? current.Port : 0;
bool includePort = ((protocol == http)  (port != 80)) ||
((protocol == https)  (port != 443));
path = protocol + ://;
if (!string.IsNullOrEmpty(subdomain))
{
path = path + subdomain + . + domain;
}
else
{
path = path + domain;
}
if (includePort)
{
path = path + : + port;
}
path = path + this.ComputeStandardBasePath(appVirtualDir,
area);
}

Isn't there a bug in retrieving port from parameters and current
settings?

int port = (parameters.Port == 0) ? current.Port : 0;

It seems that explicit port can never be set through custom parameters
passed to DefaultUrlBuilder.

We use Monorail trunk build 1040.
--~--~-~--~~~---~--~~
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-users@googlegroups.com
To unsubscribe from this group, send email to 
castle-project-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~--~~~~--~~--~--~---