This project is read-only.

Can't enable Module/Feature in Recipe

Sep 9, 2011 at 3:22 PM

Tried to add Contrib.KeepAlive to my recipe and the following error always occurs. Any help much appreciated!

Server Error in '/' Application.

The specified table does not exist. [ Contrib_KeepAlive_KeepAliveSettingsPartRecord ]

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Data.SqlServerCe.SqlCeException: The specified table does not exist. [ Contrib_KeepAlive_KeepAliveSettingsPartRecord ]

Source Error: 

Line 85: 
Line 86:         public virtual T Get(int id) {
Line 87:             return Session.Get<T>(id);
Line 88:         }
Line 89: 


Source File: E:\CODE\MVC\Orchard\src\Orchard\Data\Repository.cs    Line: 87 

Stack Trace: 

[SqlCeException (0x80004005): The specified table does not exist. [ Contrib_KeepAlive_KeepAliveSettingsPartRecord ]]
   System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr) +66
   System.Data.SqlServerCe.SqlCeCommand.CompileQueryPlan() +1337
   System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options) +394
   System.Data.SqlServerCe.SqlCeCommand.ExecuteDbDataReader(CommandBehavior behavior) +9
   System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() +23
   NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) +791
   NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session) +556
   NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +274
   NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +114
   NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Object id, IType identifierType, Object optionalObject, String optionalEntityName, Object optionalIdentifier, IEntityPersister persister) +557

