SparkDevNetwork / Rock

An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.
http://www.rockrms.com
574 stars 347 forks source link

Error adding Check-in Area #1432

Closed dcagnetta closed 8 years ago

dcagnetta commented 8 years ago

Hi I get the following error when trying to add a new Check-in area

Error
The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information. 1) The wait operation timed out Resulting in: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Resulting in: An error occurred while executing the command definition. See the inner exception for details. Resulting in: An exception occurred while trying to create an instance of type 'Rock.Storage.Provider.Database'. Resulting in: Cannot activate part 'Rock.Storage.Provider.Database'. Element: Rock.Storage.Provider.Database --> Rock.Storage.Provider.Database --> AssemblyCatalog (Assembly="Rock, Version=1.4.3.0, Culture=neutral, PublicKeyToken=null") Resulting in: Cannot get export 'Rock.Storage.Provider.Database (ContractName="Rock.Storage.ProviderComponent")' from part 'Rock.Storage.Provider.Database'. Element: Rock.Storage.Provider.Database (ContractName="Rock.Storage.ProviderComponent") --> Rock.Storage.Provider.Database --> AssemblyCatalog (Assembly="Rock, Version=1.4.3.0, Culture=neutral, PublicKeyToken=null")
   at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart part, ExportDefinition export, Boolean isSharedPart)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()
   at System.ComponentModel.Composition.Primitives.Export.get_Value()
   at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
   at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass11_0`2.<CreateStronglyTypedLazyOfTM>b__1()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at System.Lazy`1.get_Value()
   at Rock.Extension.Container`2.Refresh()
   at Rock.Storage.ProviderContainer.<.cctor>b__0()
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at Rock.Storage.ProviderContainer.get_Instance()
   at Rock.Model.BinaryFile.set_StorageEntityTypeId(Nullable`1 value)
   at lambda_method(Closure , Shaper )
   at System.Data.Entity.Core.Common.Internal.Materialization.Shaper.HandleEntityAppendOnly[TEntity](Func`2 constructEntityDelegate, EntityKey entityKey, EntitySet entitySet)
   at lambda_method(Closure , Shaper )
   at System.Data.Entity.Core.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)
   at System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
   at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__1[TResult](IEnumerable`1 sequence)
   at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
   at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
   at System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression)
   at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source, Expression`1 predicate)
   at Rock.Data.Service`1.Get(Guid guid)
   at Rock.Model.Attribute.PreSaveChanges(DbContext dbContext, EntityState state)
   at Rock.Data.Model`1.PreSaveChanges(DbContext dbContext, DbEntityEntry entry)
   at Rock.Data.DbContext.RockPreSave(DbContext dbContext, PersonAlias personAlias, Boolean enableAuditing)
   at Rock.Data.DbContext.SaveChanges(Boolean disablePrePostProcessing)
   at Rock.Data.DbContext.SaveChanges()
   at RockWeb.Blocks.CheckIn.CheckinConfiguration.<>c__DisplayClass57.<btnSave_Click>b__4f() in e:\My Documents\My Development\Rock RMS\fortresstechnologydemo.co.za\RockWeb\Blocks\CheckIn\CheckinConfiguration.ascx.cs:line 959
   at Rock.Data.DbContext.WrapTransaction(Action action)
   at RockWeb.Blocks.CheckIn.CheckinConfiguration.btnSave_Click(Object sender, EventArgs e) in e:\My Documents\My Development\Rock RMS\fortresstechnologydemo.co.za\RockWeb\Blocks\CheckIn\CheckinConfiguration.ascx.cs:line 845
   at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
   at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
bdeneal commented 8 years ago

I get a similar thing when trying to change room in the check in configuration. Here is what I am seeing... I noticed the above version was 1.4.3.0 i am on 1.4.4.0 and getting this...

Error The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information. 1) The wait operation timed out Resulting in: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Resulting in: An error occurred while executing the command definition. See the inner exception for details. Resulting in: An exception occurred while trying to create an instance of type 'Rock.Storage.Provider.Database'. Resulting in: Cannot activate part 'Rock.Storage.Provider.Database'. Element: Rock.Storage.Provider.Database --> Rock.Storage.Provider.Database --> AssemblyCatalog (Assembly="Rock, Version=1.4.4.0, Culture=neutral, PublicKeyToken=null") Resulting in: Cannot get export 'Rock.Storage.Provider.Database (ContractName="Rock.Storage.ProviderComponent")' from part 'Rock.Storage.Provider.Database'. Element: Rock.Storage.Provider.Database (ContractName="Rock.Storage.ProviderComponent") --> Rock.Storage.Provider.Database --> AssemblyCatalog (Assembly="Rock, Version=1.4.4.0, Culture=neutral, PublicKeyToken=null") at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition) at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart part, ExportDefinition export, Boolean isSharedPart) at System.ComponentModel.Composition.Primitives.Export.get_Value() at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export) at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue() at Rock.Extension.Container2.Refresh() at Rock.Storage.ProviderContainer.<>c.<.cctor>b__13_0() at System.Lazy1.CreateValue() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Lazy1.get_Value() at Rock.Model.BinaryFile.set_StorageEntityTypeId(Nullable1 value) at lambda_method(Closure , Shaper ) at System.Data.Entity.Core.Common.Internal.Materialization.Shaper.HandleEntityAppendOnly[TEntity](Func2 constructEntityDelegate, EntityKey entityKey, EntitySet entitySet) at lambda_method(Closure , Shaper ) at System.Data.Entity.Core.Common.Internal.Materialization.Coordinator1.ReadNextElement(Shaper shaper) at System.Data.Entity.Core.Common.Internal.Materialization.Shaper1.SimpleEnumerator.MoveNext() at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source) at Rock.Model.Attribute.PreSaveChanges(DbContext dbContext, EntityState state) at Rock.Data.DbContext.RockPreSave(DbContext dbContext, PersonAlias personAlias, Boolean enableAuditing) at Rock.Data.DbContext.SaveChanges(Boolean disablePrePostProcessing) at RockWeb.Blocks.CheckIn.CheckinConfiguration.<>c__DisplayClass57.b__4f() in c:\inetpub\wwwroot\Blocks\CheckIn\CheckinConfiguration.ascx.cs:line 959 at Rock.Data.DbContext.WrapTransaction(Action action) at RockWeb.Blocks.CheckIn.CheckinConfiguration.btnSave_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\Blocks\CheckIn\CheckinConfiguration.ascx.cs:line 845 at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

bdeneal commented 8 years ago

@nairdo @edmistj I have two systems that I am using one that is one i have had running for a while as my beta server and the other I am trying to launch as the real system. On the beta system I do not have any of these problems. I have tried this a couple of times with a new install and keep running into similar issues with the checkin system. Something has changed with the way the install works where if you try to modify the checkin system it just breaks. This includes but is not limited to adding new areas or groups, changing rooms assignment for the groups. If you need any additional details for this let me know and I will do what I can on my part.

nairdo commented 8 years ago

It does not seem to be clearly tied to a check-in system issue. Can you tell us which storage providers you have listed in your Admin Tools > System Settings > File Storage Providers list? There should be two. Can you run this SQL and reply with the results:

SELECT [AssemblyName]
  FROM [EntityType]
  WHERE [AssemblyName] LIKE 'Rock.Storage.Provider.%'
bdeneal commented 8 years ago

@nairdo Thanks for the update for some reason one of the two File Storage Providers had not been turned on. The one that was marked as inactive was the database provider. Once it was turned on I found I had to reboot the server. After the rebooted and the system was happy and would let me make changes to the checkin configuration. @dcagnetta take a look at this for your system and let us know what you get?

JimMichael commented 8 years ago

In my opinion/experience something in Rock (probably an update/migration) is causing the Database storage provider to be disabled. This has happened to me once (and I'm 200% positive I didn't change it), a user the the QA recently had it, and now this. Once is a fluke, three times is a pattern :-)

azturner commented 8 years ago

We've looked for anything that might have disabled a storage provider and not been able to find any migration or code that would do so. Closing for now, but if similar issue happens again, please re-open (we will too if we hear of it again).