[nhibernate-issues] [JIRA] Created: (NH-784) NHibernate should
throw exception on failed driver load
From: NHibernate J. <mik...@us...> - 2006-10-31 07:09:33
|
NHibernate should throw exception on failed driver load ------------------------------------------------------- Key: NH-784 URL: http://jira.nhibernate.org/browse/NH-784 Project: NHibernate Type: Improvement Components: Data Providers Reporter: Al Twohill Priority: Trivial For full background on where this issue arises from, see http://forum.hibernate.org/viewtopic.php?t=966582&highlight= When Configuration.Configure() is called, if NHibernate is unable to load a database driver for whatever reason (missing dll, incorrect hibernate.cfg.xml, etc) it falls back to returning a UserSuppliedConnectionProvider without an ADO.Net connection attached to it. This causes any use of Session (eg accessing database) to throw an exception. This is extremely difficult to debug, as there is absolutely no indication as to why a UserSuppliedConnectionProvider is returned. I propose that instead of returning a UserSuppliedConnectionProvider, NHibernate should throw an exception along the lines of "Cannot Load Driver", and give a reason why. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: NHibernate J. <mik...@us...> - 2006-11-01 20:57:37
|
[ http://jira.nhibernate.org/browse/NH-784?page=comments#action_14262 ] Fabio Maulo commented on NH-784: -------------------------------- Until now NHb work like Hibernate using UserSuppliedConnectionProvider. The possible solutions, i see, are: - Make DriverConnectionProvider default if no connection.provider is specified in the mapping until DriverConnectionProvider is the unique provider of NHb. - Change the exception of UserSuppliedConnectionProvider adding "Config connection.provider property was not specified". - Exception if an unknown property was found in session-factory section. I think the last option is the best to prevent typing error. > NHibernate should throw exception on failed driver load > ------------------------------------------------------- > > Key: NH-784 > URL: http://jira.nhibernate.org/browse/NH-784 > Project: NHibernate > Type: Improvement > Components: Data Providers > Reporter: Al Twohill > Priority: Trivial > > For full background on where this issue arises from, see http://forum.hibernate.org/viewtopic.php?t=966582&highlight= > When Configuration.Configure() is called, if NHibernate is unable to load a database driver for whatever reason (missing dll, incorrect hibernate.cfg.xml, etc) it falls back to returning a UserSuppliedConnectionProvider without an ADO.Net connection attached to it. This causes any use of Session (eg accessing database) to throw an exception. This is extremely difficult to debug, as there is absolutely no indication as to why a UserSuppliedConnectionProvider is returned. > I propose that instead of returning a UserSuppliedConnectionProvider, NHibernate should throw an exception along the lines of "Cannot Load Driver", and give a reason why. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: NHibernate J. <mik...@us...> - 2006-11-01 21:02:38
|
[ http://jira.nhibernate.org/browse/NH-784?page=comments#action_14263 ] Fabio Maulo commented on NH-784: -------------------------------- One more option. - Change the nhibernate-configuration.xsd > NHibernate should throw exception on failed driver load > ------------------------------------------------------- > > Key: NH-784 > URL: http://jira.nhibernate.org/browse/NH-784 > Project: NHibernate > Type: Improvement > Components: Data Providers > Reporter: Al Twohill > Priority: Trivial > > For full background on where this issue arises from, see http://forum.hibernate.org/viewtopic.php?t=966582&highlight= > When Configuration.Configure() is called, if NHibernate is unable to load a database driver for whatever reason (missing dll, incorrect hibernate.cfg.xml, etc) it falls back to returning a UserSuppliedConnectionProvider without an ADO.Net connection attached to it. This causes any use of Session (eg accessing database) to throw an exception. This is extremely difficult to debug, as there is absolutely no indication as to why a UserSuppliedConnectionProvider is returned. > I propose that instead of returning a UserSuppliedConnectionProvider, NHibernate should throw an exception along the lines of "Cannot Load Driver", and give a reason why. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: NHibernate J. <mik...@us...> - 2006-11-02 06:26:33
|
[ http://jira.nhibernate.org/browse/NH-784?page=comments#action_14270 ] Sergey Koshcheyev commented on NH-784: -------------------------------------- Another one: - Do not make any connection provider the default and complain if it was not set. > NHibernate should throw exception on failed driver load > ------------------------------------------------------- > > Key: NH-784 > URL: http://jira.nhibernate.org/browse/NH-784 > Project: NHibernate > Type: Improvement > Components: Data Providers > Reporter: Al Twohill > Priority: Trivial > > For full background on where this issue arises from, see http://forum.hibernate.org/viewtopic.php?t=966582&highlight= > When Configuration.Configure() is called, if NHibernate is unable to load a database driver for whatever reason (missing dll, incorrect hibernate.cfg.xml, etc) it falls back to returning a UserSuppliedConnectionProvider without an ADO.Net connection attached to it. This causes any use of Session (eg accessing database) to throw an exception. This is extremely difficult to debug, as there is absolutely no indication as to why a UserSuppliedConnectionProvider is returned. > I propose that instead of returning a UserSuppliedConnectionProvider, NHibernate should throw an exception along the lines of "Cannot Load Driver", and give a reason why. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: NHibernate J. <mik...@us...> - 2006-11-02 14:35:40
|
[ http://jira.nhibernate.org/browse/NH-784?page=comments#action_14280 ] Fabio Maulo commented on NH-784: -------------------------------- Yes, but is different than H3.2 work. Any way... i think that: - Exception if an unknown property was found in session-factory section. and/or - Change the nhibernate-configuration.xsd is a good improvement to prevent some others issue. > NHibernate should throw exception on failed driver load > ------------------------------------------------------- > > Key: NH-784 > URL: http://jira.nhibernate.org/browse/NH-784 > Project: NHibernate > Type: Improvement > Components: Data Providers > Reporter: Al Twohill > Priority: Trivial > > For full background on where this issue arises from, see http://forum.hibernate.org/viewtopic.php?t=966582&highlight= > When Configuration.Configure() is called, if NHibernate is unable to load a database driver for whatever reason (missing dll, incorrect hibernate.cfg.xml, etc) it falls back to returning a UserSuppliedConnectionProvider without an ADO.Net connection attached to it. This causes any use of Session (eg accessing database) to throw an exception. This is extremely difficult to debug, as there is absolutely no indication as to why a UserSuppliedConnectionProvider is returned. > I propose that instead of returning a UserSuppliedConnectionProvider, NHibernate should throw an exception along the lines of "Cannot Load Driver", and give a reason why. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
[nhibernate-issues] [JIRA] Updated: (NH-784) NHibernate should
throw exception on failed driver load
From: NHibernate J. <mik...@us...> - 2006-11-13 18:38:43
|
[ http://jira.nhibernate.org/browse/NH-784?page=all ] Sergey Koshcheyev updated NH-784: --------------------------------- Fix Version: 1.2.0.CR1 Version: 1.2.0.Beta2 > NHibernate should throw exception on failed driver load > ------------------------------------------------------- > > Key: NH-784 > URL: http://jira.nhibernate.org/browse/NH-784 > Project: NHibernate > Type: Improvement > Components: Data Providers > Versions: 1.2.0.Beta2 > Reporter: Al Twohill > Priority: Trivial > Fix For: 1.2.0.CR1 > > For full background on where this issue arises from, see http://forum.hibernate.org/viewtopic.php?t=966582&highlight= > When Configuration.Configure() is called, if NHibernate is unable to load a database driver for whatever reason (missing dll, incorrect hibernate.cfg.xml, etc) it falls back to returning a UserSuppliedConnectionProvider without an ADO.Net connection attached to it. This causes any use of Session (eg accessing database) to throw an exception. This is extremely difficult to debug, as there is absolutely no indication as to why a UserSuppliedConnectionProvider is returned. > I propose that instead of returning a UserSuppliedConnectionProvider, NHibernate should throw an exception along the lines of "Cannot Load Driver", and give a reason why. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: NHibernate J. <mik...@us...> - 2006-11-13 20:18:41
|
[ http://jira.nhibernate.org/browse/NH-784?page=comments#action_14381 ] Al Twohill commented on NH-784: ------------------------------- One of the problems as I see it is that there are too many possible causes of this problem: -incorrect value in DriverConnectionProvider field (ie spelling error) -unknown property in session-factory section -missing database driver -missing supporting dlls These can all trigger this issue, and require different resolutions to be made. Because of this I beleive that an exception should always be thrown unless a successful connection is able to be made (be it user supplied or NHb configured). > NHibernate should throw exception on failed driver load > ------------------------------------------------------- > > Key: NH-784 > URL: http://jira.nhibernate.org/browse/NH-784 > Project: NHibernate > Type: Improvement > Components: Data Providers > Versions: 1.2.0.Beta2 > Reporter: Al Twohill > Priority: Trivial > Fix For: 1.2.0.CR1 > > For full background on where this issue arises from, see http://forum.hibernate.org/viewtopic.php?t=966582&highlight= > When Configuration.Configure() is called, if NHibernate is unable to load a database driver for whatever reason (missing dll, incorrect hibernate.cfg.xml, etc) it falls back to returning a UserSuppliedConnectionProvider without an ADO.Net connection attached to it. This causes any use of Session (eg accessing database) to throw an exception. This is extremely difficult to debug, as there is absolutely no indication as to why a UserSuppliedConnectionProvider is returned. > I propose that instead of returning a UserSuppliedConnectionProvider, NHibernate should throw an exception along the lines of "Cannot Load Driver", and give a reason why. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: NHibernate J. <mik...@us...> - 2006-12-11 15:17:35
|
[ http://jira.nhibernate.org/browse/NH-784?page=comments#action_14580 ] Sergey Koshcheyev commented on NH-784: -------------------------------------- The last two problems should actually lead to an exception being thrown. If they don't in your case, I'd like to see a test case. > NHibernate should throw exception on failed driver load > ------------------------------------------------------- > > Key: NH-784 > URL: http://jira.nhibernate.org/browse/NH-784 > Project: NHibernate > Type: Improvement > Components: Data Providers > Versions: 1.2.0.Beta2 > Reporter: Al Twohill > Priority: Trivial > Fix For: 1.2.0.Beta3 > > For full background on where this issue arises from, see http://forum.hibernate.org/viewtopic.php?t=966582&highlight= > When Configuration.Configure() is called, if NHibernate is unable to load a database driver for whatever reason (missing dll, incorrect hibernate.cfg.xml, etc) it falls back to returning a UserSuppliedConnectionProvider without an ADO.Net connection attached to it. This causes any use of Session (eg accessing database) to throw an exception. This is extremely difficult to debug, as there is absolutely no indication as to why a UserSuppliedConnectionProvider is returned. > I propose that instead of returning a UserSuppliedConnectionProvider, NHibernate should throw an exception along the lines of "Cannot Load Driver", and give a reason why. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: NHibernate J. <mik...@us...> - 2006-12-20 07:31:29
|
[ http://jira.nhibernate.org/browse/NH-784?page=all ] Sergey Koshcheyev resolved NH-784: ---------------------------------- Fix Version: (was: 1.2.0.Beta3) Resolution: Cannot Reproduce Resolving since no test case supplied. > NHibernate should throw exception on failed driver load > ------------------------------------------------------- > > Key: NH-784 > URL: http://jira.nhibernate.org/browse/NH-784 > Project: NHibernate > Type: Improvement > Components: Data Providers > Versions: 1.2.0.Beta2 > Reporter: Al Twohill > Priority: Trivial > > For full background on where this issue arises from, see http://forum.hibernate.org/viewtopic.php?t=966582&highlight= > When Configuration.Configure() is called, if NHibernate is unable to load a database driver for whatever reason (missing dll, incorrect hibernate.cfg.xml, etc) it falls back to returning a UserSuppliedConnectionProvider without an ADO.Net connection attached to it. This causes any use of Session (eg accessing database) to throw an exception. This is extremely difficult to debug, as there is absolutely no indication as to why a UserSuppliedConnectionProvider is returned. > I propose that instead of returning a UserSuppliedConnectionProvider, NHibernate should throw an exception along the lines of "Cannot Load Driver", and give a reason why. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |