Hi Mustafa,
Can you also post the code where you execute the query? Also include the
code for your session management.
Thank you
On Monday, May 26, 2014 1:54:16 AM UTC-7, Mustafa BALAY wrote:
>
> I've got a really simple class that is giving a strange error. It's quite
> simple one and has no relationship with another table. The strangest part
> is that seems to happen randomly but especially when my website had heavy
> load of requests... I use Nhibernate that is version 2.0.1.400.
>
> I had a search on net about it and most of them who had same problem say
> that is highly a bug of Nhibernate on forums... Anyone had have this kind
> of problem before? and came with a solution?
>
> Could this be a problem with the database connection, pooling stuff ???
>
> The craziest thing about it, only occurs sometimes and so the website goes
> down.. after IIS reset, all works fine, but then who knows when it's gonna
> occur again!
>
> I'm getting:
>
> Server Error in '/' Application.
>
> System.Web.Services.Protocols.SoapException: Server was unable to process
> request. ---> System.Exception: Unipa Belediye Master Select<T>(string
> p_sql,bool closeSession) de Sorun Var ---> NHibernate.ADOException: could not
> execute query[ select gelirgenel0_.id as id13_, gelirgenel0_.ParametreAdi as
> Parametr2_13_, gelirgenel0_.KullanimNedeni as Kullanim3_13_,
> gelirgenel0_.Degeri as Degeri13_ from Parametre.GelirGenelParametre
> gelirgenel0_ where (id in(6 , 7 , 62 , 65)) ][SQL: select gelirgenel0_.id as
> id13_, gelirgenel0_.ParametreAdi as Parametr2_13_,
> gelirgenel0_.KullanimNedeni as Kullanim3_13_, gelirgenel0_.Degeri as
> Degeri13_ from Parametre.GelirGenelParametre gelirgenel0_ where (id in(6 , 7
> , 62 , 65))] ---> System.IndexOutOfRangeException: id13_
> at System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)
> at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
> at NHibernate.Driver.NHybridDataReader.GetOrdinal(String name)
> at NHibernate.Type.NullableType.NullSafeGet(IDataReader rs, String name)
> at NHibernate.Type.NullableType.NullSafeGet(IDataReader rs, String[] names,
> ISessionImplementor session, Object owner)
> at NHibernate.Loader.Loader.GetKeyFromResultSet(Int32 i, ILoadable
> persister, Object id, IDataReader rs, ISessionImplementor session)
> at NHibernate.Loader.Loader.GetRowFromResultSet(IDataReader resultSet,
> ISessionImplementor session, QueryParameters queryParameters, LockMode[]
> lockModeArray, EntityKey optionalObjectKey, IList hydratedObjects,
> EntityKey[] keys, Boolean returnProxies)
> 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)
> --- End of inner exception stack trace ---
> at NHibernate.Loader.Loader.DoList(ISessionImplementor session,
> QueryParameters queryParameters)
> at NHibernate.Loader.Loader.List(ISessionImplementor session,
> QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes)
> at NHibernate.Hql.Classic.QueryTranslator.List(ISessionImplementor session,
> QueryParameters queryParameters)
> at NHibernate.Engine.Query.HQLQueryPlan.PerformList(QueryParameters
> queryParameters, ISessionImplementor session, IList results)
> at NHibernate.Impl.SessionImpl.List(String query, QueryParameters
> queryParameters, IList results)
> at NHibernate.Impl.SessionImpl.List[T](String query, QueryParameters
> parameters)
> at NHibernate.Impl.QueryImpl.List[T]()
> at UnipaBelediyeMaster.Master.Select[T](String p_sql, Boolean closeSession)
> in
> D:\BelediyeNet\Web\Menu.Src\UnipaBelediyeMaster\UnipaBelediyeMasterr\Master.cs:line
> 449
> --- End of inner exception stack trace ---
> at UnipaBelediyeMaster.Master.Select[T](String p_sql, Boolean closeSession)
> in
> D:\BelediyeNet\Web\Menu.Src\UnipaBelediyeMaster\UnipaBelediyeMasterr\Master.cs:line
> 461
> at Service.GelirGenelParametreAlIdler(String idler) in
> c:\webServiceBornovaBel\App_Code\Service.cs:line 1044
> --- End of inner exception stack trace ---
>
> and below is my entity class:
>
> [Serializable]
> public class GelirGenelParametre
> {
> #region Member Variables
> protected decimal _id;
> protected string _parametreadi;
> protected string _kullanimnedeni;
> protected string _degeri;
> #endregion
> #region Constructors
>
> public GelirGenelParametre() {}
>
> public GelirGenelParametre(decimal id, string parametreadi, string
> kullanimnedeni, string degeri)
> {
> this._id= id;
> this._parametreadi= parametreadi<s
>
> ...
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.