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 Pieter Baele <pi...@telenet.be> on 2008/04/21 07:25:32 UTC

Re: iBATIS looking on the wrong place for SqlMap.config SOLVED (for a part)

I placed the providers en sqlmap config in bin/debug, then it worked.
It isn't that straight-forward.....

The only problem left now is that it doesn't find the newest  
mysql.data library I added myself.
The bytefx provider is really too old .... 2004 (?!) Or is it still a  
better option for a mysql db?

I have not changed the publickeytoken, can this cause problems? If so,  
where do I find this token?
I tried adding the reference provided by the visual studio integration  
and also 'the hard way' by providing and
copying the library. None of the two works :-S

Could not load file or assembly 'MySql.Data, Version=2.0.50727,  
Culture=neutral' or one of its dependencies.

[code]
  <provider
     name="MySql"
     description="MySQL, MySQL provider v2.0.50727"
     enabled="true"
     default="true"
     assemblyName="MySql.Data, Version=2.0.50727, Culture=neutral,  
PublicKeyToken=c5687fc88969c44d"
     connectionClass="MySql.Data.MySqlClient.MySqlConnection"
     commandClass="MySql.Data.MySqlClient.MySqlCommand"
     parameterClass="MySql.Data.MySqlClient.MySqlParameter"
     parameterDbTypeClass="MySql.Data.MySqlClient.MySqlDbType"
     parameterDbTypeProperty="MySqlDbType"
     dataAdapterClass="MySql.Data.MySqlClient.MySqlDataAdapter"
     commandBuilderClass="MySql.Data.MySqlClient.MySqlCommandBuilder"
     usePositionalParameters="false"
     useParameterPrefixInSql="true"
     useParameterPrefixInParameter="true"
     parameterPrefix="?"
     allowMARS="false"
   />
[/code]


On 21 Apr 2008, at 01:59, Juan Pablo Araya wrote:
> You have to put your sqlmap.config in the web root directory, or in
> bin/debug in the test project.
>
> Anyway, you can change the path of your sqlmap.config. See section
> 4.4.1.2. of the datamapper manual.

Pieter Baele
pieter.baele@telenet.be
LinuxUser: #310384

testing? What's that? If it compiles, it is good, if it boots up it is
perfect.

                         --- Linus Torvalds







Re: iBATIS looking on the wrong place for SqlMap.config SOLVED

Posted by Pieter Baele <pi...@telenet.be>.
Also solved. Only some small path problems left....

I think I gonna like Java more then .NET/C# ;-)



Pieter Baele
pieter.baele@telenet.be

Experience is a hard teacher because she gives the test first, the  
lesson afterward.

On 21 Apr 2008, at 07:25, Pieter Baele wrote:
> I placed the providers en sqlmap config in bin/debug, then it worked.
> It isn't that straight-forward.....
>
> The only problem left now is that it doesn't find the newest  
> mysql.data library I added myself.
> The bytefx provider is really too old .... 2004 (?!) Or is it still  
> a better option for a mysql db?
>
> I have not changed the publickeytoken, can this cause problems? If  
> so, where do I find this token?
> I tried adding the reference provided by the visual studio  
> integration and also 'the hard way' by providing and
> copying the library. None of the two works :-S
>
> Could not load file or assembly 'MySql.Data, Version=2.0.50727,  
> Culture=neutral' or one of its dependencies.
>
> [code]
> <provider
>    name="MySql"
>    description="MySQL, MySQL provider v2.0.50727"
>    enabled="true"
>    default="true"
>    assemblyName="MySql.Data, Version=2.0.50727, Culture=neutral,  
> PublicKeyToken=c5687fc88969c44d"
>    connectionClass="MySql.Data.MySqlClient.MySqlConnection"
>    commandClass="MySql.Data.MySqlClient.MySqlCommand"
>    parameterClass="MySql.Data.MySqlClient.MySqlParameter"
>    parameterDbTypeClass="MySql.Data.MySqlClient.MySqlDbType"
>    parameterDbTypeProperty="MySqlDbType"
>    dataAdapterClass="MySql.Data.MySqlClient.MySqlDataAdapter"
>    commandBuilderClass="MySql.Data.MySqlClient.MySqlCommandBuilder"
>    usePositionalParameters="false"
>    useParameterPrefixInSql="true"
>    useParameterPrefixInParameter="true"
>    parameterPrefix="?"
>    allowMARS="false"
>  />
> [/code]
>
>
> On 21 Apr 2008, at 01:59, Juan Pablo Araya wrote:
>> You have to put your sqlmap.config in the web root directory, or in
>> bin/debug in the test project.
>>
>> Anyway, you can change the path of your sqlmap.config. See section
>> 4.4.1.2. of the datamapper manual.
>
> Pieter Baele
> pieter.baele@telenet.be
> LinuxUser: #310384
>
> testing? What's that? If it compiles, it is good, if it boots up it is
> perfect.
>
>                        --- Linus Torvalds
>
>
>
>
>
>
>


