You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Morten Schmidt <sc...@knowledgelab.sdu.dk> on 2005/06/01 11:04:36 UTC

Re: Svar: Re: A concurrent acces has occurred.

Ron Grabowski, close to being my hero!!! 
 
I have no idea how to build in debug mode... BUT... 
 
I commented line 356 out, recompiled, did nothing else, and now it
works! 
 
I compiled Common, DataMapper and DataAccess (DataMapper without line
356 in DomSqlMapBuilder.cs) and it works like a charm! 
 
But Ron... to really be my hero, I need that line to work ;o) What du I
do? 
 
Thanks a billion! 
 
/morten

>>>rongrabowski@yahoo.com 05/31/05 4:10 pm >>>
Since you're building from the source, could you build in Debug mode so
we can see line numbers? It looks like the embedded resource
SqlMapConfig.xsd can't be accessed. What happens when you comment out
line 356 in DomSqlMapBuilder.cs:

ValidateSchema( document.ChildNodes[1], SqlMapConfig.xsd );

--- Morten Schmidt <sc...@knowledgelab.sdu.dk> wrote:

>Guess what... I'm stuck...
> 
>I used the iBATIS.NET files Common, DataMapper and DataAccess that I
>compiled myself... I used Npgsql 0.7beta6... All my statements create
>this error, and I can't seem to figure them out...
> 
>[snip]
> Description: An unhandled exception occurred during the execution of
>the current web request. Please review the stack trace for more
>information about the error and where it originated in the code.
> 
>Exception Details: System.ArgumentNullException: Value cannot be
>null.
>Parameter name: stream
>[snap]
> 
> 
>and the stack trace:
> 
>[snip]
>Stack Trace:
> 
>[ArgumentNullException: Value cannot be null.
>Parameter name: stream]
>   System.IO.StreamReader..ctor(Stream stream, Encoding encoding,
>Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) +126
>   System.IO.StreamReader..ctor(Stream stream) +101
>  
>
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ValidateSchema(XmlNode
>section, String schemaFileName) +230
>  
>IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument
>document, DataSource dataSource, Boolean useConfigFileWatcher,
>Boolean
>isCallFromDao) +106
> 
>[ConfigurationException:
>- The error occurred while Validate SqlMap config.]
>  
>IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument
>document, DataSource dataSource, Boolean useConfigFileWatcher,
>Boolean
>isCallFromDao) +195
>  
>
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureAndWatch(String
>resource, ConfigureHandler configureDelegate) +198
>   IBatisNet.DataMapper.Mapper.InitMapper() +65
>   IBatisNet.DataMapper.Mapper.Instance() +64
>  
>BudgetModel.Model.Helper.BudgetValueHelper.GetAllAccountIdsDistinct()
>+116
>   BudgetModel.Test.btnTest_Click(Object sender, EventArgs e) in
>C:\Inetpub\wwwroot\Devolopment\smet\index.aspx.cs:40
>   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
>  
>
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
>eventArgument) +57
>   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
>sourceControl, String eventArgument) +18
>   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection
>postData)
>+33
>   System.Web.UI.Page.ProcessRequestMain() +1292
>[snap]
> 
>Is it something about reading my .xml filen in sqlmap.config?
>I really got stuck here....
> 
>/morten
>
>>>>sch@knowledgelab.sdu.dk 05/31/05 8:53 am >>>
>hehe, yeah, .common that was the easy one ;o)
>  
>I used monodevelop ( http://www.monodevelop.com/ ). I didn't have
>log4net.dll and Castle.DynamicProxy.dll in my gac, so I pointed the
>references to th files in the External-bin, coming with svn...
>  
>Used build and there it was.... 0 errors, 0 warnings...
>  
>Then I did the same with DataMapper: 4 warnings on variables only
>used
>once and 1 warning of unreachable code. Last I build DataAccess
>(depends
>on DataMapper) which came out 0 errors, 0 warnings.
>  
>I didn't try to compile the tests, since I didn't think I needed them
>(do I?), and the extention part was the one that gave me the
>problems.
>What are the extentions? Do I need them?
>  
>If I can live without them, I should have a working build, right?
>I'll
>try them within the next our, with Npgsql 0.7beta 6, and see how it
>goes...
>  
>I haven't tried out that nant stuff yet, but this is coming one of
>these
>days you know... (Instaling as I type)
>  
>I read in one of the other mails in this thread, that Gilles beleives
>he
>has the next build ready : I was thinking of the first June.. Would
>this
>be tomorrow, or sometime in the first part of June?
>  
>Thx for helping, I love these communities!!!
>  
>/morten
>
>>>>roberto.rabe@gmail.com 05/30/05 5:56 pm >>>
>Are you able to successfully compile IBatisNet.Common?
>
>Roberto
>
>On 5/30/05, Roberto R <ro...@gmail.com> wrote:
>>
>>Hmmm...you've had better luck than me! :-)
>>
>>Don't compile the IBatisNet.DataAccess.Extensions and
>>IBatisNet.DataAccess.Test projects. They include the references to
>>NHibernate.
>>
>>Are you using the NAnt build files for this?
>>
>>Roberto
>>
>>On 5/30/05, Morten Schmidt <sc...@knowledgelab.sdu.dk> wrote:
>>>
>>>OK, tries to walk the mile myself...
>>>I have now downloaded the source from svn... I'm on Linux with
>Mono,
>>>but that shouldn't matter. I corrected the assemply references, and
>tried to
>>>compile. I got an error (or more than one that is ;o) regarding
>>>NHibernate.dll
>>>I then downloaded that from Sourceforge, but it seems I can't add
>a
>>>reference to it... It tells me the file could net be found....
>Weird,
>>>because I see it ;o/
>>>Anyone got an idea on how to get around this? Do I HAVE to compile
>on
>>>windows?
>>>/morten
>>>
>>
>
>



Re: Svar: Re: A concurrent acces has occurred.

Posted by Roberto R <ro...@gmail.com>.
Make sure the SqlMapConfig.xsd is set as an embedded resource for 
IBatisNet.DataMapper. It might just be missing from the built assembly.

Roberto

On 6/1/05, Morten Schmidt <sc...@knowledgelab.sdu.dk> wrote:
> 
>  Ron Grabowski, close to being my hero!!! 
>  I have no idea how to build in debug mode... BUT... 
>  I commented line 356 out, recompiled, did nothing else, and now it works! 
> 
>  I compiled Common, DataMapper and DataAccess (DataMapper without line 356 
> in DomSqlMapBuilder.cs) and it works like a charm! 
>  But Ron... to really be my hero, I need that line to work ;o) What du I 
> do? 
>  Thanks a billion! 
>  /morten
> 
> >>>rongrabowski@yahoo.com 05/31/05 4:10 pm >>>
> Since you're building from the source, could you build in Debug mode so
> we can see line numbers? It looks like the embedded resource
> SqlMapConfig.xsd can't be accessed. What happens when you comment out
> line 356 in DomSqlMapBuilder.cs:
> 
> ValidateSchema( document.ChildNodes[1], "SqlMapConfig.xsd" );
> 
> --- Morten Schmidt <sc...@knowledgelab.sdu.dk> wrote:
> 
> >Guess what... I'm stuck...
> > 
> >I used the iBATIS.NET <http://iBATIS.NET> files Common, DataMapper and 
> DataAccess that I
> >compiled myself... I used Npgsql 0.7beta6... All my statements create
> >this error, and I can't seem to figure them out...
> > 
> >[snip]
> > Description: An unhandled exception occurred during the execution of
> >the current web request. Please review the stack trace for more
> >information about the error and where it originated in the code.
> > 
> >Exception Details: System.ArgumentNullException: Value cannot be
> >null.
> >Parameter name: stream
> >[snap]
> > 
> > 
> >and the stack trace:
> > 
> >[snip]
> >Stack Trace:
> > 
> >[ArgumentNullException: Value cannot be null.
> >Parameter name: stream]
> > System.IO.StreamReader..ctor(Stream stream, Encoding encoding,
> >Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) +126
> > System.IO.StreamReader..ctor(Stream stream) +101
> > 
> >
> IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ValidateSchema(XmlNode
> >section, String schemaFileName) +230
> > 
> >IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument
> >document, DataSource dataSource, Boolean useConfigFileWatcher,
> >Boolean
> >isCallFromDao) +106
> > 
> >[ConfigurationException:
> >- The error occurred while Validate SqlMap config.]
> > 
> >IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument
> >document, DataSource dataSource, Boolean useConfigFileWatcher,
> >Boolean
> >isCallFromDao) +195
> > 
> >
> IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureAndWatch
> (String
> >resource, ConfigureHandler configureDelegate) +198
> > IBatisNet.DataMapper.Mapper.InitMapper() +65
> > IBatisNet.DataMapper.Mapper.Instance() +64
> > 
> >BudgetModel.Model.Helper.BudgetValueHelper.GetAllAccountIdsDistinct()
> >+116
> > BudgetModel.Test.btnTest_Click(Object sender, EventArgs e) in
> >C:\Inetpub\wwwroot\Devolopment\smet\index.aspx.cs:40
> > System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
> > 
> >
> 
> System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent
> (String
> >eventArgument) +57
> > System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
> >sourceControl, String eventArgument) +18
> > System.Web.UI.Page.RaisePostBackEvent(NameValueCollection
> >postData)
> >+33
> > System.Web.UI.Page.ProcessRequestMain() +1292
> >[snap]
> > 
> >Is it something about reading my .xml filen in sqlmap.config?
> >I really got stuck here....
> > 
> >/morten
> >
> >>>>sch@knowledgelab.sdu.dk 05/31/05 8:53 am >>>
> >hehe, yeah, .common that was the easy one ;o)
> > 
> >I used monodevelop ( http://www.monodevelop.com/ ). I didn't have
> >log4net.dll and Castle.DynamicProxy.dll in my gac, so I pointed the
> >references to th files in the External-bin, coming with svn...
> > 
> >Used build and there it was.... 0 errors, 0 warnings...
> > 
> >Then I did the same with DataMapper: 4 warnings on variables only
> >used
> >once and 1 warning of unreachable code. Last I build DataAccess
> >(depends
> >on DataMapper) which came out 0 errors, 0 warnings.
> > 
> >I didn't try to compile the tests, since I didn't think I needed them
> >(do I?), and the extention part was the one that gave me the
> >problems.
> >What are the extentions? Do I need them?
> > 
> >If I can live without them, I should have a working build, right?
> >I'll
> >try them within the next our, with Npgsql 0.7beta 6, and see how it
> >goes...
> > 
> >I haven't tried out that nant stuff yet, but this is coming one of
> >these
> >days you know... (Instaling as I type)
> > 
> >I read in one of the other mails in this thread, that Gilles beleives
> >he
> >has the next build ready : I was thinking of the first June.. Would
> >this
> >be tomorrow, or sometime in the first part of June?
> > 
> >Thx for helping, I love these communities!!!
> > 
> >/morten
> >
> >>>>roberto.rabe@gmail.com 05/30/05 5:56 pm >>>
> >Are you able to successfully compile IBatisNet.Common?
> >
> >Roberto
> >
> >On 5/30/05, Roberto R <ro...@gmail.com> wrote:
> >>
> >>Hmmm...you've had better luck than me! :-)
> >>
> >>Don't compile the IBatisNet.DataAccess.Extensions and
> >>IBatisNet.DataAccess.Test projects. They include the references to
> >>NHibernate.
> >>
> >>Are you using the NAnt build files for this?
> >>
> >>Roberto
> >>
> >>On 5/30/05, Morten Schmidt <sc...@knowledgelab.sdu.dk> wrote:
> >>>
> >>>OK, tries to walk the mile myself...
> >>>I have now downloaded the source from svn... I'm on Linux with
> >Mono,
> >>>but that shouldn't matter. I corrected the assemply references, and
> >tried to
> >>>compile. I got an error (or more than one that is ;o) regarding
> >>>NHibernate.dll
> >>>I then downloaded that from Sourceforge, but it seems I can't add
> >a
> >>>reference to it... It tells me the file could net be found....
> >Weird,
> >>>because I see it ;o/
> >>>Anyone got an idea on how to get around this? Do I HAVE to compile
> >on
> >>>windows?
> >>>/morten
> >>>
> >>
> >
> >
> 
>

Re: Svar: Re: A concurrent acces has occurred.

Posted by Ron Grabowski <ro...@yahoo.com>.
I've never used Mono so some of these comments may not be 100% correct.
In .Net there are two kinds of assemblies: Debug and Release. It looks
like you're compiling the IBatisNet libaries in Release mode because
there aren't line numbers in the exception. Had you compiled in Debug
mode, you would most likely see something like this:

IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ValidateSchema(XmlNode
section, String schemaFileName):365

I don't think that is the exact syntax, but you get the idea.

According to the helpful people on #monodevelop, try this to get
MonoDevelop into Debug mode:

 Right click the project -> Options.
 Then right click the configuration you want to use
 Click set active.

You should get .pdb files in addition to the normal .dll files. Copy
those to the bin directory of your application. The .pdb contain the
line number offset information.

Someone on the #mono channel suggested you run a program called
'monodis' to verify the embedded resource exsits inside the DataMapper
assembly. I suspect that is the problem. In Visual Studio when I add a
file to a project and I want to mark it as being an embedded resource,
I need to right click on the file and select Properties, then change
its Build Action from Content to Embedded Resource. You may need to do
something similiar in MonoDevelop for the .xsd files.

Have you noticed anything else not working? Are you using IBatisNet in
an Asp.Net application under Mono (XSP?) or in another type of project?

- Ron

--- Morten Schmidt <sc...@knowledgelab.sdu.dk> wrote:

> Ron Grabowski, close to being my hero!!! 
>  
> I have no idea how to build in debug mode... BUT... 
>  
> I commented line 356 out, recompiled, did nothing else, and now it
> works! 
>  
> I compiled Common, DataMapper and DataAccess (DataMapper without line
> 356 in DomSqlMapBuilder.cs) and it works like a charm! 
>  
> But Ron... to really be my hero, I need that line to work ;o) What du
> I
> do? 
>  
> Thanks a billion! 
>  
> /morten