-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: Issues with ICriteria.SetMaxResults in NHibernate 1.2
PostPosted: Tue Nov 14, 2006 7:48 pm 
Newbie

Joined: Tue Nov 14, 2006 7:35 pm
Posts: 6
Location: Mexico
Hi, could somebody help me please?
I'm trying to retrieve user information from my database with the following ICriteria:

Code:
IList users=session.CreateCriteria(typeof(User))
        .SetFirstResult(firstResult)
        .SetMaxResults(maxResults)
        .List();


But it doesn't work unless I comment the .SetMaxResults line. If I throw the exception, I get the following:

Code:
could not execute query[SQL: SELECT this_.USER_ID as USER1_2_0_, this_.NICKNAME as NICKNAME2_0_, this_.PASSWORD as PASSWORD2_0_, this_.NAME as NAME2_0_, this_.LASTNAME as LASTNAME2_0_, this_.EMAIL as EMAIL2_0_, this_.SECRET_QUESTION as SECRET7_2_0_, this_.SECRET_ANSWER as SECRET8_2_0_, this_.ENABLED as ENABLED2_0_ FROM USR this_]


I'm using NHibernate 1.2.0.2001. Everithing was correctly setup, it only doesn't work if I write the SetMaxResults line.
Please help. Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 15, 2006 11:30 am 
Beginner
Beginner

Joined: Thu Oct 19, 2006 1:03 pm
Posts: 29
Those two methods for some reason throw exceptions if the firstResult index is greater than the max(index) of your IList - similarily the setmaxresults throws an exception if max(index) of IList is less than maxResults...

Might be a bug, or unwanted behaviour.

Writing a MembershipProvider?
Code:
         //Set the bound given by the parameters of the method
         if (totalRecords > (pageIndex * pageSize))
         {
            query.SetFirstResult(pageIndex * pageSize);

            if (totalRecords > pageSize)
               query.SetMaxResults(pageSize);
         }


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 15, 2006 1:29 pm 
Newbie

Joined: Tue Nov 14, 2006 7:35 pm
Posts: 6
Location: Mexico
Thanks! That simple code snippet was just what I need.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 16, 2006 7:20 pm 
Newbie

Joined: Tue Nov 14, 2006 7:35 pm
Posts: 6
Location: Mexico
mmmhhh... nop, I still have the same problem... everything was going right when totalRecords < pageSize, so the code didn't enter to SetMaxResults, but when I have totalRecords > pageSize, I get an exception again :( Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 17, 2006 2:50 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Please show the inner exceptions and the debug-level log.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 17, 2006 1:21 pm 
Newbie

Joined: Tue Nov 14, 2006 7:35 pm
Posts: 6
Location: Mexico
all of it? ok, here it goes, it's the debug log just for one time i ran the application:

