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.  [ 2 posts ] 
Author Message
 Post subject: Hmm, impossible error? (NHibernate/mod-mono-server2/MySQL5)
PostPosted: Sun Oct 14, 2007 3:57 am 
Newbie

Joined: Sun Oct 14, 2007 3:20 am
Posts: 1
So I got this error here, and at first I was spending a lot of time trying to figure out how to build NHibernate in mono so I could get line numbers in the output...

Code:
System.NullReferenceException: Object reference not set to an instance of an object
  at NHibernate.Transaction.AdoTransaction.AfterTransactionCompletion (Boolean successful) [0x00000]
  at NHibernate.Transaction.AdoTransaction.Commit () [0x00000]
.
.
.


After wasting time trying to get mdb's so I could find the line number in the NHibernate code, I figured I'd go look at the function to see if it offers any clues as to what was going on.

The function (In NHibernate.Transaction.AdoTransaction) throwing the nullreference is:

Code:

      private void AfterTransactionCompletion(bool successful)
      {
         session.AfterTransactionCompletion(successful, this);
         session = null;
         begun = false;
      }


And the only object being dereferenced anywhere is "session"

Which is where the impossible seems to come in... because in the call stack AfterTransactionCompletion is called directly from Commit which looks like this:

Code:
public void Commit()
      {
         CheckNotDisposed();
         CheckBegun();

         log.Debug("commit");

         if (session.FlushMode != FlushMode.Never)


Session is being dereferenced just fine well before Commit gets around to calling AfterTransactionCompletion.

What does that mean? Is it some severe bug with mono? The code runs with no problems at all in Microsoft's development server. It doesn't seem like it can be a threading issue because it happens consistently. I am also looking at the code of the version that matches the binary version so It can't be that the code was modified in between.[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 04, 2007 12:07 am 
Newbie

Joined: Mon Jan 01, 2007 9:43 pm
Posts: 11
I was under the impression Mono didn't implement any of the EnterpriseServives pieces. See

http://www.mono-project.com/Roadmap for more information.

I sure hope it works, I was looking to use it myself, albeit with SQLite.

Adam


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.