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 -~----------~----~----~----~------~----~------~--~---