Code:
2006-11-17 11:16:57,491 [5684] INFO  NHibernate.Cfg.Environment - NHibernate 1.2.0.2001 (1.2.0.Beta1)
2006-11-17 11:16:57,491 [5684] INFO  NHibernate.Cfg.Environment - Bytecode provider name : lcg
2006-11-17 11:16:57,491 [5684] INFO  NHibernate.Cfg.Environment - Using reflection optimizer
2006-11-17 11:16:57,491 [5684] INFO  NHibernate.Cfg.Configuration - Searching for mapped documents in assembly: CentralMedia.Pmat
2006-11-17 11:16:57,507 [5684] INFO  NHibernate.Cfg.Configuration - Found mapping document in assembly: CentralMedia.Pmat.Vo.Log.hbm.xml
2006-11-17 11:16:57,507 [5684] INFO  NHibernate.Cfg.Configuration - Mapping resource: CentralMedia.Pmat.Vo.Log.hbm.xml
2006-11-17 11:16:57,554 [5684] INFO  NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.OracleDialect
2006-11-17 11:16:57,601 [5684] INFO  NHibernate.Cfg.HbmBinder - Mapping class: CentralMedia.Pmat.Vo.Log -> PMATLOG
2006-11-17 11:16:57,632 [5684] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Id -> PMATLOG_ID, type: Int64
2006-11-17 11:16:57,647 [5684] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Date -> LOG_DATE, type: DateTime
2006-11-17 11:16:57,647 [5684] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Description -> DESCRIPTION, type: String
2006-11-17 11:16:57,647 [5684] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: User -> USER_ID, type: User
2006-11-17 11:16:57,663 [5684] INFO  NHibernate.Cfg.HbmBinder - Mapping joined-subclass: CentralMedia.Pmat.Vo.LoginLog -> LOGIN_PMATLOG
2006-11-17 11:16:57,663 [5684] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Success -> SUCCESS, type: Boolean
2006-11-17 11:16:57,663 [5684] INFO  NHibernate.Cfg.Configuration - Found mapping document in assembly: CentralMedia.Pmat.Vo.User.hbm.xml
2006-11-17 11:16:57,663 [5684] INFO  NHibernate.Cfg.Configuration - Mapping resource: CentralMedia.Pmat.Vo.User.hbm.xml
2006-11-17 11:16:57,663 [5684] INFO  NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.OracleDialect
2006-11-17 11:16:57,663 [5684] INFO  NHibernate.Cfg.HbmBinder - Mapping class: CentralMedia.Pmat.Vo.User -> USR
2006-11-17 11:16:57,663 [5684] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Id -> USER_ID, type: Int32
2006-11-17 11:16:57,663 [5684] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Username -> NICKNAME, type: String
2006-11-17 11:16:57,663 [5684] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Password -> PASSWORD, type: String
2006-11-17 11:16:57,663 [5684] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Name -> NAME, type: String
2006-11-17 11:16:57,663 [5684] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Lastname -> LASTNAME, type: String
2006-11-17 11:16:57,663 [5684] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Email -> EMAIL, type: String
2006-11-17 11:16:57,663 [5684] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: SecretQuestion -> SECRET_QUESTION, type: String
2006-11-17 11:16:57,663 [5684] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: SecretAnswer -> SECRET_ANSWER, type: String
2006-11-17 11:16:57,663 [5684] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Enabled -> ENABLED, type: Boolean
2006-11-17 11:16:57,663 [5684] INFO  NHibernate.Cfg.Configuration - Searching for mapped documents in assembly: CentralMedia.Common
2006-11-17 11:16:57,663 [5684] INFO  NHibernate.Cfg.Configuration - processing one-to-many association mappings
2006-11-17 11:16:57,663 [5684] INFO  NHibernate.Cfg.Configuration - processing one-to-one association property references
2006-11-17 11:16:57,663 [5684] INFO  NHibernate.Cfg.Configuration - processing foreign key constraints
2006-11-17 11:16:57,679 [5684] DEBUG NHibernate.Cfg.Configuration - resolving reference to class: User
2006-11-17 11:16:57,679 [5684] DEBUG NHibernate.Cfg.Configuration - resolving reference to class: Log
2006-11-17 11:16:57,694 [5684] INFO  NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.OracleDialect
2006-11-17 11:16:57,694 [5684] INFO  NHibernate.Connection.ConnectionProviderFactory - Intitializing connection provider: NHibernate.Connection.DriverConnectionProvider
2006-11-17 11:16:57,694 [5684] INFO  NHibernate.Connection.ConnectionProvider - Configuring ConnectionProvider
2006-11-17 11:16:57,694 [5684] INFO  NHibernate.Cfg.SettingsFactory - Optimize cache for minimal puts: False
2006-11-17 11:16:57,694 [5684] INFO  NHibernate.Cfg.SettingsFactory - echoing all SQL to stdout
2006-11-17 11:16:57,694 [5684] INFO  NHibernate.Cfg.SettingsFactory - Query language substitutions: {}
2006-11-17 11:16:57,694 [5684] INFO  NHibernate.Cfg.SettingsFactory - cache provider: NHibernate.Cache.HashtableCacheProvider
2006-11-17 11:16:57,710 [5684] INFO  NHibernate.Impl.SessionFactoryImpl - building session factory
2006-11-17 11:16:57,710 [5684] DEBUG NHibernate.Impl.SessionFactoryImpl - instantiating session factory with properties: {hibernate.connection.driver_class=NHibernate.Driver.OracleClientDriver, hibernate.dialect=NHibernate.Dialect.OracleDialect, hibernate.connection.provider=NHibernate.Connection.DriverConnectionProvider, hibernate.use_reflection_optimizer=true, hibernate.show_sql=true, hibernate.connection.connection_string=Server=ORCL;UID=pmatdb;PWD=laquesea;}
2006-11-17 11:16:57,835 [5684] DEBUG NHibernate.Impl.SessionFactoryObjectFactory - initializing class SessionFactoryObjectFactory
2006-11-17 11:16:57,835 [5684] DEBUG NHibernate.Impl.SessionFactoryObjectFactory - registered: bb9e731b42944c019c577405a67e1b72(unnamed)
2006-11-17 11:16:57,835 [5684] INFO  NHibernate.Impl.SessionFactoryObjectFactory - no name configured
2006-11-17 11:16:57,929 [5684] DEBUG NHibernate.SqlCommand.SqlSelectBuilder - The initial capacity was set too low at: 9 for the SelectSqlBuilder that needed a capacity of: 10 for the table PMATLOG log0_, LOGIN_PMATLOG log0_1_
2006-11-17 11:16:57,944 [5684] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity CentralMedia.Pmat.Vo.Log: SELECT log0_.PMATLOG_ID as PMATLOG1_0_0_, log0_.LOG_DATE as LOG2_0_0_, log0_.DESCRIPTION as DESCRIPT3_0_0_, log0_.USER_ID as USER4_0_0_, log0_1_.SUCCESS as SUCCESS1_0_, decode (log0_.PMATLOG_ID, log0_1_.PMATLOG_ID, 1,0 ) as clazz_0_ FROM PMATLOG log0_, LOGIN_PMATLOG log0_1_ WHERE log0_.PMATLOG_ID=log0_1_.PMATLOG_ID(+) AND log0_.PMATLOG_ID=?
2006-11-17 11:16:57,944 [5684] DEBUG NHibernate.SqlCommand.SqlSelectBuilder - The initial capacity was set too low at: 9 for the SelectSqlBuilder that needed a capacity of: 10 for the table PMATLOG log0_, LOGIN_PMATLOG log0_1_
2006-11-17 11:16:57,944 [5684] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity CentralMedia.Pmat.Vo.Log: SELECT log0_.PMATLOG_ID as PMATLOG1_0_0_, log0_.LOG_DATE as LOG2_0_0_, log0_.DESCRIPTION as DESCRIPT3_0_0_, log0_.USER_ID as USER4_0_0_, log0_1_.SUCCESS as SUCCESS1_0_, decode (log0_.PMATLOG_ID, log0_1_.PMATLOG_ID, 1,0 ) as clazz_0_ FROM PMATLOG log0_, LOGIN_PMATLOG log0_1_ WHERE log0_.PMATLOG_ID=log0_1_.PMATLOG_ID(+) AND log0_.PMATLOG_ID=?
2006-11-17 11:16:57,944 [5684] DEBUG NHibernate.SqlCommand.SqlSelectBuilder - The initial capacity was set too low at: 9 for the SelectSqlBuilder that needed a capacity of: 11 for the table PMATLOG log0_, LOGIN_PMATLOG log0_1_
2006-11-17 11:16:57,944 [5684] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity CentralMedia.Pmat.Vo.Log: SELECT log0_.PMATLOG_ID as PMATLOG1_0_0_, log0_.LOG_DATE as LOG2_0_0_, log0_.DESCRIPTION as DESCRIPT3_0_0_, log0_.USER_ID as USER4_0_0_, log0_1_.SUCCESS as SUCCESS1_0_, decode (log0_.PMATLOG_ID, log0_1_.PMATLOG_ID, 1,0 ) as clazz_0_ FROM PMATLOG log0_, LOGIN_PMATLOG log0_1_ WHERE log0_.PMATLOG_ID=log0_1_.PMATLOG_ID(+) AND log0_.PMATLOG_ID=? for update
2006-11-17 11:16:57,944 [5684] DEBUG NHibernate.SqlCommand.SqlSelectBuilder - The initial capacity was set too low at: 9 for the SelectSqlBuilder that needed a capacity of: 11 for the table PMATLOG log0_, LOGIN_PMATLOG log0_1_
2006-11-17 11:16:57,944 [5684] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity CentralMedia.Pmat.Vo.Log: SELECT log0_.PMATLOG_ID as PMATLOG1_0_0_, log0_.LOG_DATE as LOG2_0_0_, log0_.DESCRIPTION as DESCRIPT3_0_0_, log0_.USER_ID as USER4_0_0_, log0_1_.SUCCESS as SUCCESS1_0_, decode (log0_.PMATLOG_ID, log0_1_.PMATLOG_ID, 1,0 ) as clazz_0_ FROM PMATLOG log0_, LOGIN_PMATLOG log0_1_ WHERE log0_.PMATLOG_ID=log0_1_.PMATLOG_ID(+) AND log0_.PMATLOG_ID=? for update nowait
2006-11-17 11:16:57,944 [5684] DEBUG NHibernate.SqlCommand.SqlSelectBuilder - The initial capacity was set too low at: 9 for the SelectSqlBuilder that needed a capacity of: 10 for the table LOGIN_PMATLOG loginlog0_, PMATLOG loginlog0_1_
2006-11-17 11:16:57,944 [5684] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity CentralMedia.Pmat.Vo.LoginLog: SELECT loginlog0_.PMATLOG_ID as PMATLOG1_0_0_, loginlog0_.SUCCESS as SUCCESS1_0_, loginlog0_1_.LOG_DATE as LOG2_0_0_, loginlog0_1_.DESCRIPTION as DESCRIPT3_0_0_, loginlog0_1_.USER_ID as USER4_0_0_ FROM LOGIN_PMATLOG loginlog0_, PMATLOG loginlog0_1_ WHERE loginlog0_.PMATLOG_ID=loginlog0_1_.PMATLOG_ID AND loginlog0_.PMATLOG_ID=?
2006-11-17 11:16:57,944 [5684] DEBUG NHibernate.SqlCommand.SqlSelectBuilder - The initial capacity was set too low at: 9 for the SelectSqlBuilder that needed a capacity of: 10 for the table LOGIN_PMATLOG loginlog0_, PMATLOG loginlog0_1_
2006-11-17 11:16:57,944 [5684] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity CentralMedia.Pmat.Vo.LoginLog: SELECT loginlog0_.PMATLOG_ID as PMATLOG1_0_0_, loginlog0_.SUCCESS as SUCCESS1_0_, loginlog0_1_.LOG_DATE as LOG2_0_0_, loginlog0_1_.DESCRIPTION as DESCRIPT3_0_0_, loginlog0_1_.USER_ID as USER4_0_0_ FROM LOGIN_PMATLOG loginlog0_, PMATLOG loginlog0_1_ WHERE loginlog0_.PMATLOG_ID=loginlog0_1_.PMATLOG_ID AND loginlog0_.PMATLOG_ID=?
2006-11-17 11:16:57,944 [5684] DEBUG NHibernate.SqlCommand.SqlSelectBuilder - The initial capacity was set too low at: 9 for the SelectSqlBuilder that needed a capacity of: 11 for the table LOGIN_PMATLOG loginlog0_, PMATLOG loginlog0_1_
2006-11-17 11:16:57,944 [5684] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity CentralMedia.Pmat.Vo.LoginLog: SELECT loginlog0_.PMATLOG_ID as PMATLOG1_0_0_, loginlog0_.SUCCESS as SUCCESS1_0_, loginlog0_1_.LOG_DATE as LOG2_0_0_, loginlog0_1_.DESCRIPTION as DESCRIPT3_0_0_, loginlog0_1_.USER_ID as USER4_0_0_ FROM LOGIN_PMATLOG loginlog0_, PMATLOG loginlog0_1_ WHERE loginlog0_.PMATLOG_ID=loginlog0_1_.PMATLOG_ID AND loginlog0_.PMATLOG_ID=? for update
2006-11-17 11:16:57,944 [5684] DEBUG NHibernate.SqlCommand.SqlSelectBuilder - The initial capacity was set too low at: 9 for the SelectSqlBuilder that needed a capacity of: 11 for the table LOGIN_PMATLOG loginlog0_, PMATLOG loginlog0_1_
2006-11-17 11:16:57,944 [5684] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity CentralMedia.Pmat.Vo.LoginLog: SELECT loginlog0_.PMATLOG_ID as PMATLOG1_0_0_, loginlog0_.SUCCESS as SUCCESS1_0_, loginlog0_1_.LOG_DATE as LOG2_0_0_, loginlog0_1_.DESCRIPTION as DESCRIPT3_0_0_, loginlog0_1_.USER_ID as USER4_0_0_ FROM LOGIN_PMATLOG loginlog0_, PMATLOG loginlog0_1_ WHERE loginlog0_.PMATLOG_ID=loginlog0_1_.PMATLOG_ID AND loginlog0_.PMATLOG_ID=? for update nowait
2006-11-17 11:16:57,944 [5684] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity CentralMedia.Pmat.Vo.User: SELECT user0_.USER_ID as USER1_2_0_, user0_.NICKNAME as NICKNAME2_0_, user0_.PASSWORD as PASSWORD2_0_, user0_.NAME as NAME2_0_, user0_.LASTNAME as LASTNAME2_0_, user0_.EMAIL as EMAIL2_0_, user0_.SECRET_QUESTION as SECRET7_2_0_, user0_.SECRET_ANSWER as SECRET8_2_0_, user0_.ENABLED as ENABLED2_0_ FROM USR user0_ WHERE user0_.USER_ID=?
2006-11-17 11:16:57,960 [5684] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity CentralMedia.Pmat.Vo.User: SELECT user0_.USER_ID as USER1_2_0_, user0_.NICKNAME as NICKNAME2_0_, user0_.PASSWORD as PASSWORD2_0_, user0_.NAME as NAME2_0_, user0_.LASTNAME as LASTNAME2_0_, user0_.EMAIL as EMAIL2_0_, user0_.SECRET_QUESTION as SECRET7_2_0_, user0_.SECRET_ANSWER as SECRET8_2_0_, user0_.ENABLED as ENABLED2_0_ FROM USR user0_ WHERE user0_.USER_ID=?
2006-11-17 11:16:57,960 [5684] DEBUG NHibernate.SqlCommand.SqlSelectBuilder - The initial capacity was set too low at: 8 for the SelectSqlBuilder that needed a capacity of: 9 for the table USR user0_
2006-11-17 11:16:57,960 [5684] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity CentralMedia.Pmat.Vo.User: SELECT user0_.USER_ID as USER1_2_0_, user0_.NICKNAME as NICKNAME2_0_, user0_.PASSWORD as PASSWORD2_0_, user0_.NAME as NAME2_0_, user0_.LASTNAME as LASTNAME2_0_, user0_.EMAIL as EMAIL2_0_, user0_.SECRET_QUESTION as SECRET7_2_0_, user0_.SECRET_ANSWER as SECRET8_2_0_, user0_.ENABLED as ENABLED2_0_ FROM USR user0_ WHERE user0_.USER_ID=? for update
2006-11-17 11:16:57,960 [5684] DEBUG NHibernate.SqlCommand.SqlSelectBuilder - The initial capacity was set too low at: 8 for the SelectSqlBuilder that needed a capacity of: 9 for the table USR user0_
2006-11-17 11:16:57,960 [5684] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity CentralMedia.Pmat.Vo.User: SELECT user0_.USER_ID as USER1_2_0_, user0_.NICKNAME as NICKNAME2_0_, user0_.PASSWORD as PASSWORD2_0_, user0_.NAME as NAME2_0_, user0_.LASTNAME as LASTNAME2_0_, user0_.EMAIL as EMAIL2_0_, user0_.SECRET_QUESTION as SECRET7_2_0_, user0_.SECRET_ANSWER as SECRET8_2_0_, user0_.ENABLED as ENABLED2_0_ FROM USR user0_ WHERE user0_.USER_ID=? for update nowait
2006-11-17 11:16:57,960 [5684] DEBUG NHibernate.Impl.SessionFactoryImpl - Instantiated session factory
2006-11-17 11:16:57,960 [5684] DEBUG NHibernate.Impl.SessionImpl - opened session
2006-11-17 11:16:57,960 [5684] DEBUG NHibernate.Transaction.AdoTransaction - begin
2006-11-17 11:16:57,976 [5684] DEBUG NHibernate.Connection.DriverConnectionProvider - Obtaining IDbConnection from Driver
2006-11-17 11:16:58,132 [5684] DEBUG NHibernate.Impl.SessionImpl - find: select COUNT(*) from User user where user.Enabled=:enabled
2006-11-17 11:16:58,147 [5684] DEBUG NHibernate.Engine.QueryParameters - named parameters: {enabled=True}
2006-11-17 11:16:58,163 [5684] DEBUG NHibernate.Hql.QueryTranslator - compiling query
2006-11-17 11:16:58,241 [5684] DEBUG NHibernate.Impl.SessionImpl - flushing session
2006-11-17 11:16:58,241 [5684] DEBUG NHibernate.Impl.SessionImpl - Flushing entities and processing referenced collections
2006-11-17 11:16:58,241 [5684] DEBUG NHibernate.Impl.SessionImpl - Processing unreferenced collections
2006-11-17 11:16:58,241 [5684] DEBUG NHibernate.Impl.SessionImpl - scheduling collection removes/(re)creates/updates
2006-11-17 11:16:58,241 [5684] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
2006-11-17 11:16:58,241 [5684] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
2006-11-17 11:16:58,241 [5684] DEBUG NHibernate.Impl.SessionImpl - dont need to execute flush
2006-11-17 11:16:58,257 [5684] DEBUG NHibernate.Hql.QueryTranslator - HQL: select COUNT(*) from CentralMedia.Pmat.Vo.User user where user.Enabled=:enabled
2006-11-17 11:16:58,257 [5684] DEBUG NHibernate.Hql.QueryTranslator - SQL: select COUNT(*) as x0_0_ from USR user0_ where (user0_.ENABLED=?)
2006-11-17 11:16:58,272 [5684] DEBUG NHibernate.Impl.BatcherImpl - Opened new IDbCommand, open IDbCommands :1
2006-11-17 11:16:58,272 [5684] DEBUG NHibernate.Impl.BatcherImpl - Building an IDbCommand object for the SqlString: select COUNT(*) as x0_0_ from USR user0_ where (user0_.ENABLED=?)
2006-11-17 11:16:58,272 [5684] DEBUG NHibernate.Loader.Loader - BindNamedParameters() True -> enabled [0]
2006-11-17 11:16:58,272 [5684] DEBUG NHibernate.Type.BooleanType - binding 'True' to parameter: 0
2006-11-17 11:16:58,272 [5684] INFO  NHibernate.Loader.Loader - select COUNT(*) as x0_0_ from USR user0_ where (user0_.ENABLED=:p0)
2006-11-17 11:16:58,272 [5684] DEBUG NHibernate.SQL - select COUNT(*) as x0_0_ from USR user0_ where (user0_.ENABLED=:p0); :p0 = 'True'
2006-11-17 11:16:58,272 [5684] DEBUG NHibernate.Impl.BatcherImpl - Opened Reader, open Readers :1
2006-11-17 11:16:58,288 [5684] DEBUG NHibernate.Loader.Loader - processing result set
2006-11-17 11:16:58,288 [5684] DEBUG NHibernate.Loader.Loader - result set row: 0
2006-11-17 11:16:58,288 [5684] DEBUG NHibernate.Loader.Loader - result row:
2006-11-17 11:16:58,288 [5684] DEBUG NHibernate.Type.Int32Type - returning '6' as column: x0_0_
2006-11-17 11:16:58,288 [5684] DEBUG NHibernate.Loader.Loader - done processing result set (1 rows)
2006-11-17 11:16:58,288 [5684] DEBUG NHibernate.Impl.BatcherImpl - Closed Reader, open Readers :0
2006-11-17 11:16:58,288 [5684] DEBUG NHibernate.Impl.BatcherImpl - Closed IDbCommand, open IDbCommands :0
2006-11-17 11:16:58,288 [5684] DEBUG NHibernate.Impl.SessionImpl - initializing non-lazy collections
2006-11-17 11:16:58,288 [5684] DEBUG NHibernate.Transaction.AdoTransaction - commit
2006-11-17 11:16:58,288 [5684] DEBUG NHibernate.Impl.SessionImpl - flushing session
2006-11-17 11:16:58,304 [5684] DEBUG NHibernate.Impl.SessionImpl - Flushing entities and processing referenced collections
2006-11-17 11:16:58,304 [5684] DEBUG NHibernate.Impl.SessionImpl - Processing unreferenced collections
2006-11-17 11:16:58,304 [5684] DEBUG NHibernate.Impl.SessionImpl - scheduling collection removes/(re)creates/updates
2006-11-17 11:16:58,304 [5684] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
2006-11-17 11:16:58,304 [5684] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
2006-11-17 11:16:58,304 [5684] DEBUG NHibernate.Impl.SessionImpl - executing flush
2006-11-17 11:16:58,304 [5684] DEBUG NHibernate.Impl.SessionImpl - post flush
2006-11-17 11:16:58,304 [5684] DEBUG NHibernate.Impl.SessionImpl - transaction completion
2006-11-17 11:16:58,304 [5684] DEBUG NHibernate.Transaction.AdoTransaction - running AdoTransaction.Dispose()
2006-11-17 11:16:58,304 [5684] DEBUG NHibernate.Impl.SessionImpl - closing session
2006-11-17 11:16:58,304 [5684] DEBUG NHibernate.Impl.SessionImpl - disconnecting session
2006-11-17 11:16:58,304 [5684] DEBUG NHibernate.Connection.ConnectionProvider - Closing connection
2006-11-17 11:16:58,304 [5684] DEBUG NHibernate.Impl.SessionImpl - transaction completion
2006-11-17 11:16:58,319 [5684] DEBUG NHibernate.Impl.SessionImpl - opened session
2006-11-17 11:16:58,319 [5684] DEBUG NHibernate.Transaction.AdoTransaction - begin
2006-11-17 11:16:58,319 [5684] DEBUG NHibernate.Connection.DriverConnectionProvider - Obtaining IDbConnection from Driver
2006-11-17 11:16:58,335 [5684] DEBUG NHibernate.Impl.SessionImpl - flushing session
2006-11-17 11:16:58,335 [5684] DEBUG NHibernate.Impl.SessionImpl - Flushing entities and processing referenced collections
2006-11-17 11:16:58,335 [5684] DEBUG NHibernate.Impl.SessionImpl - Processing unreferenced collections
2006-11-17 11:16:58,335 [5684] DEBUG NHibernate.Impl.SessionImpl - scheduling collection removes/(re)creates/updates
2006-11-17 11:16:58,335 [5684] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
2006-11-17 11:16:58,335 [5684] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
2006-11-17 11:16:58,335 [5684] DEBUG NHibernate.Impl.SessionImpl - dont need to execute flush
2006-11-17 11:16:58,351 [5684] DEBUG NHibernate.Impl.BatcherImpl - Opened new IDbCommand, open IDbCommands :1
2006-11-17 11:16:58,351 [5684] DEBUG NHibernate.Impl.BatcherImpl - Building an IDbCommand object for the SqlString: select * from ( SELECT this_.USER_ID as USER1_2_0_, this_.NICKNAME as NICKNAME2_0_, this_.PASSWORD as PASSWORD2_0_, this_.NAME as NAME2_0_, this_.LASTNAME as LASTNAME2_0_, this_.EMAIL as EMAIL2_0_, this_.SECRET_QUESTION as SECRET7_2_0_, this_.SECRET_ANSWER as SECRET8_2_0_, this_.ENABLED as ENABLED2_0_ FROM USR this_ WHERE this_.ENABLED = ? ) where rownum <= ?
2006-11-17 11:16:58,351 [5684] DEBUG NHibernate.Type.BooleanType - binding 'True' to parameter: 0
2006-11-17 11:16:58,351 [5684] DEBUG NHibernate.Util.ADOExceptionReporter - SQL Exception
System.IndexOutOfRangeException: Invalid index 1 for this OracleParameterCollection with Count=1.
   at System.Data.OracleClient.OracleParameterCollection.RangeCheck(Int32 index)
   at System.Data.OracleClient.OracleParameterCollection.GetParameter(Int32 index)
   at System.Data.Common.DbParameterCollection.System.Collections.IList.get_Item(Int32 index)
   at NHibernate.Loader.Loader.BindLimitParameters(IDbCommand st, Int32 index, RowSelection selection, ISessionImplementor session)
   at NHibernate.Loader.Loader.PrepareQueryCommand(SqlString sqlString, QueryParameters parameters, Boolean scroll, ISessionImplementor session)
