Error Update from 1.7 to 1.7.1 in Media Library

Topics: Troubleshooting
Oct 22, 2013 at 4:44 PM
Hi,

After I updated my Orchard 1.7 site inplace to 1.7.1 everythink seems to work fine. But if i want to upgrade my Media Library Module I get an error:
2013-10-22 17:20:37,410 [6] NHibernate.AdoNet.AbstractBatcher - Could not execute query: INSERT INTO Settings_ContentTypePartDefinitionRecord (Settings, ContentPartDefinitionRecord_id) VALUES (@p0, @p1); select SCOPE_IDENTITY()
System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'Id', table 'dev.neuhold.pro.dbo.Settings_ContentTypePartDefinitionRecord'; column does not allow nulls. INSERT fails.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   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, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   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)
ClientConnectionId:de1c8299-810b-4a05-a317-55daff1c7163
(Link to the whole Logfile http://sdrv.ms/18GJqds).

Any Ideas whats wrong?
Developer
Oct 27, 2013 at 11:11 AM
Best thing to do is attach a debugger and have it break when the exception occurs. Then view the exception details, it will provide much more accurate details then what you're seeing here.
Oct 27, 2013 at 6:59 PM
Solution found! My database-copy was corrupt (no primary keys defined). Recreated the database and everything worked!

Thanks!
Marked as answer by benschi11 on 10/27/2013 at 10:59 AM