Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Exception when adding comment

usage

When I try to add a comment to a particular ticket, the system throws an exception (below.) I was able to add a comment to another ticket with no problem.

"About" reports that I am running the latest version of Gemini.

I have made no DB schema changes nor any triggers - it is a pretty clean install.

The exception is:

[SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.geminiwatchissues' with unique index 'uindgeminiwatchissuesid'. The statement has been terminated.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +212 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +245 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2811 System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +58 System.Data.SqlClient.SqlDataReader.get_MetaData() +112 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6281668 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6282737 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +424 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +211 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +19 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() +21 NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) +815 NHibernate.Id.InsertSelectDelegate.ExecuteAndExtract(IDbCommand insert, ISessionImplementor session) +84 NHibernate.Id.Insert.AbstractReturningDelegate.PerformInsert(SqlCommandInfo insertSQL, ISessionImplementor session, IBinder binder) +127

[GenericADOException: could not insert: [CounterSoft.Gemini.Commons.Entity.IssueWatcherEN][SQL: INSERT INTO geminiwatchissues (projectid, userid, issueid) VALUES (?, ?, ?); select SCOPEIDENTITY()]] NHibernate.Id.Insert.AbstractReturningDelegate.PerformInsert(SqlCommandInfo insertSQL, ISessionImplementor session, IBinder binder) +394 NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object[] fields, Boolean[] notNull, SqlCommandInfo sql, Object obj, ISessionImplementor session) +383 NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object[] fields, Object obj, ISessionImplementor session) +256 NHibernate.Action.EntityIdentityInsertAction.Execute() +168 NHibernate.Engine.ActionQueue.Execute(IExecutable executable) +43 NHibernate.Event.Default.AbstractSaveEventListener.PerformSaveOrReplicate(Object entity, EntityKey key, IEntityPersister persister, Boolean useIdentityColumn, Object anything, IEventSource source, Boolean requiresImmediateIdAccess) +906 NHibernate.Event.Default.AbstractSaveEventListener.SaveWithGeneratedId(Object entity, String entityName, Object anything, IEventSource source, Boolean requiresImmediateIdAccess) +259 NHibernate.Event.Default.DefaultSaveEventListener.SaveWithGeneratedOrRequestedId(SaveOrUpdateEvent event) +59 NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.EntityIsTransient(SaveOrUpdateEvent event) +120 NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event) +333 NHibernate.Impl.SessionImpl.FireSave(SaveOrUpdateEvent event) +172 NHibernate.Impl.SessionImpl.Save(Object obj) +153 CounterSoft.Gemini.DataProvider.x73a34067f4cd229a.xf606eb5e1032d933(BaseEN x6fcb9c1c812a0558, Boolean x8b15d0e18e6888d9, ISession x45b53be31e53d68b) +35 CounterSoft.Gemini.DataProvider.x73a34067f4cd229a.xf606eb5e1032d933(BaseEN x6fcb9c1c812a0558, Boolean x8b15d0e18e6888d9) +77 CounterSoft.Gemini.Business.x95da312ae9372c2e.xe19f89ad8f4967c9(Int32 xa8708020b9a21a3a, Int32 x663e02d322c995c9, Int32 xe6f5e35d7ce26e93) +86 CounterSoft.Gemini.Business.x95da312ae9372c2e.x11dbdcad4df00d52(IssueEN x22c77d60925997e9) +211 CounterSoft.Gemini.Business.x95da312ae9372c2e.xe6c068ecd01330f5(IssueEN x22c77d60925997e9, Int32 xdf6548ad179b4d83, Boolean xcbecc09e33c13ebd) +231 CounterSoft.Gemini.Web.Controls.IssueUC.UpdateIssue() +1832 CounterSoft.Gemini.Web.Controls.IssueUC.btnAction_Click(Object sender, EventArgs e) +473 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981

bbes
· 200
bbes
Replies (11)
helpful
0
not helpful

Does it always happen on this particular ticket? Can you check the watchers list for it, are there any?


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Yes it happens every time on this ticket. yes there are two watchers - myself and one other person.


bbes
· 200
bbes
helpful
0
not helpful

Can you try removing both watchers and put the comment in? Does it work? If it does, try commenting again.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

I click the delete icon and confirm each. Nothing seems to change on the screen - no error messages but no changes. I refresh the screen (re-fetch the ticket by number) both watchers are still there.


bbes
· 200
bbes
helpful
0
not helpful

