I am using nHibernate 2.0.1 with Spring.net.  I was playing around
with statistics.  However, whenever, I turn on statictics, I get error
executing any SQL.  The error goes away if I comment out the like that
says generate statistics.  The error is

NHibernate.Exceptions.GenericADOException was unhandled by user code
  Message="Unable to perform find[SQL: SQL not available]"
  Source="NHibernate"
  StackTrace:
       at NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria,
IList results)
       at NHibernate.Impl.CriteriaImpl.List(IList results)
       at NHibernate.Impl.CriteriaImpl.List[T]()
       at
Brierley.LoyaltyNavigator.DataModel.DataAccess.UserRoleAssocDAO.RetrieveByUserId
(Int64 userId) in C:\ProductDevelopment\LoyaltyWare\LoyaltyWare
3.3\Loyalty Navigator\Brierley.LoyaltyNavigator\DataModel\DataAccess
\Impl\UserRoleAssocDAO.cs:line 48
       at
CompositionAopProxy_702d2d1e696c40b48c646c16850b1fd6.RetrieveByUserId
(Int64 userId)
       at
Brierley.LoyaltyNavigator.DataModel.DataAccess.LNUserDAO.Populate
(ILNUser user) in C:\ProductDevelopment\LoyaltyWare\LoyaltyWare
3.3\Loyalty Navigator\Brierley.LoyaltyNavigator\DataModel\DataAccess
\Impl\LNUserDAO.cs:line 62
       at
Brierley.LoyaltyNavigator.DataModel.DataAccess.LNUserDAO.Retrieve
(String userName, String password) in C:\ProductDevelopment\LoyaltyWare
\LoyaltyWare 3.3\Loyalty Navigator\Brierley.LoyaltyNavigator\DataModel
\DataAccess\Impl\LNUserDAO.cs:line 199
       at CompositionAopProxy_dda6ebee0bed4abaad33b625b8643774.Retrieve
(String userName, String password)
       at
Brierley.LoyaltyNavigator.DataModel.LNDataModelService.GetUser(String
userName, String password) in C:\ProductDevelopment\LoyaltyWare
\LoyaltyWare 3.3\Loyalty Navigator\Brierley.LoyaltyNavigator\DataModel
\LNDataModelService.cs:line 291
       at CompositionAopProxy_9f78490bb6c742d8a582679ef5ef969f.GetUser
(String userName, String password)
       at (Object , Object[] )
       at Spring.Reflection.Dynamic.SafeMethod.Invoke(Object target,
Object[] arguments)
       at Spring.Aop.Framework.DynamicMethodInvocation.InvokeJoinpoint
()
       at Spring.Aop.Framework.AbstractMethodInvocation.Proceed()
       at Spring.Aspects.Logging.SimpleLoggingAdvice.InvokeUnderLog
(IMethodInvocation invocation, ILog log)

My configuration file looks like this.


<object id="NHibernateSessionFactory"
type="Spring.Data.NHibernate.LocalSessionFactoryObject,
Spring.Data.NHibernate20">
    <property name="DbProvider" ref="DbProvider"/>
    <property name="MappingAssemblies">
      <list>
        <value>Brierley.LoyaltyNavigator</value>
      </list>
    </property>
    <property name="ExposeTransactionAwareSessionFactory"
value="true" />
    <property name="HibernateProperties">
      <dictionary>
        <entry key="connection.provider"
value="NHibernate.Connection.DriverConnectionProvider"/>
        <entry key="dialect" value="${db.dialect}"/>
        <entry key="connection.driver_class" value="$
{db.driver_class}"/>
        <entry key="cache.use_second_level_cache" value="true"/>
        <entry key="cache.provider_class"
value="NHibernate.Caches.SysCache.SysCacheProvider,
NHibernate.Caches.SysCache"/>
        <entry key="cache.use_query_cache" value="true"/
>
        <entry key="query.substitutions" value="True=1;False=0"/
>
        <entry key="show_sql" value="true"/>
        <entry key="generate_statistics" value="true"/>
        <!--<entry key="hibernate.hbm2ddl.auto" value="create"/>-->
      </dictionary>
    </property>
  </object>

Can anybody help?

Thanks.

Waqar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to