This article is a mirror article of machine translation, please click here to jump to the original article.

View: 20363|Reply: 0

[Source] [Spring.Data.Common.dbproviders.xml] line 766

[Copy link]
Posted on 5/22/2017 4:35:49 PM | | | |
Error thrown by a dependency of object 'MySql-5.2.3' defined in 'assembly [Spring.Data, Version=2.0.0.40000, Culture=neutral, PublicKeyToken=null], resource [ Spring.Data.Common.dbproviders.xml] line 766' : Unsatisfied dependency expressed through constructor argument with index 2 of type [System.Type] : Could not convert constructor argument value [MySql.Data.MySqlClient.MySqlConnection, MySql.Data, Version=5.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d] to required type [System.Type] : Cannot convert property value of type [System.String] to required type [System.Type] for property ''.
while resolving 'constructor argument with name dbmetadata' to 'Spring.Data.Common.DbMetadata#DF06CA' defined in 'assembly [Spring.Data, Version=2.0.0.40000, Culture=neutral, PublicKeyToken=null], resource [Spring.Data.Common.dbproviders.xml] line 766'
Descrip{filtering}tion: 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.

The framework spring+nhibernate+mysql, the platform application (web) and mysql are separate, and are two connected servers.


After the deployment is completed, the above error has been reported, and then, my local computer is win10, and the server is win2008 r2.

Well, my native IIS is running normally, why is it not normal on the deployed server, I am not too familiar with this framework,

I don't know if it's a database problem, or, I'm missing some references, or a configuration file problem, or...

I tried various methods on the Internet, but they didn't solve it!

To this end, I also wrote a mini program, which is sent to the application server, and then run, connect to the remote database, and then query, as shown in the figure below:



No problem, you can connect to the remote database...

Suddenly, I thought about it, the native test, the application and the database are on the same computer, whether to install any driver, not to reference some mysql dll

Then, on my local computer, I looked at the mysql I installed, and I installed some things, as shown in the figure below, and found that: Connector/Net 6.9.9,



On the application server, there is no installation of this thing, and then, download this separate driver from the mysql official website,

Download Address:
Tourists, if you want to see the hidden content of this post, pleaseReply


Download and install complete, restart IIS, and solve the problem!!




Previous:mysql-5.7.17 ODBC installation failure reinstall tutorial
Next:.net/c# to obtain the machine's unique identifier
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com