[GenericADOException: could not load an entity: [Contrib.KeepAlive.Models.KeepAliveSettingsPartRecord#1][SQL: SELECT keepalives0_.Id as Id322_0_, keepalives0_.Url as Url322_0_, keepalives0_.Enabled as Enabled322_0_ FROM Contrib_KeepAlive_KeepAliveSettingsPartRecord keepalives0_ WHERE keepalives0_.Id=?]]
   NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Object id, IType identifierType, Object optionalObject, String optionalEntityName, Object optionalIdentifier, IEntityPersister persister) +918
   NHibernate.Loader.Entity.AbstractEntityLoader.Load(ISessionImplementor session, Object id, Object optionalObject, Object optionalId) +76
   NHibernate.Loader.Entity.AbstractEntityLoader.Load(Object id, Object optionalObject, ISessionImplementor session) +32
   NHibernate.Event.Default.DefaultLoadEventListener.LoadFromDatasource(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) +185
   NHibernate.Event.Default.DefaultLoadEventListener.Load(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) +181
   NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent event, LoadType loadType) +1031
   NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType loadType) +403
   NHibernate.Impl.SessionImpl.Get(String entityName, Object id) +449
   NHibernate.Impl.SessionImpl.Get(Type entityClass, Object id) +374
   NHibernate.Impl.SessionImpl.Get(Object id) +391
   Orchard.Data.Repository`1.Get(Int32 id) in E:\CODE\MVC\Orchard\src\Orchard\Data\Repository.cs:87
   Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Get(Int32 id) in E:\CODE\MVC\Orchard\src\Orchard\Data\Repository.cs:56
   Orchard.ContentManagement.Handlers.StorageFilter`1.GetRecordCore(ContentItemVersionRecord versionRecord) in E:\CODE\MVC\Orchard\src\Orchard\ContentManagement\Handlers\StorageFilter.cs:30
   Orchard.ContentManagement.Handlers.<>c__DisplayClass1.<Loading>b__0(TRecord prior) in E:\CODE\MVC\Orchard\src\Orchard\ContentManagement\Handlers\StorageFilter.cs:54
   Orchard.ContentManagement.Utilities.LazyField`1.GetValue() in E:\CODE\MVC\Orchard\src\Orchard\ContentManagement\Utilities\LazyField.cs:24
   Orchard.ContentManagement.Utilities.LazyField`1.get_Value() in E:\CODE\MVC\Orchard\src\Orchard\ContentManagement\Utilities\LazyField.cs:10
   Orchard.ContentManagement.ContentPart`1.get_Record() in E:\CODE\MVC\Orchard\src\Orchard\ContentManagement\ContentPart.cs:73
   Contrib.KeepAlive.Services.FeatureEventHandler.Enabled(Feature feature) in e:\CODE\MVC\Orchard\src\Orchard.Web\Modules\Contrib.KeepAlive\Services\FeatureEventHandler.cs:28

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +639
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
   Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in E:\CODE\MVC\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:85
   Orchard.Events.DefaultOrchardEventBus.TryInvoke(IEventHandler eventHandler, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in E:\CODE\MVC\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:71
   Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, Boolean failFast, IEnumerable& returnValue) in E:\CODE\MVC\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:62
   Orchard.Events.<NotifyHandlers>d__0.MoveNext() in E:\CODE\MVC\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:39
   System.Linq.Buffer`1..ctor(IEnumerable`1 source) +488
   System.Linq.Enumerable.ToArray(IEnumerable`1 source) +104
   Orchard.Events.DefaultOrchardEventBus.Notify(String messageName, IDictionary`2 eventData) in E:\CODE\MVC\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:25
   Orchard.Events.EventsInterceptor.Intercept(IInvocation invocation) in E:\CODE\MVC\Orchard\src\Orchard\Events\EventsInterceptor.cs:24
   Orchard.Environment.State.ShellStateCoordinator.Orchard.Environment.State.IShellStateManagerEventHandler.ApplyChanges() in E:\CODE\MVC\Orchard\src\Orchard\Environment\State\ShellStateCoordinator.cs:186

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
   System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +152
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +393
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
   Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in E:\CODE\MVC\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:85
   Orchard.Events.DefaultOrchardEventBus.TryInvoke(IEventHandler eventHandler, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in E:\CODE\MVC\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:71
   Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, Boolean failFast, IEnumerable& returnValue) in E:\CODE\MVC\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:62
   Orchard.Events.<NotifyHandlers>d__0.MoveNext() in E:\CODE\MVC\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:39
   System.Linq.Buffer`1..ctor(IEnumerable`1 source) +488
   System.Linq.Enumerable.ToArray(IEnumerable`1 source) +104
   Orchard.Events.DefaultOrchardEventBus.Notify(String messageName, IDictionary`2 eventData) in E:\CODE\MVC\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:25
   Orchard.Environment.State.DefaultProcessingEngine.Execute(Entry entry) in E:\CODE\MVC\Orchard\src\Orchard\Environment\State\DefaultProcessingEngine.cs:101
   Orchard.Environment.State.DefaultProcessingEngine.ExecuteNextTask() in E:\CODE\MVC\Orchard\src\Orchard\Environment\State\DefaultProcessingEngine.cs:67
   Orchard.Environment.DefaultOrchardHost.EndRequest() in E:\CODE\MVC\Orchard\src\Orchard\Environment\DefaultOrchardHost.cs:185
   Orchard.Environment.DefaultOrchardHost.Orchard.Environment.IOrchardHost.EndRequest() in E:\CODE\MVC\Orchard\src\Orchard\Environment\DefaultOrchardHost.cs:79
   Orchard.Web.MvcApplication.HostEndRequest(HttpApplication application, IOrchardHost host) in E:\CODE\MVC\Orchard\src\Orchard.Web\Global.asax.cs:42
   Orchard.WarmupStarter.Starter`1.OnEndRequest(HttpApplication application) in E:\CODE\MVC\Orchard\src\Orchard.Startup\Starter.cs:75
   Orchard.Web.MvcApplication.Application_EndRequest() in E:\CODE\MVC\Orchard\src\Orchard.Web\Global.asax.cs:33

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
   System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +152
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +393
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
   System.Web.Util.ArglessEventHandlerProxy.Callback(Object sender, EventArgs e) +74
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +270



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

Sep 11, 2011 at 4:51 PM

hai2u,

I also noticed this issue and managed to fix it. I've created a fork of the module with the fix in and submitted a pull request to the project owner (http://orchardkeepalive.codeplex.com/SourceControl/network/Forks/kobowi/RecipeFix/contribution/1491). Hopefully this will get in to the main branch, but for now you can just checkout the code in the fork and just use "feature enable" in your recipe.

Sep 11, 2011 at 8:40 PM

Nice one, cheers :)