yes- it works in fine in SQL Plus and also was using PL/SQL Developer (another 3rd party Oracle GUI interface).
Anthony Dyer Director of Technology, Transportation (847) 954 4526 or (847) 699-6620 <mailto:[email protected]> [email protected] www.logility.com -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Oscar Orduz Acosta Sent: Monday, April 27, 2009 11:42 AM To: [email protected] Subject: [nhusers] Re: Oracke Transaction Hello Anthony: If you execute the select on sqlplus, does it work fine? (by your log you have to replace question mark with 63) Oscar 2009/4/27 Anthony Dyer <[email protected]> I got the logging working. I am getting this error: [ SELECT this_.user_nbr as user1_0_0_, this_.name_txt as name2_0_0_, this_.pass_txt as pass3_0_0_, this_.email_txt as email4_0_0_, this_.user_id as user5_0_0_, this_.style_txt as style6_0_0_, this_.ldap_ind as ldap7_0_0_, this_.sys_user_id as sys8_0_0_ FROM user_def this_ WHERE this_.user_nbr = ? ] Positional parameters: 0 63 System.ArgumentException: identifier type mismatch Parameter name: id at NHibernate.Engine.EntityKey..ctor(Object id, Object identifierSpace, Type clazz, IType identifierType, Boolean isBatchLoadable, ISessionFactoryImplementor factory) in C:\DOWNLOAD\NHibernate\1.2.0.GA\src\NHibernate\Engine\EntityKey.cs:line 37 at NHibernate.Engine.EntityKey..ctor(Object id, IEntityPersister p) in C:\DOWNLOAD\NHibernate\1.2.0.GA\src\NHibernate\Engine\EntityKey.cs:line 54 at NHibernate.Loader.Loader.GetKeyFromResultSet(Int32 i, ILoadable persister, Object id, IDataReader rs, ISessionImplementor session) in C:\DOWNLOAD\NHibernate\1.2.0.GA\src\NHibernate\Loader\Loader.cs:line 843 at NHibernate.Loader.Loader.GetRowFromResultSet(IDataReader resultSet, ISessionImplementor session, QueryParameters queryParameters, LockMode[] lockModeArray, EntityKey optionalObjectKey, IList hydratedObjects, EntityKey[] keys, Boolean returnProxies) in C:\DOWNLOAD\NHibernate\1.2.0.GA\src\NHibernate\Loader\Loader.cs:line 305 at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in C:\DOWNLOAD\NHibernate\1.2.0.GA\src\NHibernate\Loader\Loader.cs:line 447 at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImpl ementor session, QueryParameters queryParameters, Boolean returnProxies) in C:\DOWNLOAD\NHibernate\1.2.0.GA\src\NHibernate\Loader\Loader.cs:line 181 at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in C:\DOWNLOAD\NHibernate\1.2.0.GA\src\NHibernate\Loader\Loader.cs:line 1792 WARN 2009-04-27 11:09:04 - System.ArgumentException: identifier type mismatch Parameter name: id at NHibernate.Engine.EntityKey..ctor(Object id, Object identifierSpace, Type clazz, IType identifierType, Boolean isBatchLoadable, ISessionFactoryImplementor factory) in C:\DOWNLOAD\NHibernate\1.2.0.GA\src\NHibernate\Engine\EntityKey.cs:line 37 at NHibernate.Engine.EntityKey..ctor(Object id, IEntityPersister p) in C:\DOWNLOAD\NHibernate\1.2.0.GA\src\NHibernate\Engine\EntityKey.cs:line 54 at NHibernate.Loader.Loader.GetKeyFromResultSet(Int32 i, ILoadable persister, Object id, IDataReader rs, ISessionImplementor session) in C:\DOWNLOAD\NHibernate\1.2.0.GA\src\NHibernate\Loader\Loader.cs:line 843 at NHibernate.Loader.Loader.GetRowFromResultSet(IDataReader resultSet, ISessionImplementor session, QueryParameters queryParameters, LockMode[] lockModeArray, EntityKey optionalObjectKey, IList hydratedObjects, EntityKey[] keys, Boolean returnProxies) in C:\DOWNLOAD\NHibernate\1.2.0.GA\src\NHibernate\Loader\Loader.cs:line 305 at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in C:\DOWNLOAD\NHibernate\1.2.0.GA\src\NHibernate\Loader\Loader.cs:line 447 at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImpl ementor session, QueryParameters queryParameters, Boolean returnProxies) in C:\DOWNLOAD\NHibernate\1.2.0.GA\src\NHibernate\Loader\Loader.cs:line 181 at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in C:\DOWNLOAD\NHibernate\1.2.0.GA\src\NHibernate\Loader\Loader.cs:line 1792 ERROR2009-04-27 11:09:04 - identifier type mismatch I am not sure what it means- this is on a SELECT against an Oracle 11g database. Anthony Dyer Director of Technology, Transportation (847) 954 4526 or (847) 699-6620 [email protected] www.logility.com -----Original Message----- From: Anthony Dyer [mailto:[email protected]] Sent: Monday, April 27, 2009 11:22 AM To: '[email protected]' Subject: RE: [nhusers] Re: Oracke Transaction Never mind- I got the logging working Anthony Dyer Director of Technology, Transportation (847) 954 4526 or (847) 699-6620 [email protected] www.logility.com -----Original Message----- From: Anthony Dyer [mailto:[email protected]] Sent: Monday, April 27, 2009 9:41 AM To: '[email protected]' Subject: RE: [nhusers] Re: Oracke Transaction I actually have a couple of questions I am trying to get debugging out of log4net - How do I get hibernate to do logging? (we have nothing in the web.config for hibernate, do have for log4net) 2. this is the code that builds the hibernate.config: config.Properties.Add("hibernate.connection.provider", "NHibernate.Connection.DriverConnectionProvider"); switch (connection.DatabaseType) { case "SQL": { config.Properties.Add("hibernate.connection.driver_class", "NHibernate.Driver.SqlClientDriver"); config.Properties.Add("hibernate.dialect", "NHibernate.Dialect.MsSql2000Dialect"); break; } case "ORA": { config.Properties.Add("hibernate.connection.driver_class", "NHibernate.Driver.OracleClientDriver"); config.Properties.Add("hibernate.dialect", "NHibernate.Dialect.OracleDialect"); break; } case "DB2": { config.Properties.Add("hibernate.connection.driver_class", "NHibernate.Driver.DB2Driver"); config.Properties.Add("hibernate.dialect", "NHibernate.Dialect.DB2Dialect"); break; } default: { break; } } config.Properties.Add("hibernate.max_fetch_depth", "-1"); config.Properties.Add("hibernate.connection.connection_string", connection.OrmConnectString); //config.Properties.Add("hibernate.use_reflection_optimizer", "false"); config.Properties.Add("hibernate.show_sql", "true"); // add current assembly this._nhibernateConfiguration = config.AddAssembly(this.GetType().Assembly); // assembly loaded config.SetInterceptor(new Logility.Data.DaoInterceptor()); this._nhibernateFactory = this._nhibernateConfiguration.BuildSessionFactory(); And this is what it looks like after the logic has been processed: (see attached) But after I do the session.Open, I see: See second attachement (hibernate.session) Then when I do the session.BeginTransaction(); I get (see third attachement 9 hibernate.transaction) But the table does exist - It should be referencing a synonym - but I can not see the actual SQL statement (because of logging- which I can not get turned on) Any help will be much appreciated- thanks Anthony Dyer Director of Technology, Transportation (847) 954 4526 or (847) 699-6620 [email protected] www.logility.com -----Original Message----- From: Anthony Dyer [mailto:[email protected]] Sent: Sunday, April 26, 2009 1:23 PM To: [email protected] Subject: RE: [nhusers] Re: Oracke Transaction We are building the config dynamically in the program Thanks for the reply- I will have to check tomorrow I did see where the dialect was being set - but not sure it is correctly set Anthony Dyer Director of Technology, Transportation (847) 954 4526 or (847) 699-6620 [email protected] www.logility.com -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of mhanney Sent: Sunday, April 26, 2009 11:35 AM To: nhusers Subject: [nhusers] Re: Oracke Transaction In your nhibernate.config for Oracle, do you have <property name="connection.isolation"> set, and if so, what value is it set to? Did you try <property name="connection.isolation">ReadCommitted</ property> ? On Apr 24, 11:37 am, AAD <[email protected]> wrote: > I have a system that needs to interface with SQL Server or Oracle 11g. > In the code, there is the following: > > session = Data.DaoFactory.OpenSession(systemInstance); > transaction = session.BeginTransaction(); > > when I run and am connected to SQL Server, the BeginTransaction() > works fine, with I am connected to Oracle, I get an error: > > + IsolationLevel > + '((NHibernate.Transaction.AdoTransaction) > (transaction)).IsolationLevel' threw an exception of type > 'System.Data.OracleClient.OracleException' > System.Data.IsolationLevel {System.Data.OracleClient.OracleException} > > any suggestion on how to go about debugging? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