Can you please check Gemini's system log for errors (Administration -> System log)?


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Lots of errors in the logs. (Lots of attempts to comment.) They are all almost exactly identical to the the first one below. There is one that is different (the second one):

-- first one ----------------------------------------------

Cannot insert duplicate key row in object 'dbo.geminiwatchissues' with unique index 'uindgeminiwatchissuesid'. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) at NHibernate.Id.IdentityGenerator.InsertSelectDelegate.ExecuteAndExtract(IDbCommand insert, ISessionImplementor session) at NHibernate.Id.Insert.AbstractReturningDelegate.PerformInsert(SqlCommandInfo insertSQL, ISessionImplementor session, IBinder binder)

-- second one -------------------------------------------------------

could not insert: [CounterSoft.Gemini.Commons.Entity.IssueWatcherEN][SQL: INSERT INTO geminiwatchissues (projectid, userid, issueid) VALUES (?, ?, ?); select SCOPEIDENTITY()] at NHibernate.Id.Insert.AbstractReturningDelegate.PerformInsert(SqlCommandInfo insertSQL, ISessionImplementor session, IBinder binder) at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object[] fields, Boolean[] notNull, SqlCommandInfo sql, Object obj, ISessionImplementor session) at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object[] fields, Object obj, ISessionImplementor session) at NHibernate.Action.EntityIdentityInsertAction.Execute() at NHibernate.Engine.ActionQueue.Execute(IExecutable executable) at NHibernate.Event.Default.AbstractSaveEventListener.PerformSaveOrReplicate(Object entity, EntityKey key, IEntityPersister persister, Boolean useIdentityColumn, Object anything, IEventSource source, Boolean requiresImmediateIdAccess) at NHibernate.Event.Default.AbstractSaveEventListener.SaveWithGeneratedId(Object entity, String entityName, Object anything, IEventSource source, Boolean requiresImmediateIdAccess) at NHibernate.Event.Default.DefaultSaveEventListener.SaveWithGeneratedOrRequestedId(SaveOrUpdateEvent event) at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.EntityIsTransient(SaveOrUpdateEvent event) at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event) at NHibernate.Impl.SessionImpl.FireSave(SaveOrUpdateEvent event) at NHibernate.Impl.SessionImpl.Save(Object obj) at CounterSoft.Gemini.DataProvider.x73a34067f4cd229a.xf606eb5e1032d933(BaseEN x6fcb9c1c812a0558, Boolean x8b15d0e18e6888d9, ISession x45b53be31e53d68b) at CounterSoft.Gemini.DataProvider.x73a34067f4cd229a.xf606eb5e1032d933(BaseEN x6fcb9c1c812a0558, Boolean x8b15d0e18e6888d9) at CounterSoft.Gemini.Business.x95da312ae9372c2e.xe19f89ad8f4967c9(Int32 xa8708020b9a21a3a, Int32 x663e02d322c995c9, Int32 xe6f5e35d7ce26e93) at CounterSoft.Gemini.Business.x95da312ae9372c2e.x11dbdcad4df00d52(IssueEN x22c77d60925997e9) at CounterSoft.Gemini.Business.x95da312ae9372c2e.xe6c068ecd01330f5(IssueEN x22c77d60925997e9, Int32 xdf6548ad179b4d83, Boolean xcbecc09e33c13ebd) at CounterSoft.Gemini.Presenter.IssuePresenter.UpdateIssue(IssueEN issue) at CounterSoft.Gemini.Web.Methods.IssueUpdateHandler.UpdateIssue()


bbes
· 200
bbes
helpful
0
not helpful

Seems to me like the delete fails for some reason, is there no error regarding that? Is the SQL user that Gemini runs under a dbo?


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

The attempted delete of the watcher is not logging any events. The user is indeed the DBO.


bbes
· 200
bbes
helpful
0
not helpful

Please send an email to support at countersoft dot com, we will arrange a remote session to see if we can resolve this issue.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

I am having EXACT problem, only happens to this Issue # and cannot remove the issue watcher either.

Is there a solution for this yet?

Cannot insert duplicate key row in object 'dbo.geminiwatchissues' with unique index 'uindgeminiwatchissuesid'. The statement has been terminated. 2/8/2012 10:19:41 AM at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior


Ve Con
· 1
Ve Con
helpful
0
not helpful

Please run the following SQL:

update w
set w.projectid = i.projectid
from gemini_watchissues w join gemini_issues i on w.issueid = i.issueid where w.projectid!=i.projectid

Mark Wing
· 9108
Mark Wing