Crash when unable to find connection driver

Bug #986616 reported by Adam Connelly
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DB Version
New
Low
Unassigned

Bug Description

dbversion crashes with the following stack trace if FluentNHibernate isn't able to load the correct connection driver. If possible it should detect the problem and provide a more user friendly error message.

Unhandled Exception: FluentNHibernate.Cfg.FluentConfigurationException: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.

  * Database was not configured through Database method.
 ---> NHibernate.HibernateException: Could not create the driver from NHibernate.Driver.NpgsqlDriver. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Configuration.ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider 'Npgsql'.
  at System.Data.Common.DbProviderFactories.GetFactory (System.String providerInvariantName) [0x00000] in <filename unknown>:0
  at NHibernate.Driver.ReflectionBasedDriver..ctor (System.String providerInvariantName, System.String driverAssemblyName, System.String connectionTypeName, System.String commandTypeName) [0x00000] in <filename unknown>:0
  at NHibernate.Driver.NpgsqlDriver..ctor () [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
  at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
  at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0
  at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in <filename unknown>:0
  at System.Activator.CreateInstance (System.Type type) [0x00000] in <filename unknown>:0
  at NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance (System.Type type) [0x00000] in <filename unknown>:0
  at NHibernate.Connection.ConnectionProvider.ConfigureDriver (IDictionary`2 settings) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at NHibernate.Connection.ConnectionProvider.ConfigureDriver (IDictionary`2 settings) [0x00000] in <filename unknown>:0
  at NHibernate.Connection.ConnectionProvider.Configure (IDictionary`2 settings) [0x00000] in <filename unknown>:0
  at NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider (IDictionary`2 settings) [0x00000] in <filename unknown>:0
  at NHibernate.Cfg.SettingsFactory.BuildSettings (IDictionary`2 properties) [0x00000] in <filename unknown>:0
  at NHibernate.Cfg.Configuration.BuildSettings () [0x00000] in <filename unknown>:0
  at NHibernate.Cfg.Configuration.BuildSessionFactory () [0x00000] in <filename unknown>:0
  at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory () [0x00000] in <filename unknown>:0
  at dbversion.Session.SessionFactoryProvider.CreateSessionFactory () [0x00000] in <filename unknown>:0
  at dbversion.Console.Command.History.HistoryCommand.Execute (System.String[] args, dbversion.Console.Command.History.HistoryArguments arguments, IDatabaseArchive archive) [0x00000] in <filename unknown>:0
  at dbversion.Console.Command.ConnectionCommandBase`1[dbversion.Console.Command.History.HistoryArguments].Execute (System.String[] args) [0x00000] in <filename unknown>:0
  at dbversion.Console.Command.CommandManager.Execute (System.String[] args) [0x00000] in <filename unknown>:0
  at dbversion.Console.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0

  * Database was not configured through Database method.

Tags: dbversion
Changed in dbversion:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.