fxl31 / mybatisnet

Automatically exported from code.google.com/p/mybatisnet
0 stars 0 forks source link

Error configuring DAO with .NET 4. Cause: Ambiguous match found. #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

We are using IBatis Data Access 1.9.2 since a long time with .NET 3.5SP1 and 
it's working fine.
Also we decide to transfer part of the project to .NET 4 and we have some 
errors in the IBatis Builder.Configure method.

Please see the error below:

{"Error configuring DAO. Cause: Ambiguous match found."}
{"Ambiguous match found."}
   at IBatisNet.DataAccess.Configuration.Dao.Initialize(DaoManager daoManager)
   at IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.ParseDaoFactory(ConfigurationScope configurationScope, DaoManager daoManager)
   at IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.GetContexts(ConfigurationScope configurationScope)
   at IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.GetConfig(ConfigurationScope configurationScope)
   at IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.BuildDaoManagers(XmlDocument document, Boolean useConfigFileWatcher)
   at IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.Configure(XmlDocument document)

We know that the problem comes from .NET 4.

Can you look on this problem because it's CRITICAL.

Thanks, David.

Thank you,

Original issue reported on code.google.com by david.be...@gmail.com on 8 Feb 2011 at 2:08

GoogleCodeExporter commented 9 years ago
i find it,also

Original comment by susua...@gmail.com on 19 Aug 2011 at 2:36

GoogleCodeExporter commented 9 years ago
Any update on this issue? Since we are also facing the same issue and now we 
need to update our framework to 4.0.

Original comment by jayainfi...@gmail.com on 11 Nov 2011 at 11:35

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have noticed that the error is within the Castle.DynamicProxy dll.  More 
specifically, the class file in that dll: 
Castle.DynamicProxy.Builder.CodeBuilder.SimpleAST.LockBlockExpression invokes 
with reflection the method System.Threading.Monitor.Enter without specifying 
(new in .net 4.0) the overload arguments. Changing that line of code to: 
gen.Emit(OpCodes.Call, typeof(Monitor).GetMethod("Enter", new Type[] { 
typeof(object) })); should solve the problem.

Original comment by Benjamin...@gmail.com on 30 Nov 2011 at 9:23

GoogleCodeExporter commented 9 years ago
In the mean time, you can set the target framework in the properties window for 
your project to .net 3.5 and that will solve the issue as well.

Original comment by Benjamin...@gmail.com on 30 Nov 2011 at 9:24

GoogleCodeExporter commented 9 years ago
Is there any chance for newer version in the nearing future?

Original comment by jayainfi...@gmail.com on 12 Dec 2011 at 10:36