Login

Username

Password





Register   Reset password

Get Cuyahoga at SourceForge.net. Fast, secure and Free Open Source software downloads

Forum

Welcome Guest Search | Active Topics | Members

Error message when saving data Options
pgomez
Posted: Monday, August 30, 2010 1:44:09 AM
Rank: Newbie
Groups: Member

Joined: 5/31/2010
Posts: 8
Points: 24
Hi,

I'm making a new module for setting a list of dates using the Cuyahoga.ServerControls.Calendar control. I'm making it based on the Downloads module. Now I'm at a point in which it gives me this error message when I try to save a date:

Could not commit transaction, one (or more) of the resources failed

Any help would be appreciated. Thanks in advance.
Constructor
Posted: Monday, August 30, 2010 2:58:16 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
This could be many things. To find out more one must step through the action in debug to see what is happening.
pgomez
Posted: Monday, August 30, 2010 3:13:49 AM
Rank: Newbie
Groups: Member

Joined: 5/31/2010
Posts: 8
Points: 24
How can I do that ?
Constructor
Posted: Monday, August 30, 2010 3:27:45 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
pgomez
Posted: Tuesday, August 31, 2010 1:52:01 AM
Rank: Newbie
Groups: Member

Joined: 5/31/2010
Posts: 8
Points: 24
Here's the stack trace

An error occured: Error saving the lesson: Castle.Services.Transaction.CommitResourceException: Could not commit transaction, one (or more) of the resources failed ---> NHibernate.StaleStateException: Unexpected row count: 0; expected: 1 en NHibernate.AdoNet.Expectations.BasicExpectation.VerifyOutcomeNonBatched(Int32 rowCount, IDbCommand statement) en NHibernate.Impl.NonBatchingBatcher.AddToBatch(IExpectation expectation) en NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Object[] oldFields, Boolean[] includeProperty, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor session) en NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Int32[] dirtyFields, Boolean hasDirtyCollection, Object[] oldFields, Object oldVersion, Object obj, ISessionImplementor session) en NHibernate.Impl.ScheduledUpdate.Execute() en NHibernate.Impl.SessionImpl.Execute(IExecutable executable) en NHibernate.Impl.SessionImpl.ExecuteAll(IList list) en NHibernate.Impl.SessionImpl.Execute() en NHibernate.Impl.SessionImpl.Flush() en NHibernate.Transaction.AdoTransaction.Commit() en Castle.Facilities.NHibernateIntegration.Internal.ResourceAdapter.Commit() en Castle.Services.Transaction.AbstractTransaction.Commit() --- Fin del seguimiento de la pila de la excepción interna --- en Castle.Services.Transaction.AbstractTransaction.Commit() en Castle.Services.Transaction.StandardTransaction.Commit() en Castle.Facilities.AutomaticTransactionManagement.TransactionInterceptor.Intercept(IInvocation invocation) en Castle.DynamicProxy.AbstractInvocation.Proceed() en CalModuleProxy3069181fdd7d4e81aaefc252ed6fe5b3.SaveLesson(Lesson lesson) en Cuyahoga.Modules.Cal.Web.EditLesson.btnUpload_Click(Object sender, EventArgs e)
Constructor
Posted: Tuesday, August 31, 2010 2:33:58 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
I can only say check your NHibernate mappings. Without the module to debug I can only say that something is causing the transaction to fail.

Check your mappings and how your object id's are generated.

Just Google each error and methodically check each possible avenue.
pgomez
Posted: Tuesday, August 31, 2010 2:56:51 AM
Rank: Newbie
Groups: Member

Joined: 5/31/2010
Posts: 8
Points: 24
Ok, thanks !! I've found that I had written "unsaved-value=-1" instead of "unsaved-value=0" in the mappings file, and that exception came from there. The program is still giving an exception but now is a different one. I think I can solve it in a few minutes more.

Thanks a lot.

Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Yet Another Forum.net version 1.9.0 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.