Invalid object name 'Settings_ShellStateRecord'

Jan 23, 2011 at 7:11 AM

Hello,

When I try to install orchard by selecting sql server database, I take the following error.

Thanks.

Server Error in '/orchard2' Application.

Invalid object name 'Settings_ShellStateRecord'.

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.SqlClient.SqlException: Invalid object name 'Settings_ShellStateRecord'.

Source Error: 


Stack Trace: 



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

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[SqlException (0x80131904): Invalid object name 'Settings_ShellStateRecord'.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +404
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1363
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +58
   System.Data.SqlClient.SqlDataReader.get_MetaData() +118
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6312385
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6313986
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +538
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +256
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +19
   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.DoList(ISessionImplementor session, QueryParameters queryParameters) +195

[ADOException: could not execute query
[ SELECT top 2 this_.Id as Id7_0_, this_.Unused as Unused7_0_ FROM Settings_ShellStateRecord this_ WHERE 1=1 ]
[SQL: SELECT top 2 this_.Id as Id7_0_, this_.Unused as Unused7_0_ FROM Settings_ShellStateRecord this_ WHERE 1=1]]
   NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +637
   NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) +23
   NHibernate.Loader.Criteria.CriteriaLoader.List(ISessionImplementor session) +60
   NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria, IList results) +1025
   NHibernate.Impl.CriteriaImpl.List(IList results) +63
   NHibernate.Impl.CriteriaImpl.List() +79
   NHibernate.Linq.Visitors.ImmediateResultsVisitor`1.HandleSingleOrDefaultCall(MethodCallExpression call) +28
   NHibernate.Linq.Visitors.ImmediateResultsVisitor`1.VisitMethodCall(MethodCallExpression call) +692
   NHibernate.Linq.Visitors.ExpressionVisitor.Visit(Expression exp) +456
   NHibernate.Linq.Visitors.ImmediateResultsVisitor`1.GetResults(MethodCallExpression expr) +22
   NHibernate.Linq.Visitors.RootVisitor.HandleImmediateResultsCall(MethodCallExpression call) +237
   NHibernate.Linq.Visitors.RootVisitor.VisitMethodCall(MethodCallExpression expr) +1123
   NHibernate.Linq.Visitors.ExpressionVisitor.Visit(Expression exp) +456
   NHibernate.Linq.Visitors.NHibernateQueryTranslator.TranslateInternal(Expression expression) +99
   NHibernate.Linq.NHibernateQueryProvider.Execute(Expression expression) +17
   NHibernate.Linq.QueryProvider.System.Linq.IQueryProvider.Execute(Expression expression) +25
   System.Linq.Queryable.SingleOrDefault(IQueryable`1 source) +383
   Orchard.Core.Settings.State.ShellStateManager.GetShellState() in d:\TeamCity\Projects\Orchard-1.x\src\Orchard.Web\Core\Settings\State\ShellStateManager.cs:22
   Orchard.Environment.State.ShellStateCoordinator.Orchard.Environment.State.IShellStateManagerEventHandler.ApplyChanges() in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\State\ShellStateCoordinator.cs:108

