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.
|
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.
|
Rank: Newbie Groups: Member
Joined: 5/31/2010 Posts: 8 Points: 24
|
How can I do that ?
|
Rank: Administration Groups: Administration
, Member
Joined: 10/7/2008 Posts: 505 Points: 1,515
|
|
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)
|
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.
|
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.
|