How to map a read-write property of a readonly object?

Posted by smartkid <sk...@gmail.com>.
Hi,

 

         The IBatis.NET does not support mapping a read-write property of a
readonly object.

 

         public class MyNestedClass {

 

                   private String m_Value;

 

                   public String Value { 

get { return m_Value; } 

set { m_Value = value;}

}

 

}

 

public class MyClass {

 

         private MyNestedClass m_Nested = new MyNestedClass();

 

         //A readonly property, no setter needed.

         public MyNestedClasss Nested {

                   get { return m_Nested; }

         }

 

}

 

 

<resultmap class=”MyClass”>

         …

         <result property=”Nested.Value” column=”db_nested_col” …/>

</resultmap>

 

 

The mapping causes:

         IBatisNet.Common.Exceptions.ProbeException: There is no Set member
named ‘Nested’ in class ‘MyClass’.

 

Is there a way to tell the ibatis.net to bypass finding the setter of the
‘Nested’ property ?

 

 

Smartkid

 


Re: 答复: iBATIS looking on the wrong place for SqlMap.config SOLVED (for a part)

Posted by Gilles Bayon <ib...@gmail.com>.
Funny, I used iBATIS with VS 2008 and I haven't noticed this bug

-- 
Cheers,
Gilles

答复: iBATIS looking on the wrong place for SqlMap.config SOLVED (for a part)

Posted by smartkid <sk...@gmail.com>.
Visual Studio 2008 has a bug that the tests are not running within an app
domain rooted in the output directory anymore.
So absolute paths should be used until the bug fixed.

smartkid

-----邮件原件-----
发件人: Clough, Samuel (USPC.PRG.Atlanta) [mailto:Samuel_Clough@princetonrg.
com] 
发送时间: 2008年4月22日 0:10
收件人: user-cs@ibatis.apache.org
主题: RE: iBATIS looking on the wrong place for SqlMap.config SOLVED (for a
part)

I apologize in advance if this isn't relevant because I've only been
half paying attention to this thread....

For iBatis files other than the sql map that has to be in web.config, we
include all files (the mapping and provider file) under a namespace in
the project and mark them as embedded resources for compile and
configure the iBatis files appropriately for embedded resources vs.
separate files.  This gets them into source control with our project and
is also a few less files to deploy and for an admin to accidentally
"tweak" when things aren't working.

Not sure if that works for you or not.

-----Original Message-----
From: Juan Pablo Araya [mailto:juanpablo.araya@gmail.com] 
Sent: Monday, April 21, 2008 11:19 AM
To: user-cs@ibatis.apache.org
Subject: Re: iBATIS looking on the wrong place for SqlMap.config SOLVED
(for a part)

Sorry don't know how to face that. As far as I know when you debug
your application the console app search for these files; now when you
are ready with the project, it searches the sqlmap in the root there
is the .exe executable. It's the same when you debug because the
debugger searches for the root in the application that is stored in
that directory.

