Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# pandp 1/17/2006 5:57 AM
Hello!
After source install I've got error in browser
Server error in '/' application
Description: Error processing request.
Error Message: HTTP 500.

Stack Trace:

NHibernate.ADOException: Could not execute query ---> NHibernate.ADOException: cannot open connection ---> NHibernate.ADOException: Could not create connection from Driver ---> System.InvalidCastException: Cannot cast from source type to destination type.

With connection string
server=localhost
database=avancode
uid=avancode
pwd=


What sould I Verify?
# martijnb 1/17/2006 9:32 AM
What database are you using? It's important to activate the right NHibernate block in the web.config for the appropriate database.
After that, you have to make sure to have a correct connection string for that database.
# pandp 1/18/2006 1:02 AM
martijnbWhat database are you using? It's important to activate the right NHibernate block in the web.config for the appropriate database.
After that, you have to make sure to have a correct connection string for that database.

I use NHibernate.Dialect.MySQLDialect block in Web.config file
Tip: when I use incorrect password I took "Access denied..." Exception

# pandp 1/18/2006 1:10 AM
By the way I have no problems running 0.8.2 on mono 1.1.7 and mysql-3.23.58
# pandp 1/18/2006 5:52 AM
When I go /Install/Install.aspx in browser I've got
NHibernate.ADOException: Could not create connection from Driver ---> System.InvalidCastException: Cannot cast from source type to destination type. in <0x0003c> System.Convert:ToInt64 (System.Object value, IFormatProvider provider) in <0x0001b> System.Convert:ToInt64 (System.Object value) in <0x00056> MySql.Data.MySqlClient.NativeDriver:Configure (MySql.Data.MySqlClient.MySqlConnection connection) in <0x000fd> MySql.Data.MySqlClient.MySqlConnection:Open () in <0x0007e> NHibernate.Connection.DriverConnectionProvider:GetConnection ()--- End of inner exception stack trace --- in <0x000c9> NHibernate.Connection.DriverConnectionProvider:GetConnection () in <0x00061> Cuyahoga.Core.Util.DatabaseUtil:GetAssemblyVersion (System.String assembly) in <0x0002f> Cuyahoga.Core.Service.DatabaseInstaller:CheckCurrentVersionInDatabase () in <0x000af> Cuyahoga.Core.Service.DatabaseInstaller:.ctor (System.String installRootDirectory, System.Reflection.Assembly assembly) in <0x000f1> Cuyahoga.Web.Install.Install:Page_Load (System.Object sender, System.EventArgs e)
# pandp 1/18/2006 6:48 AM
I switch to pgsql and all goes well!
# martijnb 1/18/2006 9:19 AM
Great that it works with Postgres, but MySQL should also work fine in that case, unless there are issues with Mono 1.1.13 and the MySQL 1.0.4 connector.
The error indicates that no connection to the database could be made. Usually this is caused by a typo in the connection string or a MySQL server that doesn't allow remote connections.

Btw, you mentioned that you were running 0.8.2 on MySQL 3.23.53. It comes at a little surprise that this works, because MySQL is only supported and tested with version 4.0 and higher. With the bizarre amount of breaking changes with each new MySQL version I didn't expect that 3.23.53 would work at all :).