Page MenuHomePhabricator

Column 'prefix' cannot be null when doing !interwiki accept
Closed, ResolvedPublic

Description

An unhandled exception is thrown when doing an !interwiki accept on the non-imported name.

The correct usage is to use the imported name, so this should be caught and handled in a better way

2022-02-06 23:41:10,750 [Thread Pool Worker] ERROR Helpmebot.Commands.Commands.BotManagement.InterwikiCommand [(null)] - Unhandled exception during command execution
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> NHibernate.Exceptions.GenericADOException: could not update: [Helpmebot.Model.InterwikiPrefix#172][SQL: UPDATE interwikiprefix SET prefix = ?, importedas = ?, url = ?, absentfromlast = ?, createdsincelast = ? WHERE id = ?] ---> MySql.Data.MySqlClient.MySqlException: Column 'prefix' cannot be null
  at MySql.Data.MySqlClient.MySqlStream.ReadPacket () [0x000aa] in <10e45ee994e046b09b30eac4f9a3df52>:0 
  at MySql.Data.MySqlClient.NativeDriver.GetResult (System.Int32& affectedRow, System.Int64& insertedId) [0x0005d] in <10e45ee994e046b09b30eac4f9a3df52>:0 
  at MySql.Data.MySqlClient.Driver.GetResult (System.Int32 statementId, System.Int32& affectedRows, System.Int64& insertedId) [0x00000] in <10e45ee994e046b09b30eac4f9a3df52>:0 
  at MySql.Data.MySqlClient.Driver.NextResult (System.Int32 statementId, System.Boolean force) [0x00023] in <10e45ee994e046b09b30eac4f9a3df52>:0 
  at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00251] in <10e45ee994e046b09b30eac4f9a3df52>:0 
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader (System.Data.CommandBehavior behavior) [0x0030c] in <10e45ee994e046b09b30eac4f9a3df52>:0 
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader () [0x00000] in <10e45ee994e046b09b30eac4f9a3df52>:0 
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery () [0x00032] in <10e45ee994e046b09b30eac4f9a3df52>:0 
  at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery (System.Data.Common.DbCommand cmd) [0x00068] in <5a931f7e111d432e9c280c99c647583e>:0 
  at NHibernate.AdoNet.NonBatchingBatcher.AddToBatch (NHibernate.AdoNet.IExpectation expectation) [0x00013] in <5a931f7e111d432e9c280c99c647583e>:0 
  at NHibernate.Persister.Entity.AbstractEntityPersister.Update (System.Object id, System.Object[] fields, System.Object[] oldFields, System.Object rowId, System.Boolean[] includeProperty, System.Int32 j, System.Object oldVersion, System.Object obj, NHibernate.SqlCommand.SqlCommandInfo sql, NHibernate.Engine.ISessionImplementor session) [0x0023a] in <5a931f7e111d432e9c280c99c647583e>:0 
   --- End of inner exception stack trace ---
  at NHibernate.Persister.Entity.AbstractEntityPersister.Update (System.Object id, System.Object[] fields, System.Object[] oldFields, System.Object rowId, System.Boolean[] includeProperty, System.Int32 j, System.Object oldVersion, System.Object obj, NHibernate.SqlCommand.SqlCommandInfo sql, NHibernate.Engine.ISessionImplementor session) [0x002b4] in <5a931f7e111d432e9c280c99c647583e>:0 
  at NHibernate.Persister.Entity.AbstractEntityPersister.UpdateOrInsert (System.Object id, System.Object[] fields, System.Object[] oldFields, System.Object rowId, System.Boolean[] includeProperty, System.Int32 j, System.Object oldVersion, System.Object obj, NHibernate.SqlCommand.SqlCommandInfo sql, NHibernate.Engine.ISessionImplementor session) [0x0006a] in <5a931f7e111d432e9c280c99c647583e>:0 
  at NHibernate.Persister.Entity.AbstractEntityPersister.Update (System.Object id, System.Object[] fields, System.Int32[] dirtyFields, System.Boolean hasDirtyCollection, System.Object[] oldFields, System.Object oldVersion, System.Object obj, System.Object rowId, NHibernate.Engine.ISessionImplementor session) [0x0011d] in <5a931f7e111d432e9c280c99c647583e>:0 
  at NHibernate.Action.EntityUpdateAction.Execute () [0x0009c] in <5a931f7e111d432e9c280c99c647583e>:0 
  at NHibernate.Engine.ActionQueue.InnerExecute (NHibernate.Action.IExecutable executable) [0x00000] in <5a931f7e111d432e9c280c99c647583e>:0 
  at NHibernate.Engine.ActionQueue.ExecuteActions[T] (System.Collections.Generic.List`1[T] list) [0x00011] in <5a931f7e111d432e9c280c99c647583e>:0 
  at NHibernate.Engine.ActionQueue.ExecuteActions () [0x0000c] in <5a931f7e111d432e9c280c99c647583e>:0 
  at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions (NHibernate.Event.IEventSource session) [0x00068] in <5a931f7e111d432e9c280c99c647583e>:0 
  at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush (NHibernate.Event.FlushEvent event) [0x00034] in <5a931f7e111d432e9c280c99c647583e>:0 
  at NHibernate.Impl.SessionImpl.Flush () [0x00040] in <5a931f7e111d432e9c280c99c647583e>:0 
  at Helpmebot.Commands.Commands.BotManagement.InterwikiCommand.Accept () [0x001d3] in <1300dc85eef7417190acb4cd1d611909>:0 
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <533173d24dae460899d2b10975534bb0>:0 
   --- End of inner exception stack trace ---
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00083] in <533173d24dae460899d2b10975534bb0>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <533173d24dae460899d2b10975534bb0>:0 
  at Stwalkerster.Bot.CommandLib.Commands.CommandUtilities.CommandBase.Run () [0x0023f] in <76dca47f9fe14fbe9ca54b358e31749b>:0

Revisions and Commits

Event Timeline

stwalkerster created this task.
stwalkerster updated the task description. (Show Details)
stwalkerster closed this task as Resolved by committing Restricted Diffusion Commit.Apr 1 2022, 9:14 PM
stwalkerster claimed this task.
stwalkerster added a commit: Restricted Diffusion Commit.