2006-11-17 11:16:58,351 [5684] WARN  NHibernate.Util.ADOExceptionReporter - System.IndexOutOfRangeException: Invalid index 1 for this OracleParameterCollection with Count=1.
   at System.Data.OracleClient.OracleParameterCollection.RangeCheck(Int32 index)
   at System.Data.OracleClient.OracleParameterCollection.GetParameter(Int32 index)
   at System.Data.Common.DbParameterCollection.System.Collections.IList.get_Item(Int32 index)
   at NHibernate.Loader.Loader.BindLimitParameters(IDbCommand st, Int32 index, RowSelection selection, ISessionImplementor session)
   at NHibernate.Loader.Loader.PrepareQueryCommand(SqlString sqlString, QueryParameters parameters, Boolean scroll, ISessionImplementor session)
2006-11-17 11:16:58,351 [5684] ERROR NHibernate.Util.ADOExceptionReporter - Invalid index 1 for this OracleParameterCollection with Count=1.
2006-11-17 11:16:58,351 [5684] DEBUG NHibernate.Impl.BatcherImpl - Closed IDbCommand, open IDbCommands :0
2006-11-17 11:16:58,351 [5684] DEBUG NHibernate.Util.ADOExceptionReporter - could not execute query [SELECT this_.USER_ID as USER1_2_0_, this_.NICKNAME as NICKNAME2_0_, this_.PASSWORD as PASSWORD2_0_, this_.NAME as NAME2_0_, this_.LASTNAME as LASTNAME2_0_, this_.EMAIL as EMAIL2_0_, this_.SECRET_QUESTION as SECRET7_2_0_, this_.SECRET_ANSWER as SECRET8_2_0_, this_.ENABLED as ENABLED2_0_ FROM USR this_ WHERE this_.ENABLED = ?]
System.IndexOutOfRangeException: Invalid index 1 for this OracleParameterCollection with Count=1.
   at System.Data.OracleClient.OracleParameterCollection.RangeCheck(Int32 index)
   at System.Data.OracleClient.OracleParameterCollection.GetParameter(Int32 index)
   at System.Data.Common.DbParameterCollection.System.Collections.IList.get_Item(Int32 index)
   at NHibernate.Loader.Loader.BindLimitParameters(IDbCommand st, Int32 index, RowSelection selection, ISessionImplementor session)
   at NHibernate.Loader.Loader.PrepareQueryCommand(SqlString sqlString, QueryParameters parameters, Boolean scroll, ISessionImplementor session)
   at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies)
   at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies)
   at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)
