-->
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.  [ 1 post ] 
Author Message
 Post subject: Exceptio during Transaction Commit
PostPosted: Tue Sep 04, 2007 8:01 am 
Newbie

Joined: Thu May 25, 2006 4:22 pm
Posts: 9
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 1.2.0 GA

Mapping documents:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" >
<class name="PPEA.Donnees.Groupe, PPEA.Donnees" table="groupes">
<id name="ID" column="id" type="int" unsaved-value="0" >
<generator class="identity"/>
</id>
<property name="Nom" column="nom" type="String" length="255"/>
<property name="Description" column="description" type="String" length="510"/>
</class>
</hibernate-mapping>

Code between sessionFactory.openSession() and session.close():
System.Console.WriteLine(" ==> Transaction ! ");
ITransaction transaction = session.BeginTransaction();

// -4-
System.Console.WriteLine(" ==> Creation du groupe ! ");
PPEA.Donnees.Groupe obj = new PPEA.Donnees.Groupe(" TEST !");
obj.Description = "Description";

// -5-
System.Console.WriteLine(" ==> Save ! ");
session.Save(obj);

// -6-
System.Console.WriteLine(" ==> Commit ! ");
transaction.Commit();


Full stack trace of any exception that occurs:
Unhandled Exception: 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]
at Apprendre.MainClass.NHibernate () [0x00098] in /donnees/Documents/Projets/MonoDevelop/Apprendre/Apprendre/Apprendre/Main.cs:89
at Apprendre.MainClass.Main (System.String[] args) [0x000d6] in /donnees/Documents/Projets/MonoDevelop/Apprendre/Apprendre/Apprendre/Main.cs:56



Name and version of the database you are using:
SQLite 3
The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html


Tous mes valeurs sont bien renseignées ... De plus la donnée est bien enregsitré ... ce qui est assez bizarre je trouve ...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.