From: NHibernate J. <mik...@us...> - 2006-11-20 13:38:31
|
[ http://jira.nhibernate.org/browse/NH-818?page=comments#action_14443 ] Simon commented on NH-818: -------------------------- Hi Sergey, thanks you got it. It's fixed. > NHibernate.JetDriver Not Working at all in 1.2.0.Beta2 (encounters System.NullReferenceException) > ------------------------------------------------------------------------------------------------- > > Key: NH-818 > URL: http://jira.nhibernate.org/browse/NH-818 > Project: NHibernate > Type: Bug > Components: Core > Versions: 1.2.0.Beta2 > Reporter: Simon > Fix For: 1.2.0.CR1 > > Using simple test case (from ForumQuestions of NHibernate.Examples, changing driver to JetDriver) > ISession session = sessions.OpenSession(); > OfferType offerType = new OfferType(); > offerType.Key = 1; > offerType.Description = "somevalue"; > session.Save(offerType); > ==================== > STACK TRACE: > ==================== > at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session) > at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Object obj, ISessionImplementor session) > at NHibernate.Impl.ScheduledInsertion.Execute() > at NHibernate.Impl.SessionImpl.Execute(IExecutable executable) > at NHibernate.Impl.SessionImpl.ExecuteAll(IList list) > at NHibernate.Impl.SessionImpl.Execute() > at NHibernate.Impl.SessionImpl.Flush() > at NHibernate.Examples.ForumQuestions.OfferExample.OfferExample.TestExample() in d:\PathTo\nhibernate.examples\forumquestions\offerexample\offerexample.cs:line 83 > --ADOException > at NHibernate.JetDriver.JetDbCommand.set_Transaction(IDbTransaction value) in c:\net\nhibernate\nhibernate\src\NHibernate.JetDriver\JetDbCommand.cs:line 190 > at NHibernate.Transaction.AdoTransaction.Enlist(IDbCommand command) > at NHibernate.Impl.BatcherImpl.Prepare(IDbCommand cmd) > at NHibernate.Impl.BatcherImpl.ExecuteNonQuery(IDbCommand cmd) > at NHibernate.Impl.NonBatchingBatcher.AddToBatch(IExpectation expectation) > at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session) > ==================== > LOG4NET LOG: > ==================== > 2006-11-19 22:25:11,906 [TestRunnerThread] DEBUG NHibernate.Persister.Entity.AbstractEntityPersister [(null)] <(null)> - Inserting entity: [NHibernate.Examples.ForumQuestions.OfferExample.OfferType#1] > 2006-11-19 22:25:11,916 [TestRunnerThread] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Opened new IDbCommand, open IDbCommands: 1 > 2006-11-19 22:25:11,916 [TestRunnerThread] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Building an IDbCommand object for the SqlString: INSERT INTO OfferType (description, id_) VALUES (?, ?) > 2006-11-19 22:25:11,916 [TestRunnerThread] DEBUG NHibernate.Persister.Entity.AbstractEntityPersister [(null)] <(null)> - Dehydrating entity: [NHibernate.Examples.ForumQuestions.OfferExample.OfferType#1] > 2006-11-19 22:25:11,916 [TestRunnerThread] DEBUG NHibernate.Type.StringType [(null)] <(null)> - binding 'somevalue' to parameter: 0 > 2006-11-19 22:25:11,916 [TestRunnerThread] DEBUG NHibernate.Type.Int32Type [(null)] <(null)> - binding '1' to parameter: 1 > 2006-11-19 22:25:11,926 [TestRunnerThread] DEBUG NHibernate.SQL [(null)] <(null)> - INSERT INTO OfferType (description, id_) VALUES (?, ?); @p0 = 'somevalue', @p1 = '1' > 2006-11-19 22:25:11,926 [TestRunnerThread] DEBUG NHibernate.Connection.DriverConnectionProvider [(null)] <(null)> - Obtaining IDbConnection from Driver > 2006-11-19 22:25:11,926 [TestRunnerThread] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Closed IDbCommand, open IDbCommands: 0 > 2006-11-19 22:25:11,926 [TestRunnerThread] DEBUG NHibernate.Util.ADOExceptionReporter [(null)] <(null)> - could not insert: [NHibernate.Examples.ForumQuestions.OfferExample.OfferType#1] [INSERT INTO OfferType (description, id_) VALUES (?, ?)] > System.NullReferenceException: Object reference not set to an instance of an object. > at NHibernate.JetDriver.JetDbCommand.set_Transaction(IDbTransaction value) in c:\net\nhibernate\nhibernate\src\NHibernate.JetDriver\JetDbCommand.cs:line 190 > at NHibernate.Transaction.AdoTransaction.Enlist(IDbCommand command) > at NHibernate.Impl.BatcherImpl.Prepare(IDbCommand cmd) > at NHibernate.Impl.BatcherImpl.ExecuteNonQuery(IDbCommand cmd) > at NHibernate.Impl.NonBatchingBatcher.AddToBatch(IExpectation expectation) > at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session) > 2006-11-19 22:25:11,936 [TestRunnerThread] WARN NHibernate.Util.ADOExceptionReporter [(null)] <(null)> - System.NullReferenceException: Object reference not set to an instance of an object. > at NHibernate.JetDriver.JetDbCommand.set_Transaction(IDbTransaction value) in c:\net\nhibernate\nhibernate\src\NHibernate.JetDriver\JetDbCommand.cs:line 190 > at NHibernate.Transaction.AdoTransaction.Enlist(IDbCommand command) > at NHibernate.Impl.BatcherImpl.Prepare(IDbCommand cmd) > at NHibernate.Impl.BatcherImpl.ExecuteNonQuery(IDbCommand cmd) > at NHibernate.Impl.NonBatchingBatcher.AddToBatch(IExpectation expectation) > at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session) > 2006-11-19 22:25:11,936 [TestRunnerThread] ERROR NHibernate.Util.ADOExceptionReporter [(null)] <(null)> - Object reference not set to an instance of an object. > 2006-11-19 22:25:11,936 [TestRunnerThread] ERROR NHibernate.Impl.SessionImpl [(null)] <(null)> - could not synchronize database state with session > NHibernate.ADOException: could not insert: [NHibernate.Examples.ForumQuestions.OfferExample.OfferType#1][SQL: INSERT INTO OfferType (description, id_) VALUES (?, ?)] ---> System.NullReferenceException: Object reference not set to an instance of an object. > at NHibernate.JetDriver.JetDbCommand.set_Transaction(IDbTransaction value) in c:\net\nhibernate\nhibernate\src\NHibernate.JetDriver\JetDbCommand.cs:line 190 > at NHibernate.Transaction.AdoTransaction.Enlist(IDbCommand command) > at NHibernate.Impl.BatcherImpl.Prepare(IDbCommand cmd) > at NHibernate.Impl.BatcherImpl.ExecuteNonQuery(IDbCommand cmd) > at NHibernate.Impl.NonBatchingBatcher.AddToBatch(IExpectation expectation) > at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session) > --- End of inner exception stack trace --- > at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session) > at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Object obj, ISessionImplementor session) > at NHibernate.Impl.ScheduledInsertion.Execute() > at NHibernate.Impl.SessionImpl.Execute(IExecutable executable) > at NHibernate.Impl.SessionImpl.ExecuteAll(IList list) > at NHibernate.Impl.SessionImpl.Execute() > ==================== > Error occurs irregardless of query type, insert, select, and irrespective of using Find() or CreateQuery(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |