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, please Reply
Download and install complete, restart IIS, and solve the problem!!
|