[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
   Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Events\DefaultOrchardEventBus.cs:86
   Orchard.Events.DefaultOrchardEventBus.TryInvoke(IEventHandler eventHandler, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Events\DefaultOrchardEventBus.cs:76
   Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, Boolean failFast, IEnumerable& returnValue) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Events\DefaultOrchardEventBus.cs:62
   Orchard.Events.<NotifyHandlers>d__0.MoveNext() in d:\TeamCity\Projects\Orchard-1.x\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 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Events\DefaultOrchardEventBus.cs:25
   Orchard.Environment.State.DefaultProcessingEngine.Execute(Entry entry) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\State\DefaultProcessingEngine.cs:90
   Orchard.Environment.State.DefaultProcessingEngine.ExecuteNextTask() in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\State\DefaultProcessingEngine.cs:66
   Orchard.Environment.DefaultOrchardHost.EndRequest() in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\DefaultOrchardHost.cs:168

[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) +266
Jan 23, 2011 at 7:11 AM

I do not take any error, when selecting sql server compact.

Jan 25, 2011 at 7:57 AM

Any help please?

Where is the scripts to create orchard database, tables, views, etc.

Coordinator
Jan 25, 2011 at 6:52 PM

Does the database exist on the server? Orchard doesn't create the database currently (for SqlServer and SqlExpress only), it can only create tables in an existing databatse.

Jan 26, 2011 at 2:46 AM

I had created the database, then selected Orchard to be installed on Sql Server, then this error occured.

I also setup a Sql CE installation, after my investigation on Sql CE installation I got this script from Reports paged, and I ran it on Sql Server type installation.

create table [Orchard_Framework_DataMigrationRecord] ([Id] INT IDENTITY NOT NULL, [DataMigrationClass] NVARCHAR(255) null, [Version] INT null, primary key ( Id ) )  

create table [Settings_ContentFieldDefinitionRecord] ([Id] INT IDENTITY NOT NULL, [Name] NVARCHAR(255) null, primary key ( Id ) )  
create table [Settings_ContentPartDefinitionRecord] ([Id] INT IDENTITY NOT NULL, [Name] NVARCHAR(255) null, [Hidden] BIT null, [Settings] NVARCHAR(MAX) null, primary key ( Id ) )   create table [Settings_ContentPartFieldDefinitionRecord] ([Id] INT IDENTITY NOT NULL, [Name] NVARCHAR(255) null, [Settings] NVARCHAR(MAX) null, [ContentFieldDefinitionRecord_id] INT null, [ContentPartDefinitionRecord_Id] INT null, primary key ( Id ) )   create table [Settings_ContentTypeDefinitionRecord] ([Id] INT IDENTITY NOT NULL, [Name] NVARCHAR(255) null, [DisplayName] NVARCHAR(255) null, [Hidden] BIT null, [Settings] NVARCHAR(MAX) null, primary key ( Id ) )   create table [Settings_ContentTypePartDefinitionRecord] ([Id] INT IDENTITY NOT NULL, [Settings] NVARCHAR(MAX) null, [ContentPartDefinitionRecord_id] INT null, [ContentTypeDefinitionRecord_Id] INT null, primary key ( Id ) )   create table [Settings_ShellDescriptorRecord] ([Id] INT IDENTITY NOT NULL, [SerialNumber] INT null, primary key ( Id ) )   create table [Settings_ShellFeatureRecord] ([Id] INT IDENTITY NOT NULL, [Name] NVARCHAR(255) null, [ShellDescriptorRecord_id] INT null, primary key ( Id ) )  create table [Settings_ShellFeatureStateRecord] ([Id] INT IDENTITY NOT NULL, [Name] NVARCHAR(255) null, [InstallState] NVARCHAR(255) null, [EnableState] NVARCHAR(255) null, [ShellStateRecord_Id] INT null, primary key ( Id ) )  create table [Settings_ShellParameterRecord] ([Id] INT IDENTITY NOT NULL, [Component] NVARCHAR(255) null, [Name] NVARCHAR(255) null, [Value] NVARCHAR(255) null, [ShellDescriptorRecord_id] INT null, primary key ( Id ) )  create table [Settings_ShellStateRecord] ([Id] INT IDENTITY NOT NULL, [Unused] NVARCHAR(255) null, primary key ( Id ) )  create table [Settings_SiteSettingsPartRecord] ([Id] INT not null, [SiteSalt] NVARCHAR(255) null, [SiteName] NVARCHAR(255) null, [SuperUser] NVARCHAR(255) null, [PageTitleSeparator] NVARCHAR(255) null, [HomePage] NVARCHAR(255) null, [SiteCulture] NVARCHAR(255) null, [ResourceDebugMode] NVARCHAR(255) default 'FromAppSetting' null, [PageSize] INT null, primary key ( Id ) )  create table [Orchard_Framework_ContentItemRecord] ([Id] INT IDENTITY NOT NULL, [Data] NVARCHAR(MAX) null, [ContentType_id] INT null, primary key ( Id ) )  create table [Orchard_Framework_ContentItemVersionRecord] ([Id] INT IDENTITY NOT NULL, [Number] INT null, [Published] BIT null, [Latest] BIT null, [Data] NVARCHAR(MAX) null, [ContentItemRecord_id] INT null, primary key ( Id ) )  create table [Orchard_Framework_ContentTypeRecord] ([Id] INT IDENTITY NOT NULL, [Name] NVARCHAR(255) null, primary key ( Id ) )  create table [Orchard_Framework_CultureRecord] ([Id] INT IDENTITY NOT NULL, [Culture] NVARCHAR(255) null, primary key ( Id ) )  
create table [Common_BodyPartRecord] ([Id] INT not null, [ContentItemRecord_id] INT null, [Text] NVARCHAR(MAX) null, [Format] NVARCHAR(255) null, primary key ( Id ) )  
create table [Common_CommonPartRecord] ([Id] INT not null, [OwnerId] INT null, [CreatedUtc] DATETIME null, [PublishedUtc] DATETIME null, [ModifiedUtc] DATETIME null, [Container_id] INT null, primary key ( Id ) )  
create table [Common_CommonPartVersionRecord] ([Id] INT not null, [ContentItemRecord_id] INT null, [CreatedUtc] DATETIME null, [PublishedUtc] DATETIME null, [ModifiedUtc] DATETIME null, primary key ( Id ) )  
create table [Routable_RoutePartRecord] ([Id] INT not null, [ContentItemRecord_id] INT null, [Title] NVARCHAR(1024) null, [Slug] NVARCHAR(1024) null, [Path] NVARCHAR(2048) null, primary key ( Id ) )  
create table [Containers_ContainerPartRecord] ([Id] INT not null, [Paginated] BIT null, [PageSize] INT null, [OrderByProperty] NVARCHAR(255) null, [OrderByDirection] INT null, primary key ( Id ) )  
create table [Containers_ContainerWidgetPartRecord] ([Id] INT not null, [ContainerId] INT null, [PageSize] INT null, [OrderByProperty] NVARCHAR(255) null, [OrderByDirection] INT null, [ApplyFilter] BIT null, [FilterByProperty] NVARCHAR(255) null, [FilterByOperator] NVARCHAR(255) null, [FilterByValue] NVARCHAR(255) null, primary key ( Id ) )  
create table [Containers_CustomPropertiesPartRecord] ([Id] INT not null, [CustomOne] NVARCHAR(255) null, [CustomTwo] NVARCHAR(255) null, [CustomThree] NVARCHAR(255) null, primary key ( Id ) )  
create table [Navigation_MenuItemPartRecord] ([Id] INT not null, [Url] NVARCHAR(1024) null, primary key ( Id ) )  create table [Navigation_MenuPartRecord] ([Id] INT not null, [MenuText] NVARCHAR(255) null, [MenuPosition] NVARCHAR(255) null, [OnMainMenu] BIT null, primary key ( Id ) )  create table [Scheduling_ScheduledTaskRecord] ([Id] INT IDENTITY NOT NULL, [TaskType] NVARCHAR(255) null, [ScheduledUtc] DATETIME null, [ContentItemVersionRecord_id] INT null, primary key ( Id ) )  create table [Orchard_Widgets_LayerPartRecord] ([Id] INT not null, [Name] NVARCHAR(255) null, [Description] NVARCHAR(MAX) null, [LayerRule] NVARCHAR(MAX) null, primary key ( Id ) )  create table [Orchard_Widgets_WidgetPartRecord] ([Id] INT not null, [Title] NVARCHAR(255) null, [Position] NVARCHAR(255) null, [Zone] NVARCHAR(255) null, primary key ( Id ) )
create table [Orchard_Blogs_BlogPartArchiveRecord] ([Id] INT IDENTITY NOT NULL, [Year] INT null, [Month] INT null, [PostCount] INT null, [BlogPart_id] INT null, primary key ( Id ) )  
create table [Orchard_Blogs_BlogPartRecord] ([Id] INT not null, [Description] NVARCHAR(MAX) null, [PostCount] INT null, primary key ( Id ) )  
create table [Orchard_Blogs_RecentBlogPostsPartRecord] ([Id] INT not null, [BlogSlug] NVARCHAR(255) null, [Count] INT null, primary key ( Id ) )  
create table [Orchard_Blogs_BlogArchivesPartRecord] ([Id] INT not null, [BlogSlug] NVARCHAR(255) null, primary key ( Id ) )  
create table [Orchard_Comments_CommentPartRecord] ([Id] INT not null, [Author] NVARCHAR(255) null, [SiteName] NVARCHAR(255) null, [UserName] NVARCHAR(255) null, [Email] NVARCHAR(255) null, [Status] NVARCHAR(255) null, [CommentDateUtc] DATETIME null, [CommentText] NVARCHAR(MAX) null, [CommentedOn] INT null, [CommentedOnContainer] INT null, primary key ( Id ) )  create table [Orchard_Comments_CommentSettingsPartRecord] ([Id] INT not null, [ModerateComments] BIT null, [EnableSpamProtection] BIT null, [AkismetKey] NVARCHAR(255) null, [AkismetUrl] NVARCHAR(255) null, primary key ( Id ) )  
create table [Orchard_Comments_CommentsPartRecord] ([Id] INT not null, [CommentsShown] BIT null, [CommentsActive] BIT null, primary key ( Id ) )  
create table [Orchard_Media_MediaSettingsPartRecord] ([Id] INT not null, [UploadAllowedFileTypeWhitelist] NVARCHAR(255) default 'jpg jpeg gif png txt doc docx xls xlsx pdf ppt pptx pps ppsx odt ods odp' null, primary key ( Id ) )
 create table [Orchard_Users_UserPartRecord] ([Id] INT not null, [UserName] NVARCHAR(255) null, [Email] NVARCHAR(255) null, [NormalizedUserName] NVARCHAR(255) null, [Password] NVARCHAR(255) null, [PasswordFormat] NVARCHAR(255) null, [HashAlgorithm] NVARCHAR(255) null, [PasswordSalt] NVARCHAR(255) null, [RegistrationStatus] NVARCHAR(255) default 'Approved' null, [EmailStatus] NVARCHAR(255) default 'Approved' null, [EmailChallengeToken] NVARCHAR(255) null, primary key ( Id ) )  
create table [Orchard_Users_RegistrationSettingsPartRecord] ([Id] INT not null, [UsersCanRegister] BIT default 0 null, [UsersMustValidateEmail] BIT default 0 null, [ValidateEmailRegisteredWebsite] NVARCHAR(255) null, [ValidateEmailContactEMail] NVARCHAR(255) null, [UsersAreModerated] BIT default 0 null, [NotifyModeration] BIT default 0 null, [NotificationsRecipients] NVARCHAR(MAX) null, [EnableLostPassword] BIT default 0 null, primary key ( Id ) )  
create table [Orchard_Roles_PermissionRecord] ([Id] INT IDENTITY NOT NULL, [Name] NVARCHAR(255) null, [FeatureName] NVARCHAR(255) null, [Description] NVARCHAR(255) null, primary key ( Id ) )  
create table [Orchard_Roles_RoleRecord] ([Id] INT IDENTITY NOT NULL, [Name] NVARCHAR(255) null, primary key ( Id ) )  
create table [Orchard_Roles_RolesPermissionsRecord] ([Id] INT IDENTITY NOT NULL, [Role_id] INT null, [Permission_id] INT null, [RoleRecord_Id] INT null, primary key ( Id ) )  
create table [Orchard_Roles_UserRolesPartRecord] ([Id] INT IDENTITY NOT NULL, [UserId] INT null, [Role_id] INT null, primary key ( Id ) )  
create table [Orchard_Tags_TagsPartRecord] ([Id] INT not null, primary key ( Id ) )  
create table [Orchard_Tags_TagRecord] ([Id] INT IDENTITY NOT NULL, [TagName] NVARCHAR(255) null, primary key ( Id ) )  
create table [Orchard_Tags_ContentTagRecord] ([Id] INT IDENTITY NOT NULL, [TagRecord_Id] INT null, [TagsPartRecord_Id] INT null, primary key ( Id ) )  
create table [Orchard_Themes_ThemeSiteSettingsPartRecord] ([Id] INT not null, [CurrentThemeName] NVARCHAR(255) null, primary key ( Id ) )  
create table [Orchard_Packaging_PackagingSource] ([Id] INT IDENTITY NOT NULL, [FeedTitle] NVARCHAR(255) null, [FeedUrl] NVARCHAR(2048) null, primary key ( Id ) )  

 

I think there was a problem when creating tables on Sql Server installation. Maybe this was because Turkish I Problem, I don't know.

After these steps I got a new error as follows : 

Server Error in '/Orchard.Web' Application.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 


Source File: C:\Orchard\src\Orchard.Web\Core\Shapes\CoreShapes.cs    Line: 36 

Stack Trace: 



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

Line 34:         private IResourceManager ResourceManager {
Line 35:             get {
Line 36:                 return _workContextAccessor.GetContext(_httpContextAccessor.Current()).Resolve<IResourceManager>();
Line 37:             }
Line 38:         }
[NullReferenceException: Object reference not set to an instance of an object.]
   Orchard.Core.Shapes.CoreShapes.get_ResourceManager() in C:\Orchard\src\Orchard.Web\Core\Shapes\CoreShapes.cs:36
   Orchard.Core.Shapes.CoreShapes.Metas(TextWriter Output) in C:\Orchard\src\Orchard.Web\Core\Shapes\CoreShapes.cs:206

[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) +72
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +251
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
   Orchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.ShapeAttributeBindingStrategy.PerformInvoke(DisplayContext displayContext, MethodInfo methodInfo, Object serviceInstance) in ShapeAttributeBindingStrategy.cs:64
   Orchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.<>c__DisplayClass4.<CreateDelegate>b__3(DisplayContext context) in ShapeAttributeBindingStrategy.cs:55
   Orchard.DisplayManagement.Descriptors.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in ShapeAlterationBuilder.cs:55
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in DefaultDisplayManager.cs:161
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in DefaultDisplayManager.cs:74
   Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in DisplayHelper.cs:71
   Orchard.DisplayManagement.Implementation.DisplayHelper.Invoke(String name, INamedEnumerable`1 parameters) in DisplayHelper.cs:38
   Orchard.DisplayManagement.Implementation.DisplayHelperBehavior.InvokeMember(Func`1 proceed, Object target, String name, INamedEnumerable`1 args) in DisplayHelperFactory.cs:27
   ClaySharp.<>c__DisplayClass10.<InvokeMember>b__d() +29
   ClaySharp.ClayBehaviorCollection.Execute(Func`1 proceed, Func`3 linker) +25
   ClaySharp.ClayBehaviorCollection.InvokeMember(Func`1 proceed, Object self, String name, INamedEnumerable`1 args) +92
   Orchard.Core.Shapes.CoreShapes.DocumentZone(Object Display, Object Shape, TextWriter Output) in C:\Orchard\src\Orchard.Web\Core\Shapes\CoreShapes.cs:150

[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) +72
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +251
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
   Orchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.ShapeAttributeBindingStrategy.PerformInvoke(DisplayContext displayContext, MethodInfo methodInfo, Object serviceInstance) in ShapeAttributeBindingStrategy.cs:64
   Orchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.<>c__DisplayClass4.<CreateDelegate>b__3(DisplayContext context) in ShapeAttributeBindingStrategy.cs:55
   Orchard.DisplayManagement.Descriptors.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in ShapeAlterationBuilder.cs:55
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in DefaultDisplayManager.cs:161
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in DefaultDisplayManager.cs:74
   Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in DisplayHelper.cs:71
   Orchard.DisplayManagement.Implementation.DisplayHelper.Invoke(String name, INamedEnumerable`1 parameters) in DisplayHelper.cs:38
   Orchard.DisplayManagement.Implementation.DisplayHelperBehavior.InvokeMember(Func`1 proceed, Object target, String name, INamedEnumerable`1 args) in DisplayHelperFactory.cs:27
   ClaySharp.<>c__DisplayClass10.<InvokeMember>b__d() +29
   ClaySharp.ClayBehaviorCollection.Execute(Func`1 proceed, Func`3 linker) +25
   ClaySharp.ClayBehaviorCollection.InvokeMember(Func`1 proceed, Object self, String name, INamedEnumerable`1 args) +92
   ASP._Page_Themes_SafeMode_Views_Document_cshtml.Execute() in c:\Orchard\src\Orchard.Web\Themes\SafeMode\Views\Document.cshtml:17
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +209
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +89
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +90
   System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +199
   System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107
   System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName, ViewDataDictionary viewData, Object model, TextWriter writer, ViewEngineCollection viewEngineCollection) +280
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +96
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model) +33
   Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.Render(ShapeDescriptor shapeDescriptor, DisplayContext displayContext, HarvestShapeInfo harvestShapeInfo, HarvestShapeHit harvestShapeHit) in ShapeTemplateBindingStrategy.cs:121
   Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.<>c__DisplayClass26.<Discover>b__14(DisplayContext displayContext) in ShapeTemplateBindingStrategy.cs:109
   Orchard.DisplayManagement.Descriptors.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in ShapeAlterationBuilder.cs:55
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in DefaultDisplayManager.cs:161
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in DefaultDisplayManager.cs:83
   Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in DisplayHelper.cs:71
   Orchard.DisplayManagement.Implementation.DisplayHelper.Invoke(String name, INamedEnumerable`1 parameters) in DisplayHelper.cs:38
   Orchard.DisplayManagement.Implementation.DisplayHelperBehavior.InvokeMember(Func`1 proceed, Object target, String name, INamedEnumerable`1 args) in DisplayHelperFactory.cs:27
   ClaySharp.<>c__DisplayClass10.<InvokeMember>b__d() +29
   ClaySharp.ClayBehaviorCollection.Execute(Func`1 proceed, Func`3 linker) +25
   ClaySharp.ClayBehaviorCollection.InvokeMember(Func`1 proceed, Object self, String name, INamedEnumerable`1 args) +92
   Orchard.Mvc.ViewEngines.ThemeAwareness.<>c__DisplayClass7.<FindView>b__5(ViewContext viewContext, TextWriter writer, IViewDataContainer viewDataContainer) in LayoutAwareViewEngine.cs:58
   Orchard.Mvc.ViewEngines.ThemeAwareness.LayoutView.Render(ViewContext viewContext, TextWriter writer) in LayoutAwareViewEngine.cs:84
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +291
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
   System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +23
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +264
   System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +20
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +264
   System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +20
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +264
   System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +20
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +264
   System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +20
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +264
   System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +20
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +176
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +329
   System.Web.Mvc.Controller.ExecuteCore() +115
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +93
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +31
   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +23
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +59
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) in ShellRoute.cs:155
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8841105
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

 

Thanks for your interest.

Coordinator
Jan 26, 2011 at 6:10 AM

Hmm... I don't know what's going on there. Let's go back to the basics:

What is the environement you deploying Orchard to?

How did you deploy Orchard (WebMatrix, MsDeploy, Visual Studio, xcopy, ftp, etc.)?

Can you check the log files (App_Data\Logs) and see if there are any relevant errors logged there?

Jan 26, 2011 at 7:06 AM

The enviroment is Windows 7, IIS, unzipped the zip file.

The error in App_Data\Logs is as follows :

 

2011-01-26 09:01:46,919 [7] NHibernate.AdoNet.AbstractBatcher - Could not execute query: SELECT top 2 this_.Id as Id9_0_, this_.SerialNumber as SerialNu2_9_0_ FROM Settings_ShellDescriptorRecord this_ WHERE 1=1

System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Settings_ShellDescriptorRecord'.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()

   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()

   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)

   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)

   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)

2011-01-26 09:01:46,952 [7] NHibernate.Util.ADOExceptionReporter - Invalid object name 'Settings_ShellDescriptorRecord'.

2011-01-26 09:01:46,957 [7] NHibernate.Util.ADOExceptionReporter - Invalid object name 'Settings_ShellDescriptorRecord'.

2011-01-26 09:01:48,905 [7] NHibernate.AdoNet.AbstractBatcher - Could not execute command: UPDATE Settings_ShellFeatureRecord SET ShellDescriptorRecord_Id = @p0 WHERE Id = @p1

System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'ShellDescriptorRecord_Id'.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()

   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

   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)

   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)

   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)

   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

   at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd)

2011-01-26 09:01:48,920 [7] NHibernate.Util.ADOExceptionReporter - Invalid column name 'ShellDescriptorRecord_Id'.

2011-01-26 09:01:48,920 [7] NHibernate.Event.Default.AbstractFlushingEventListener - Could not synchronize database state with session

NHibernate.Exceptions.GenericADOException: could not insert collection: [Orchard.Core.Settings.Descriptor.Records.ShellDescriptorRecord.Features#1][SQL: UPDATE Settings_ShellFeatureRecord SET ShellDescriptorRecord_Id = @p0 WHERE Id = @p1] ---> System.Data.SqlClient.SqlException: Invalid column name 'ShellDescriptorRecord_Id'.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()

   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

   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)

   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)

   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)

   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

   at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd)

   at NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IExpectation expectation)

   at NHibernate.Persister.Collection.AbstractCollectionPersister.PerformInsert(Object ownerId, IPersistentCollection collection, IExpectation expectation, Object entry, Int32 index, Boolean useBatch, Boolean callable, ISessionImplementor session)

   at NHibernate.Persister.Collection.AbstractCollectionPersister.Recreate(IPersistentCollection collection, Object id, ISessionImplementor session)

   --- End of inner exception stack trace ---

   at NHibernate.Persister.Collection.AbstractCollectionPersister.Recreate(IPersistentCollection collection, Object id, ISessionImplementor session)

   at NHibernate.Action.CollectionRecreateAction.Execute()

   at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)

   at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)

   at NHibernate.Engine.ActionQueue.ExecuteActions()

   at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session)

2011-01-26 09:01:49,111 [7] NHibernate.Impl.AbstractSessionImpl - DTC transaction prepre phase failed

NHibernate.Exceptions.GenericADOException: could not insert collection: [Orchard.Core.Settings.Descriptor.Records.ShellDescriptorRecord.Features#1][SQL: UPDATE Settings_ShellFeatureRecord SET ShellDescriptorRecord_Id = @p0 WHERE Id = @p1] ---> System.Data.SqlClient.SqlException: Invalid column name 'ShellDescriptorRecord_Id'.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()

   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

   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)

   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)

   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)

   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

   at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd)

   at NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IExpectation expectation)

   at NHibernate.Persister.Collection.AbstractCollectionPersister.PerformInsert(Object ownerId, IPersistentCollection collection, IExpectation expectation, Object entry, Int32 index, Boolean useBatch, Boolean callable, ISessionImplementor session)

   at NHibernate.Persister.Collection.AbstractCollectionPersister.Recreate(IPersistentCollection collection, Object id, ISessionImplementor session)

   --- End of inner exception stack trace ---

   at NHibernate.Persister.Collection.AbstractCollectionPersister.Recreate(IPersistentCollection collection, Object id, ISessionImplementor session)

   at NHibernate.Action.CollectionRecreateAction.Execute()

   at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)

   at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)

   at NHibernate.Engine.ActionQueue.ExecuteActions()

   at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session)

   at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event)

   at NHibernate.Impl.SessionImpl.Flush()

   at NHibernate.Transaction.AdoNetWithDistrubtedTransactionFactory.DistributedTransactionContext.System.Transactions.IEnlistmentNotification.Prepare(PreparingEnlistment preparingEnlistment)

2011-01-26 09:01:49,732 [7] NHibernate.AdoNet.AbstractBatcher - Could not execute query: SELECT top 2 this_.Id as Id99_0_, this_.Unused as Unused99_0_ FROM Settings_ShellStateRecord this_ WHERE 1=1

System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Settings_ShellStateRecord'.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()

   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()

   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)

   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)

   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)

2011-01-26 09:01:49,733 [7] NHibernate.Util.ADOExceptionReporter - Invalid object name 'Settings_ShellStateRecord'.

2011-01-26 09:01:49,733 [7] NHibernate.Util.ADOExceptionReporter - Invalid object name 'Settings_ShellStateRecord'.

2011-01-26 09:01:49,734 [7] Orchard.Events.DefaultOrchardEventBus - TargetInvocationException thrown from IShellStateManagerEventHandler.ApplyChanges by Orchard.Environment.State.ShellStateCoordinator

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> NHibernate.ADOException: could not execute query

[ SELECT top 2 this_.Id as Id99_0_, this_.Unused as Unused99_0_ FROM Settings_ShellStateRecord this_ WHERE 1=1 ]

[SQL: SELECT top 2 this_.Id as Id99_0_, this_.Unused as Unused99_0_ FROM Settings_ShellStateRecord this_ WHERE 1=1] ---> System.Data.SqlClient.SqlException: Invalid object name 'Settings_ShellStateRecord'.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()

   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()

   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)

   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)

   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)

   at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session)

   at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies)

   at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies)

   at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)

   --- End of inner exception stack trace ---

   at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)

   at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters)

   at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes)

   at NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria, IList results)

   at NHibernate.Impl.CriteriaImpl.List(IList results)

   at NHibernate.Impl.CriteriaImpl.List[T]()

   at NHibernate.Linq.Visitors.ImmediateResultsVisitor`1.GetElementList(MethodCallExpression call, Int32 count)

   at NHibernate.Linq.Visitors.ImmediateResultsVisitor`1.HandleSingleOrDefaultCall(MethodCallExpression call)

   at NHibernate.Linq.Visitors.ImmediateResultsVisitor`1.VisitMethodCall(MethodCallExpression call)

   at NHibernate.Linq.Visitors.ExpressionVisitor.Visit(Expression exp)

   at NHibernate.Linq.Visitors.NHibernateExpressionVisitor.Visit(Expression exp)

   at NHibernate.Linq.Visitors.ImmediateResultsVisitor`1.GetResults(MethodCallExpression expr)

   at NHibernate.Linq.Visitors.RootVisitor.HandleImmediateResultsCall(MethodCallExpression call)

   at NHibernate.Linq.Visitors.RootVisitor.VisitMethodCall(MethodCallExpression expr)

   at NHibernate.Linq.Visitors.ExpressionVisitor.Visit(Expression exp)

   at NHibernate.Linq.Visitors.NHibernateExpressionVisitor.Visit(Expression exp)

   at NHibernate.Linq.Visitors.NHibernateQueryTranslator.TranslateInternal(Expression expression)

   at NHibernate.Linq.Visitors.NHibernateQueryTranslator.Translate(Expression expression, QueryOptions queryOptions)

   at NHibernate.Linq.NHibernateQueryProvider.TranslateExpression(Expression expression)

   at NHibernate.Linq.NHibernateQueryProvider.Execute(Expression expression)

   at NHibernate.Linq.QueryProvider.System.Linq.IQueryProvider.Execute[T](Expression expression)

   at System.Linq.Queryable.SingleOrDefault[TSource](IQueryable`1 source)

   at Orchard.Data.Repository`1.Get(Expression`1 predicate) in C:\Orchard\src\Orchard\Data\Repository.cs:line 91

   at Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Get(Expression`1 predicate) in C:\Orchard\src\Orchard\Data\Repository.cs:line 60

   at Orchard.Core.Settings.State.ShellStateManager.GetShellState() in C:\Orchard\src\Orchard.Web\Core\Settings\State\ShellStateManager.cs:line 22

   at Orchard.Environment.State.ShellStateCoordinator.Orchard.Environment.State.IShellStateManagerEventHandler.ApplyChanges() in C:\Orchard\src\Orchard\Environment\State\ShellStateCoordinator.cs:line 108

   --- End of inner exception stack trace ---

   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)

   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)

   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)

   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)

   at Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in C:\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 85

   at Orchard.Events.DefaultOrchardEventBus.TryInvoke(IEventHandler eventHandler, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in C:\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 71

   at Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, Boolean failFast, IEnumerable& returnValue) in C:\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 51

 

I see that there is not any tables created yet.

Thanks.

Jan 28, 2011 at 6:50 AM

I got exactly same error on SQL 2005 Chinese version. another deployment on SQL 2008 R2 was fine. Doesn't Orchard support other language versions of sql database?

Coordinator
Jan 28, 2011 at 7:00 AM

Maybe the problem is 2005, not Chinese?

Jan 28, 2011 at 7:23 AM

I tried on Sql2008 compatibility level to 90 (sql 2005) and this was OK

Jan 28, 2011 at 7:25 AM

for the failure deployment, I noticed there's no table created at all, that's why got the message "

Invalid object name 'Settings_ShellStateRecord'

 

as the table Settings_ShellStateRecord isn't there

Jan 28, 2011 at 5:26 PM

Yes, I saw that. But why is that? How can I resolve this stuation?

Jan 29, 2011 at 12:22 PM

hi seyfullah, do you use sql 2005? and what language?

Feb 9, 2011 at 1:46 AM

Hi Jasper, thank you for your input. I tried deleting AppData folder but still cannot create a site with sql 2005 database. How did you do?

Feb 9, 2011 at 7:11 AM

Hello,

I was trying to install umbraco. I saw a similar database problem. Then I converted my database collation from Turkish_CI_AS to SQL_Latin_General_1250_CI_AS, and then the problem was solved.

I think Orchard database problem is the same. The generated sql clauses are English culture specific.

In my case I think it is because of Turkish I problem.

Thanks.

Feb 10, 2011 at 8:26 AM

That solved my problem. Thanks Seyfullah!

Feb 11, 2011 at 2:05 AM

thank you Seyfullah. This fixed my problem too. using SQL_Latin_General_CI_AS also works on my Chinese SQL 2005

Jun 10, 2011 at 9:59 PM
Edited Jun 10, 2011 at 10:01 PM

My problem is also the same. "The pathetic Turkish i problem."

In order to fix this I would like to review SQL sentences that create the core database tables so I can fix them (for example rewriting Unit_id as Unit_Id).

But I could not locate those SQL scripts used in the initial setup.

Any ideas?

Jun 11, 2011 at 11:52 AM

All the SQL is generated on-the-fly via Fluent NHibernate. Each module has a Migrations class that calls AddColumn, CreateTable and so forth to define the database schema. So if this is the problem, it needs to be fixed either in the migrations system, or in NHibernate.

But I'm a bit confused as to why rewriting Unit_id as Unit_Id would be the solution to this. I read that link about the Turkish "i" problem and it's pretty interesting and something I wasn't aware of. But surely the solution is just to explicitly tell the database what the culture is, rather than changing an underlying convention of the whole database, and probably creating all kinds of problems with foreign keys in various modules!

Jun 11, 2011 at 1:07 PM

Let me try to explain.

In Turkish alphabet there are two separate letters "i" and "ı". Their capitals are "İ" and "I" respectively.

But you know in English alphabet there is only "i" and its capital form is "I".

So, if you try to install Orchard on a database whose collation is in Turkish (ie. Turkish_CI_AS) it immediately throws the mentioned error "Invalid object name 'Settings_ShellStateRecord" without creating any table.

In my opinion it is something related with the foreign key relationships between tables.

When a part record is created, in order to define the connection for another record we use "SubPartRecord_Id" notation in migration.cs file. But ".ContentPartRecord()" directive creates the column name as "Id" not "id".

So if it were written as SubPartRecord_id I think the system gets into trouble.

I will rewrite all "_id" declarations in migration files and will share the result.

 

Jun 11, 2011 at 1:12 PM
I tried to change sql collation as Turkish and the scripts failed, when I changed database collation as English it worked.

SEYFULLAH TIKI�





From: [email removed]
To: [email removed]
Date: Sat, 11 Jun 2011 03:52:41 -0700
Subject: Re: Invalid object name 'Settings_ShellStateRecord' [orchard:242897]

From: randompete
All the SQL is generated on-the-fly via Fluent NHibernate. Each module has a Migrations class that calls AddColumn, CreateTable and so forth to define the database schema. So if this is the problem, it needs to be fixed either in the migrations system, or in NHibernate.
But I'm a bit confused as to why rewriting Unit_id as Unit_Id would be the solution to this. I read that link about the Turkish "i" problem and it's pretty interesting and something I wasn't aware of. But surely the solution is just to explicitly tell the database what the culture is, rather than changing an underlying convention of the whole database, and probably creating all kinds of problems with foreign keys in various modules!
Read the full discussion online.
To add a post to this discussion, reply to this email (orchard@discussions.codeplex.com)
To start a new discussion for this project, email orchard@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Jun 11, 2011 at 1:24 PM

It works for sure. But doesn't it affect content sorting?

Jun 11, 2011 at 2:49 PM

I changed the declarations in Orchard source migration files to Id versions. (Like ContentItemVersionRecord_id to ContentItemVersionRecord_Id)

I created a database with Turkish_CI_AS and tried to install the system. No luck. Again it threw immediately "Invalid object name 'Settings_ShellStateRecord" error.

Then I changed the database collation to English (SQL_Latin1_General_CP1_CI_AS) and the installation went successful. No errors or even error logs observed.

After this, I set db collation back to Turkish_CI_AS but the site does not launch now. It throws an error Invalid column name 'ShellDescriptorRecord_id'.

I searched again and again (case sensitive) for the word "ShellDescriptorRecord_id" in Visual Studio for the entire solution. But there no results found. Is it hardcoded in some file?

I started the site in debug mode. The error throws from Orchard.Startup/Starter.cs.

In details it is written:

could not initialize a collection: [Orchard.Core.Settings.Descriptor.Records.ShellDescriptorRecord.Features#1][SQL: SELECT features0_.ShellDescriptorRecord_Id as ShellDes3_1_, features0_.Id

as Id1_, features0_.Id as Id11_0_, features0_.Name as Name11_0_, features0_.ShellDescriptorRecord_id as ShellDes3_11_0_ FROM Settings_ShellFeatureRecord features0_ WHERE features0_.ShellDescriptorRecord_Id=?]

Somehow the system finds a lower case version "ShellDescriptorRecord_id" as it can be seen in the above query like features0_.ShellDescriptorRecord_id as ShellDes3_11_0_

Need help.

 

 

ContentItemVersionRecord_id
Coordinator
Jun 11, 2011 at 8:16 PM

It might be worth filing a bug in the issue tracker.