2006-11-17 11:16:58,351 [5684] WARN  NHibernate.Util.ADOExceptionReporter - System.IndexOutOfRangeException: Invalid index 1 for this OracleParameterCollection with Count=1.
   at System.Data.OracleClient.OracleParameterCollection.RangeCheck(Int32 index)
   at System.Data.OracleClient.OracleParameterCollection.GetParameter(Int32 index)
   at System.Data.Common.DbParameterCollection.System.Collections.IList.get_Item(Int32 index)
   at NHibernate.Loader.Loader.BindLimitParameters(IDbCommand st, Int32 index, RowSelection selection, ISessionImplementor session)
   at NHibernate.Loader.Loader.PrepareQueryCommand(SqlString sqlString, QueryParameters parameters, Boolean scroll, ISessionImplementor session)
   at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies)
   at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies)
   at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)
2006-11-17 11:16:58,351 [5684] ERROR NHibernate.Util.ADOExceptionReporter - Invalid index 1 for this OracleParameterCollection with Count=1.
2006-11-17 11:16:58,351 [5684] DEBUG NHibernate.Transaction.AdoTransaction - rollback
2006-11-17 11:16:58,351 [5684] DEBUG NHibernate.Transaction.AdoTransaction - running AdoTransaction.Dispose()
2006-11-17 11:16:58,351 [5684] DEBUG NHibernate.Impl.SessionImpl - transaction completion
2006-11-17 11:16:58,351 [5684] DEBUG NHibernate.Impl.SessionImpl - closing session
2006-11-17 11:16:58,351 [5684] DEBUG NHibernate.Impl.SessionImpl - disconnecting session
2006-11-17 11:16:58,351 [5684] DEBUG NHibernate.Connection.ConnectionProvider - Closing connection
2006-11-17 11:16:58,351 [5684] DEBUG NHibernate.Impl.SessionImpl - transaction completion
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Impl.SessionImpl - opened session
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Transaction.AdoTransaction - begin
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Connection.DriverConnectionProvider - Obtaining IDbConnection from Driver
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Impl.SessionImpl - find: select COUNT(*) from User user where user.Enabled=:enabled
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Engine.QueryParameters - named parameters: {enabled=True}
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Impl.SessionImpl - flushing session
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Impl.SessionImpl - Flushing entities and processing referenced collections
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Impl.SessionImpl - Processing unreferenced collections
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Impl.SessionImpl - scheduling collection removes/(re)creates/updates
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Impl.SessionImpl - dont need to execute flush
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Hql.QueryTranslator - HQL: select COUNT(*) from CentralMedia.Pmat.Vo.User user where user.Enabled=:enabled
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Hql.QueryTranslator - SQL: select COUNT(*) as x0_0_ from USR user0_ where (user0_.ENABLED=?)
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Impl.BatcherImpl - Opened new IDbCommand, open IDbCommands :1
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Impl.BatcherImpl - Building an IDbCommand object for the SqlString: select COUNT(*) as x0_0_ from USR user0_ where (user0_.ENABLED=?)
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Loader.Loader - BindNamedParameters() True -> enabled [0]
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.Type.BooleanType - binding 'True' to parameter: 0
2006-11-17 11:16:58,366 [5684] INFO  NHibernate.Loader.Loader - select COUNT(*) as x0_0_ from USR user0_ where (user0_.ENABLED=:p0)
2006-11-17 11:16:58,366 [5684] DEBUG NHibernate.SQL - select COUNT(*) as x0_0_ from USR user0_ where (user0_.ENABLED=:p0); :p0 = 'True'
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Impl.BatcherImpl - Opened Reader, open Readers :1
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Loader.Loader - processing result set
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Loader.Loader - result set row: 0
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Loader.Loader - result row:
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Type.Int32Type - returning '6' as column: x0_0_
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Loader.Loader - done processing result set (1 rows)
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Impl.BatcherImpl - Closed Reader, open Readers :0
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Impl.BatcherImpl - Closed IDbCommand, open IDbCommands :0
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Impl.SessionImpl - initializing non-lazy collections
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Transaction.AdoTransaction - commit
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Impl.SessionImpl - flushing session
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Impl.SessionImpl - Flushing entities and processing referenced collections
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Impl.SessionImpl - Processing unreferenced collections
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Impl.SessionImpl - scheduling collection removes/(re)creates/updates
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Impl.SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Impl.SessionImpl - executing flush
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Impl.SessionImpl - post flush
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Impl.SessionImpl - transaction completion
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Transaction.AdoTransaction - running AdoTransaction.Dispose()
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Impl.SessionImpl - closing session
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Impl.SessionImpl - disconnecting session
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Connection.ConnectionProvider - Closing connection
2006-11-17 11:16:58,382 [5684] DEBUG NHibernate.Impl.SessionImpl - transaction completion


Thanks 4 your time!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 17, 2006 3:17 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Ahh, upgrade to Beta2, the issue is fixed there.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.