Sorry :-(

2008/4/21 Pieter Baele <pi...@telenet.be>:
> I know, there was a small syntax fault. Thx for your help!
>  The only problem left is that I want to place the files in some other
> directory the bin/Debug,
>  these files are not commited to my subversion server by visual svn so
I
> need to store them elsewhere.
>
>
>  Pieter Baele
>  pieter.baele@telenet.be
>
>  Adrian Holovaty: "Having Python produce JavaScript is like using a
> motorized wheelchair because you're too lazy to walk."
>
>
>
>
>  On 21 Apr 2008, at 16:43, Juan Pablo Araya wrote:
>
> > You have to add the MySql.Data reference in your web and test
> > projects.
> >
>
> 
--------------------------------------------------------

Princeton Retirement Group, Inc - Important Terms 
This E-mail is not intended for distribution to, or use by, any person or
entity in any location where such distribution or use would be contrary to
law or regulation, or which would subject Princeton Retirement Group, Inc.
or any affiliate to any registration requirement within such location. 
This E-mail may contain privileged or confidential information or may
otherwise be protected by work product immunity or other legal rules. No
confidentiality or privilege is waived or lost by any mistransmission.
Access, copying or re-use of information by non-intended or non-authorized
recipients is prohibited. If you are not an intended recipient of this
E-mail, please notify the sender, delete it and do not read, act upon,
print, disclose, copy, retain or redistribute any portion of this E-mail. 
The transmission and content of this E-mail cannot be guaranteed to be
secure or error-free. Therefore, we cannot represent that the information in
this E-mail is complete, accurate, uncorrupted, timely or free of viruses,
and Princeton Retirement Group, Inc. cannot accept any liability for E-mails
that have been altered in the course of delivery. Princeton Retirement
Group, Inc. reserves the right to monitor, review and retain all electronic
communications, including E-mail, traveling through its networks and systems
(subject to and in accordance with local laws). If any of your details are
incorrect or if you no longer wish to receive mailings such as this by
E-mail please contact the sender by reply E-mail. 

--------------------------------------------------------


RE: iBATIS looking on the wrong place for SqlMap.config SOLVED (for a part)

Posted by "Clough, Samuel (USPC.PRG.Atlanta)" <Sa...@princetonrg.com>.
I apologize in advance if this isn't relevant because I've only been
half paying attention to this thread....

For iBatis files other than the sql map that has to be in web.config, we
include all files (the mapping and provider file) under a namespace in
the project and mark them as embedded resources for compile and
configure the iBatis files appropriately for embedded resources vs.
separate files.  This gets them into source control with our project and
is also a few less files to deploy and for an admin to accidentally
"tweak" when things aren't working.

Not sure if that works for you or not.

-----Original Message-----
From: Juan Pablo Araya [mailto:juanpablo.araya@gmail.com] 
Sent: Monday, April 21, 2008 11:19 AM
To: user-cs@ibatis.apache.org
Subject: Re: iBATIS looking on the wrong place for SqlMap.config SOLVED
(for a part)

Sorry don't know how to face that. As far as I know when you debug
your application the console app search for these files; now when you
are ready with the project, it searches the sqlmap in the root there
is the .exe executable. It's the same when you debug because the
debugger searches for the root in the application that is stored in
that directory.

Sorry :-(

2008/4/21 Pieter Baele <pi...@telenet.be>:
> I know, there was a small syntax fault. Thx for your help!
>  The only problem left is that I want to place the files in some other
> directory the bin/Debug,
>  these files are not commited to my subversion server by visual svn so
I
> need to store them elsewhere.
>
>
>  Pieter Baele
>  pieter.baele@telenet.be
>
>  Adrian Holovaty: "Having Python produce JavaScript is like using a
> motorized wheelchair because you're too lazy to walk."
>
>
>
>
>  On 21 Apr 2008, at 16:43, Juan Pablo Araya wrote:
>
> > You have to add the MySql.Data reference in your web and test
> > projects.
> >
>
> 
--------------------------------------------------------

Princeton Retirement Group, Inc - Important Terms 
This E-mail is not intended for distribution to, or use by, any person or entity in any location where such distribution or use would be contrary to law or regulation, or which would subject Princeton Retirement Group, Inc. or any affiliate to any registration requirement within such location. 
This E-mail may contain privileged or confidential information or may otherwise be protected by work product immunity or other legal rules. No confidentiality or privilege is waived or lost by any mistransmission. Access, copying or re-use of information by non-intended or non-authorized recipients is prohibited. If you are not an intended recipient of this E-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute any portion of this E-mail. 
The transmission and content of this E-mail cannot be guaranteed to be secure or error-free. Therefore, we cannot represent that the information in this E-mail is complete, accurate, uncorrupted, timely or free of viruses, and Princeton Retirement Group, Inc. cannot accept any liability for E-mails that have been altered in the course of delivery. Princeton Retirement Group, Inc. reserves the right to monitor, review and retain all electronic communications, including E-mail, traveling through its networks and systems (subject to and in accordance with local laws). If any of your details are incorrect or if you no longer wish to receive mailings such as this by E-mail please contact the sender by reply E-mail. 

--------------------------------------------------------

Re: iBATIS looking on the wrong place for SqlMap.config SOLVED (for a part)

Posted by Juan Pablo Araya <ju...@gmail.com>.
Sorry don't know how to face that. As far as I know when you debug
your application the console app search for these files; now when you
are ready with the project, it searches the sqlmap in the root there
is the .exe executable. It's the same when you debug because the
debugger searches for the root in the application that is stored in
that directory.

Sorry :-(

2008/4/21 Pieter Baele <pi...@telenet.be>:
> I know, there was a small syntax fault. Thx for your help!
>  The only problem left is that I want to place the files in some other
> directory the bin/Debug,
>  these files are not commited to my subversion server by visual svn so I
> need to store them elsewhere.
>
>
>  Pieter Baele
>  pieter.baele@telenet.be
>
>  Adrian Holovaty: "Having Python produce JavaScript is like using a
> motorized wheelchair because you're too lazy to walk."
>
>
>
>
>  On 21 Apr 2008, at 16:43, Juan Pablo Araya wrote:
>
> > You have to add the MySql.Data reference in your web and test
> > projects.
> >
>
>

Re: iBATIS looking on the wrong place for SqlMap.config SOLVED (for a part)

Posted by Pieter Baele <pi...@telenet.be>.
I know, there was a small syntax fault. Thx for your help!
The only problem left is that I want to place the files in some other  
directory the bin/Debug,
these files are not commited to my subversion server by visual svn so  
I need to store them elsewhere.

Pieter Baele
pieter.baele@telenet.be

Adrian Holovaty: “Having Python produce JavaScript is like using a  
motorized wheelchair because you’re too lazy to walk.”


On 21 Apr 2008, at 16:43, Juan Pablo Araya wrote:
> You have to add the MySql.Data reference in your web and test
> projects.


Re: iBATIS looking on the wrong place for SqlMap.config SOLVED (for a part)

Posted by Juan Pablo Araya <ju...@gmail.com>.
You have to add the MySql.Data reference in your web and test
projects. It's not enough with just tell the config to use the mysql
provider:

right button on the project (web or test) -> add reference...

Then in the "Browse" tab, add the dll.

I'm not using the mysql library, so I suspect it's a dll in some place
of your HD.

Greetings and sorry for my poor english!


2008/4/21 Pieter Baele <pi...@telenet.be>:
> I placed the providers en sqlmap config in bin/debug, then it worked.
>  It isn't that straight-forward.....
>
>  The only problem left now is that it doesn't find the newest mysql.data
> library I added myself.
>  The bytefx provider is really too old .... 2004 (?!) Or is it still a
> better option for a mysql db?
>
>  I have not changed the publickeytoken, can this cause problems? If so,
> where do I find this token?
>  I tried adding the reference provided by the visual studio integration and
> also 'the hard way' by providing and
>  copying the library. None of the two works :-S
>
>  Could not load file or assembly 'MySql.Data, Version=2.0.50727,
> Culture=neutral' or one of its dependencies.
>
>  [code]
>   <provider
>     name="MySql"
>     description="MySQL, MySQL provider v2.0.50727"
>     enabled="true"
>     default="true"
>     assemblyName="MySql.Data, Version=2.0.50727, Culture=neutral,
> PublicKeyToken=c5687fc88969c44d"
>     connectionClass="MySql.Data.MySqlClient.MySqlConnection"
>     commandClass="MySql.Data.MySqlClient.MySqlCommand"
>     parameterClass="MySql.Data.MySqlClient.MySqlParameter"
>     parameterDbTypeClass="MySql.Data.MySqlClient.MySqlDbType"
>     parameterDbTypeProperty="MySqlDbType"
>     dataAdapterClass="MySql.Data.MySqlClient.MySqlDataAdapter"
>     commandBuilderClass="MySql.Data.MySqlClient.MySqlCommandBuilder"
>     usePositionalParameters="false"
>     useParameterPrefixInSql="true"
>     useParameterPrefixInParameter="true"
>     parameterPrefix="?"
>     allowMARS="false"
>   />
>  [/code]
>
>
>  On 21 Apr 2008, at 01:59, Juan Pablo Araya wrote:
>
> > You have to put your sqlmap.config in the web root directory, or in
> > bin/debug in the test project.
> >
> > Anyway, you can change the path of your sqlmap.config. See section
> > 4.4.1.2. of the datamapper manual.
> >
>
>  Pieter Baele
>  pieter.baele@telenet.be
>  LinuxUser: #310384
>
>  testing? What's that? If it compiles, it is good, if it boots up it is
>  perfect.
>
>                         --- Linus Torvalds
>
>
>
>
>
>
>