Parser error

0 views
Skip to first unread message

Adeel

unread,
Feb 24, 2009, 12:50:26 PM2/24/09
to Castle Project Users
*** Because of a glitch with google/ gmail, this message did not
appear in the list, so I am sending it again, if someone has already
received this message, please do ignore it***


I upgraded to trunk the trunk yesterday. As a newbie to castle, I
tried to get a view running, but for every page I try to open I get a
Parser Error. I am using brail as a viewengine to be exact.

Parser Error
Description: An error occurred during the parsing of a resource
required to service this request. Please review the following specific
parse error details and modify your source file appropriately.

Parser Error Message: Internal compiler error: The given key was not
present in the dictionary

Source Error:

Line 1:
Line 2: output """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Line 3: <html xmlns="http://www.w3.org/1999/xhtml">

Source File: layouts/default.brail Line: 1

The error is on line 1, but this line is empty.
I have tried stripping everything out of the view and still the error
persists.

Does anyone have a clue?

Kind regards

Ayende Rahien

unread,
Feb 24, 2009, 1:23:33 PM2/24/09
to castle-pro...@googlegroups.com
Please send me your view.

Adeel

unread,
Feb 25, 2009, 3:47:33 AM2/25/09
to Castle Project Users
Ayende, thank you for your response.

Well actually it is YOUR view ;-), I just tried to get a part of
exesto running.
The error occurs in the default.brail view of the layouts folder in
exesto.

Regards,

Adeel
> > Kind regards- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

Ayende Rahien

unread,
Feb 25, 2009, 9:37:39 AM2/25/09
to castle-pro...@googlegroups.com
What version of MR is this?
If this is the version that comes with Exesto, that one is _old_.

Adeel

unread,
Feb 25, 2009, 12:58:34 PM2/25/09
to Castle Project Users
The version of the Castle.MonoRail.Framework dll is 1.0.3.5561.
This should be the one as in the trunk.
All the references used in the project are the latest from the trunk.

On Feb 25, 3:37 pm, Ayende Rahien <aye...@ayende.com> wrote:
> What version of MR is this?If this is the version that comes with Exesto,
> > > - Tekst uit oorspronkelijk bericht weergeven -- Hide quoted text -
>
> - Show quoted text -

Ayende Rahien

unread,
Feb 25, 2009, 1:25:50 PM2/25/09
to castle-pro...@googlegroups.com
Hm, that is interesting.
what happen when you use the version that comes with Exesto?

Adeel

unread,
Feb 25, 2009, 2:25:27 PM2/25/09
to Castle Project Users
Doe I use only the exesto version of Castle.MonoRail.Framework dll or
all other assemblies of exesto too?
> > > - Show quoted text -- Hide quoted text -

Ayende Rahien

unread,
Feb 25, 2009, 5:18:32 PM2/25/09
to castle-pro...@googlegroups.com
The versions with Exesto

Adeel

unread,
Feb 25, 2009, 6:23:06 PM2/25/09
to Castle Project Users
Hi,

I finally got it working with the assemblies from the exesto project.
It is still a mistery why it does not work with latest versions from
the trunk.
That is what I want it to do. When I try to use NHibernate and try to
get the UnitOfWorkApplication working, the whole application blows up.
It gives me error messages like you are not in a unit of work
and
Could not compile configuration! BCE0106:
Boo.Lang.Compiler.CompilerError: Failed to access the types defined in
assembly 'Rhino.Commons, Version=1.5.555.0, Culture=neutral,
PublicKeyToken=0b3305902db7183f' - (C:\Windows\Microsoft.NET\Framework
\v2.0.50727\Temporary ASP.NET Files\root\d3ecae45\c7417817\assembly
\dl3\703484e5\48f2e871_3295c901\Rhino.Commons.DLL):


The versioning is a issue here. That why I thought that running on the
trunk would eliviate this problem because everything is in sync.

I still find it confusing that I got a parser error in the first
place!!!

Martin Nilsson

unread,
Feb 27, 2009, 7:36:25 AM2/27/09
to castle-pro...@googlegroups.com
I'm getting the same error after upgrading to latest trunk.

The layout:

<html>
    <head>
         <title>Title</title>       
    </head>
    <body>       
        Test
    </body>
</html>

Stacktrace:
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Boo.Lang.Compiler.CompilerContext.GetService[T]()
   at Boo.Lang.Compiler.Steps.ProcessMethodBodies.get_CallableResolutionService()
   at Boo.Lang.Compiler.Steps.ProcessMethodBodies.GetCorrectCallableReference(Node sourceNode, ExpressionCollection args, IEntity[] candidates)
   at Boo.Lang.Compiler.Steps.ProcessMethodBodies.GetCorrectConstructor(Node sourceNode, IType type, ExpressionCollection arguments)
   at Boo.Lang.Compiler.Steps.ProcessMethodBodies.ProcessConstructorInvocation(MethodInvocationExpression node, IEntity targetEntity)
   at Boo.Lang.Compiler.Steps.ProcessMethodBodies.ProcessMethodInvocationExpression(MethodInvocationExpression node, IEntity targetEntity)
   at Boo.Lang.Compiler.Steps.ProcessMethodBodies.OnMethodInvocationExpression(MethodInvocationExpression node)
   at Castle.MonoRail.Views.Brail.ReplaceUknownWithParameters.OnMethodInvocationExpression(MethodInvocationExpression node) in d:\OSS\Castle\trunk\MonoRail\Castle.MonoRail.Views.Brail\ReplaceUknownWithParameters.cs:line 59
   at Boo.Lang.Compiler.Ast.MethodInvocationExpression.Accept(IAstVisitor visitor)
   at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node)

System.Collections.Generic.KeyNotFoundExceptoin: {"The given key was not present in the dictionary."}

Btw, the dictionary is empty

Setting the parameter (statusMessage) in the controller action and having below view doesn't help either:

<html>
    <head>
         <title>Title</title>       
    </head>
    <body>       
        ${statusMessage}       
        Test
    </body>
</html>

Martin Nilsson

unread,
Feb 27, 2009, 10:56:35 AM2/27/09
to castle-pro...@googlegroups.com
If I change to my previous Boo.Lang.Compiler it's working again.
Has Boo been upgraded?

Ayende Rahien

unread,
Feb 27, 2009, 4:17:38 PM2/27/09
to castle-pro...@googlegroups.com
Looks like that might be the reason, yes.

Adeel

unread,
Mar 7, 2009, 3:26:40 PM3/7/09
to Castle Project Users
Which version are you using now, I used the 1.0.0 version of
boo.lang.compiler, but it gives me another error.

On 27 feb, 22:17, Ayende Rahien <aye...@ayende.com> wrote:
> Looks like that might be the reason, yes.
>
>
>
> On Fri, Feb 27, 2009 at 7:56 AM, Martin Nilsson <mffmar...@gmail.com> wrote:
> > If I change to my previous Boo.Lang.Compiler it's working again.
> > Has Boo been upgraded?
>
> > On Fri, Feb 27, 2009 at 1:36 PM, Martin Nilsson <mffmar...@gmail.com>wrote:
>
> >> I'm getting the same error after upgrading to latest trunk.
>
> >> The layout:
>
> >> <html>
> >>     <head>
> >>          <title>Title</title>
> >>     </head>
> >>     <body>
> >>         Test
> >>     </body>
> >> </html>
>
> >> Stacktrace:
> >>    at System.ThrowHelper.ThrowKeyNotFoundException()
> >>    at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
> >>    at Boo.Lang.Compiler.CompilerContext.GetService[T]()
> >>    at
> >> Boo.Lang.Compiler.Steps.ProcessMethodBodies.get_CallableResolutionService()
> >>    at
> >> Boo.Lang.Compiler.Steps.ProcessMethodBodies.GetCorrectCallableReference(Nod­e
> >> sourceNode, ExpressionCollection args, IEntity[] candidates)
> >>    at
> >> Boo.Lang.Compiler.Steps.ProcessMethodBodies.GetCorrectConstructor(Node
> >> sourceNode, IType type, ExpressionCollection arguments)
> >>    at
> >> Boo.Lang.Compiler.Steps.ProcessMethodBodies.ProcessConstructorInvocation(Me­thodInvocationExpression
> >> node, IEntity targetEntity)
> >>    at
> >> Boo.Lang.Compiler.Steps.ProcessMethodBodies.ProcessMethodInvocationExpressi­on(MethodInvocationExpression
> >> node, IEntity targetEntity)
> >>    at
> >> Boo.Lang.Compiler.Steps.ProcessMethodBodies.OnMethodInvocationExpression(Me­thodInvocationExpression
> >> node)
> >>    at
> >> Castle.MonoRail.Views.Brail.ReplaceUknownWithParameters.OnMethodInvocationE­xpression(MethodInvocationExpression
> >> node) in
> >> d:\OSS\Castle\trunk\MonoRail\Castle.MonoRail.Views.Brail\ReplaceUknownWithP­arameters.cs:line
> >> 59
> >>    at Boo.Lang.Compiler.Ast.MethodInvocationExpression.Accept(IAstVisitor
> >> visitor)
> >>    at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node)
>
> >> System.Collections.Generic.KeyNotFoundExceptoin: {"The given key was not
> >> present in the dictionary."}
>
> >> Btw, the dictionary is empty
>
> >> Setting the parameter (statusMessage) in the controller action and having
> >> below view doesn't help either:
>
> >> <html>
> >>     <head>
> >>          <title>Title</title>
> >>     </head>
> >>     <body>
> >>         ${statusMessage}
> >>         Test
> >>     </body>
> >> </html>
>
> >> On Tue, Feb 24, 2009 at 6:50 PM, Adeel <adeelsiddi...@gmail.com> wrote:
>
> >>> *** Because of a glitch with google/ gmail, this message did not
> >>> appear in the list, so I am sending it again, if someone has already
> >>> received this message, please do ignore it***
>
> >>> I upgraded to trunk the trunk yesterday.  As a newbie to castle, I
> >>> tried to get a view running, but for every page I try to open I get a
> >>> Parser Error. I am using brail as a viewengine to be exact.
>
> >>>  Parser Error
> >>> Description: An error occurred during the parsing of a resource
> >>> required to service this request. Please review the following specific
> >>> parse error details and modify your source file appropriately.
>
> >>> Parser Error Message: Internal compiler error: The given key was not
> >>> present in the dictionary
>
> >>> Source Error:
>
> >>> Line 1:
> >>> Line 2:  output """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
> >>> Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> >>> Line 3:  <html xmlns="http://www.w3.org/1999/xhtml">
>
> >>> Source File: layouts/default.brail    Line: 1
>
> >>> The error is on line 1, but this line is empty.
> >>> I have tried stripping everything out of the view and still the error
> >>> persists.
>
> >>> Does anyone have a clue?
>

