From: Julian M. (JIRA) <nh...@gm...> - 2011-04-10 00:30:54
|
[ http://216.121.112.228/browse/NH-2514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julian Maughan resolved NH-2514. -------------------------------- Resolution: Cannot Reproduce > CLONE -log4net DEBUG enabled and the query parameters Log parameters problem > ---------------------------------------------------------------------------- > > Key: NH-2514 > URL: http://216.121.112.228/browse/NH-2514 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.Alpha1 > Reporter: Joao Braganca > Priority: Major > Attachments: gorbach-NHibernateSandbox-d80415c.zip > > > Hi, > You have a problem in for example HQLQueryPlan class for example method void PerformList(QueryParameters queryParameters, ISessionImplementor session, IList results) > when the log debug is on. > if (log.IsDebugEnabled) > { > log.Debug("find: " + SourceQuery); > queryParameters.LogParameters(session.Factory); > } > LogParameters method is throwing an exception in certain cases. The exception is the following: > Could not execute query[SQL: SQL not available] > NHibernate.Exceptions.GenericADOException: Could not execute query[SQL: SQL not available] ---> System.InvalidCastException: Unable to cast object of type 'System.Int32' to type 'System.String'. > at NHibernate.Type.AbstractStringType.ToString(Object val) in C:\Program Files\NHibernatesvn\trunk\nhibernate\src\NHibernate\Type\AbstractStringType.cs:line 32 > at NHibernate.Type.NullableType.ToLoggableString(Object value, ISessionFactoryImplementor factory) in C:\Program Files\NHibernatesvn\trunk\nhibernate\src\NHibernate\Type\NullableType.cs:line 109 > at NHibernate.Impl.Printer.ToString(IDictionary`2 namedTypedValues) in C:\Program Files\NHibernatesvn\trunk\nhibernate\src\NHibernate\Impl\Printer.cs:line 71 > at NHibernate.Engine.QueryParameters.LogParameters(ISessionFactoryImplementor factory) in C:\Program Files\NHibernatesvn\trunk\nhibernate\src\NHibernate\Engine\QueryParameters.cs:line 213 > at NHibernate.Engine.Query.HQLQueryPlan.PerformList(QueryParameters queryParameters, ISessionImplementor session, IList results) in C:\Program Files\NHibernatesvn\trunk\nhibernate\src\NHibernate\Engine\Query\HQLQueryPlan.cs:line 254 > at NHibernate.Impl.SessionImpl.List(String query, QueryParameters queryParameters, IList results) in C:\Program Files\NHibernatesvn\trunk\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 629 > > Do you want me to create the unit test? I did not want to since the unit test will simply pass since for it not to pass, you must change the App.config to use the following > settings: > <log4net debug="true"> > <root> > <priority value="DEBUG" /> > <appender-ref ref="console" /> > </root> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |