Server error after custom module update

Topics: Customizing Orchard, Troubleshooting, Writing modules
Aug 2, 2013 at 5:20 AM
Edited Aug 2, 2013 at 5:23 AM
I'm getting a server error after updating a custom module. I'm running Orchard 1.6. The update was to add some fields to a custom Settings Part record. It worked ok from my dev machine which is pointing at our production database (we're not live yet). Then when I copied up the module to the prod web server, replacing the previous module folder, I get this error now visiting any page on the site. I tried reverting back to the previous module version but still get the error.

Here is the log file entry. There are 3 of these entries any time I try to visit the site. Can someone interpret?
2013-08-02 11:54:46,187 [6] Orchard.Environment.DefaultOrchardHost - A tenant could not be started: Default
System.ArgumentException: An item with the same key has already been added.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at Orchard.Data.Conventions.RecordTableNameConvention..ctor(IEnumerable`1 descriptors) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\Conventions\RecordTableNameConvention.cs:line 13
   at Orchard.Data.Providers.AbstractDataServicesProvider.CreatePersistenceModel(ICollection`1 recordDescriptors) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\Providers\AbstractDataServicesProvider.cs:line 44
   at Orchard.Data.Providers.AbstractDataServicesProvider.BuildConfiguration(SessionFactoryParameters parameters) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\Providers\AbstractDataServicesProvider.cs:line 29
   at Orchard.Data.SessionFactoryHolder.<>c__DisplayClass4.<BuildConfiguration>b__2() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\SessionFactoryHolder.cs:line 97
   at Orchard.Data.SessionConfigurationCache.GetConfiguration(Func`1 builder) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\SessionConfigurationCache.cs:line 56
   at Orchard.Data.SessionFactoryHolder.BuildConfiguration() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\SessionFactoryHolder.cs:line 96
   at Orchard.Data.SessionFactoryHolder.GetConfiguration() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\SessionFactoryHolder.cs:line 74
   at Orchard.Data.SessionFactoryHolder.GetSessionFactory() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\SessionFactoryHolder.cs:line 65
   at Orchard.Data.SessionLocator.For(Type entityType) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\SessionLocator.cs:line 29
   at Orchard.Data.Repository`1.get_Table() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\Repository.cs:line 30
   at Orchard.Data.Repository`1.Fetch(Expression`1 predicate) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\Repository.cs:line 126
   at Orchard.Data.Repository`1.Get(Expression`1 predicate) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Data\Repository.cs:line 91
   at Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetDescriptorRecord() in c:\Users\sebros\My Projects\Orchard\src\Orchard.Web\Core\Settings\Descriptor\ShellDescriptorManager.cs:line 57
   at Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetShellDescriptor() in c:\Users\sebros\My Projects\Orchard\src\Orchard.Web\Core\Settings\Descriptor\ShellDescriptorManager.cs:line 31
   at Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings settings) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Environment\ShellBuilders\ShellContextFactory.cs:line 66
   at Orchard.Environment.DefaultOrchardHost.CreateAndActivateShells() in c:\Users\sebros\My Projects\Orchard\src\Orchard\Environment\DefaultOrchardHost.cs:line 135
Any help is much appreciated.
Coordinator
Aug 4, 2013 at 5:20 AM
Having dev work off the production DB is asking for trouble. I'm afraid you'll have to revert to a previous backup. You should really separate dev from production.