Grimace of Despair

unread,
Mar 18, 2009, 8:35:32 AM3/18/09
to Castle Project Users
I'm suffering the exact same issue, running everything from trunk.

When reverting to a previous version of all boo assemblies (27 feb
2008), I get the following error, probably because generics were not
into play at that date yet:
"Could not load type 'Boo.Lang.List`1' from assembly 'Boo.Lang,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=32c39770e9a21a67'."

When reverting only Boo.Lang.Compiler, I get the folloeing error,
probably because of intermediate API changes:
Method not found: 'Boo.Lang.List Boo.Lang.List.Add(System.Object)'.

So, I'm also curious which version Martin is using...

"Boo.Lang.Compiler, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=32c39770e9a21a67"

On Mar 7, 9:26 pm, Adeel <adeelsiddi...@gmail.com> wrote:
> Which version are you using now, I used the 1.0.0 version ofboo.lang.compiler, but it gives me another error.
>
> On 27 feb, 22:17, Ayende Rahien <aye...@ayende.com> wrote:
>
> > Looks like that might be the reason, yes.
>
> > On Fri, Feb 27, 2009 at 7:56 AM, Martin Nilsson <mffmar...@gmail.com> wrote:
> > > If I change to my previousBoo.Lang.Compilerit's working again.
> > > Has Boo been upgraded?
>
> > > On Fri, Feb 27, 2009 at 1:36 PM, Martin Nilsson <mffmar...@gmail.com>wrote:
>
> > >> I'm getting the same error after upgrading to latest trunk.
>
> > >> The layout:
>
> > >> <html>
> > >>     <head>
> > >>          <title>Title</title>
> > >>     </head>
> > >>     <body>
> > >>         Test
> > >>     </body>
> > >> </html>
>
> > >> Stacktrace:
> > >>    at System.ThrowHelper.ThrowKeyNotFoundException()
> > >>    at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
> > >>    atBoo.Lang.Compiler.CompilerContext.GetService[T]()
> > >>    at
> > >>Boo.Lang.Compiler.Steps.ProcessMethodBodies.get_CallableResolutionService()
> > >>    at
> > >>Boo.Lang.Compiler.Steps.ProcessMethodBodies.GetCorrectCallableReference(Nod­e
> > >> sourceNode, ExpressionCollection args, IEntity[] candidates)
> > >>    at
> > >>Boo.Lang.Compiler.Steps.ProcessMethodBodies.GetCorrectConstructor(Node
> > >> sourceNode, IType type, ExpressionCollection arguments)
> > >>    at
> > >>Boo.Lang.Compiler.Steps.ProcessMethodBodies.ProcessConstructorInvocation(Me­thodInvocationExpression
> > >> node, IEntity targetEntity)
> > >>    at
> > >>Boo.Lang.Compiler.Steps.ProcessMethodBodies.ProcessMethodInvocationExpressi­on(MethodInvocationExpression
> > >> node, IEntity targetEntity)
> > >>    at
> > >>Boo.Lang.Compiler.Steps.ProcessMethodBodies.OnMethodInvocationExpression(Me­thodInvocationExpression
> > >> node)
> > >>    at
> > >> Castle.MonoRail.Views.Brail.ReplaceUknownWithParameters.OnMethodInvocationE­xpression(MethodInvocationExpression
> > >> node) in
> > >> d:\OSS\Castle\trunk\MonoRail\Castle.MonoRail.Views.Brail\ReplaceUknownWithP­arameters.cs:line
> > >> 59
> > >>    atBoo.Lang.Compiler.Ast.MethodInvocationExpression.Accept(IAstVisitor
> > >> visitor)
> > >>    atBoo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node)

Grimace of Despair

unread,
Mar 18, 2009, 8:53:53 AM3/18/09
to Castle Project Users
I'm really not into boo/brail (yet). Maybe someone with a little more
insight can tell what's wrong, based on the following information?

public override void OnMethodInvocationExpression
(MethodInvocationExpression node)
{
ReferenceExpression expression = node.Target as
ReferenceExpression;
if (expression == null || expression.Name != "TryGetParameter")
{
base.OnMethodInvocationExpression(node); // Here's the culprit
return;
}

The base call fails, leaving the following call stack:

mscorlib.dll!System.ThrowHelper.ThrowKeyNotFoundException() + 0x1d
bytes
mscorlib.dll!
System.Collections.Generic.Dictionary<System.__Canon,System.__Canon>.this
[System.__Canon].get(System.__Canon key) + 0x41 bytes
Boo.Lang.Compiler.DLL!
Boo.Lang.Compiler.CompilerContext.GetService<Boo.Lang.Compiler.TypeSystem.CallableResolutionService>
() + 0x77 bytes
Boo.Lang.Compiler.DLL!
Boo.Lang.Compiler.Steps.ProcessMethodBodies.CallableResolutionService.get
() + 0x4f bytes
Boo.Lang.Compiler.DLL!
Boo.Lang.Compiler.Steps.ProcessMethodBodies.GetCorrectCallableReference
(Boo.Lang.Compiler.Ast.Node sourceNode = {super(viewEngine, output,
context, __controller, __controllerContext)},
Boo.Lang.Compiler.Ast.ExpressionCollection args =
{Boo.Lang.Compiler.Ast.ExpressionCollection},
Boo.Lang.Compiler.TypeSystem.IEntity[] candidates =
{Boo.Lang.Compiler.TypeSystem.IConstructor[1]}) + 0xb0 bytes
Boo.Lang.Compiler.DLL!
Boo.Lang.Compiler.Steps.ProcessMethodBodies.GetCorrectConstructor
(Boo.Lang.Compiler.Ast.Node sourceNode = {super(viewEngine, output,
context, __controller, __controllerContext)},
Boo.Lang.Compiler.TypeSystem.IType type =
{Castle.MonoRail.Views.Brail.BrailBase},
Boo.Lang.Compiler.Ast.ExpressionCollection arguments =
{Boo.Lang.Compiler.Ast.ExpressionCollection}) + 0x95 bytes
Boo.Lang.Compiler.DLL!
Boo.Lang.Compiler.Steps.ProcessMethodBodies.ProcessConstructorInvocation
(Boo.Lang.Compiler.Ast.MethodInvocationExpression node = {super
(viewEngine, output, context, __controller, __controllerContext)},
Boo.Lang.Compiler.TypeSystem.IEntity targetEntity =
{BrailView_default.constructor
(Castle.MonoRail.Views.Brail.BooViewEngine, System.IO.TextWriter,
Castle.MonoRail.Framework.IEngineContext,
Castle.MonoRail.Framework.IController,
Castle.MonoRail.Framework.IControllerContext)}) + 0x180 bytes
Boo.Lang.Compiler.DLL!
Boo.Lang.Compiler.Steps.ProcessMethodBodies.ProcessMethodInvocationExpression
(Boo.Lang.Compiler.Ast.MethodInvocationExpression node = {super
(viewEngine, output, context, __controller, __controllerContext)},
Boo.Lang.Compiler.TypeSystem.IEntity targetEntity =
{BrailView_default.constructor
(Castle.MonoRail.Views.Brail.BooViewEngine, System.IO.TextWriter,
Castle.MonoRail.Framework.IEngineContext,
Castle.MonoRail.Framework.IController,
Castle.MonoRail.Framework.IControllerContext)}) + 0x157 bytes
Boo.Lang.Compiler.DLL!
Boo.Lang.Compiler.Steps.ProcessMethodBodies.OnMethodInvocationExpression
(Boo.Lang.Compiler.Ast.MethodInvocationExpression node = {super
(viewEngine, output, context, __controller, __controllerContext)}) +
0x242 bytes


On Mar 18, 1:35 pm, Grimace of Despair <GrimaceOfDesp...@hotmail.com>
wrote:

Grimace of Despair

unread,
Mar 18, 2009, 11:26:32 AM3/18/09
to Castle Project Users
I'm just continuing this monologue. If I need to shut up, just tell
me :)

I downloaded boo after some codebase fixes I got the whole Castle
building on that trunk (NH/Castle/Rhino). The boo-ers wrapped a catch
around the above KeyNotFoundException, so I'm now getting the actual
error:

No compiler service of type
`Boo.Lang.Compiler.TypeSystem.CallableResolutionService` has been
found

I'm not yet sure who's fault that would be. I'm really short on
knowledge in this matter, but maybe I'll accidently find the fix :)

On Mar 18, 1:53 pm, Grimace of Despair <GrimaceOfDesp...@hotmail.com>

Grimace of Despair

unread,
Mar 18, 2009, 12:03:41 PM3/18/09
to Castle Project Users
Ok. I got it running on the trunks (Boo/NH/Castle/Rhino). It requires
a fix in Castle.MonoRail.Views.Brail, where CustomTypeSystem replaces
a compiler step used by Boo.

public class InitializeCustomTypeSystem : AbstractCompilerStep
{
public override void Run()
{
Context.TypeSystemServices = new CustomTypeSystem(Context); //
Existing line
Context.RegisterService(new CallableResolutionService
(Context)); // Added line 1
Context.RegisterService(new GenericsServices()); // Added line 2
}
}

I'm not sure if this is gonna run/compile with the Boo version used by
the Castle trunk. Anway, till so far, my contribution ;)

On Mar 18, 4:26 pm, Grimace of Despair <GrimaceOfDesp...@hotmail.com>
Reply all
Reply to author
Forward
0 new messages