Exception during Alias refresh after upgrading to 1.8 from 1.6

Topics: Customizing Orchard
Apr 19, 2014 at 6:11 PM
HI,

I have recently upgraded my orchard site and custom module from 1.6 to 1.8. Suddenly my module is not working, I am getting error in creating and editing my custom type. I disabled my module but i keep getting following exception on any operation.

Any help is greatly appreciated.

Regards,
2014-04-19 12:07:15,169 [40] Orchard.DisplayManagement.Implementation.DefaultDisplayManager - Default - __NullReferenceException thrown from Action`1 by System.Action`1[[Orchard.DisplayManagement.Implementation.ShapeDisplayingContext,__ Orchard.Framework, Version=1.8.0.0, Culture=neutral, PublicKeyToken=null]]
 http://localhost:30321/OrchardLocal/Admin/Contents/Create/Question
System.NullReferenceException: Object reference not set to an instance of an object.
   at Orchard.Lists.Shapes.<Discover>b__8(ShapeDisplayingContext context)
   at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.<>c__DisplayClassc.<Execute>b__3(Action`1 action) in d:\Workspace\ApproachLabs\OrchardCmsDev\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:line 74
   at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable`1 events, Action`1 dispatch, ILogger logger) in d:\Workspace\ApproachLabs\OrchardCmsDev\src\Orchard\InvokeExtensions.cs:line 17
2014-04-19 12:08:34,478 [41] Orchard.DisplayManagement.Implementation.DefaultDisplayManager - Default - NullReferenceException thrown from Action`1 by System.Action`1[[Orchard.DisplayManagement.Implementation.ShapeDisplayingContext, Orchard.Framework, Version=1.8.0.0, Culture=neutral, PublicKeyToken=null]]
 http://localhost:30321/OrchardLocal/Admin/Contents/Edit/33
System.NullReferenceException: Object reference not set to an instance of an object.
   at Orchard.Lists.Shapes.<Discover>b__8(ShapeDisplayingContext context)
   at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.<>c__DisplayClassc.<Execute>b__3(Action`1 action) in d:\Workspace\ApproachLabs\OrchardCmsDev\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:line 74
   at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable`1 events, Action`1 dispatch, ILogger logger) in d:\Workspace\ApproachLabs\OrchardCmsDev\src\Orchard\InvokeExtensions.cs:line 17
2014-04-19 12:10:02,857 [48] Orchard.Alias.Implementation.Updater.AliasHolderUpdater - (null) - Exception during Alias refresh
 (null)
NHibernate.Exceptions.GenericADOException: could not execute query
[ select aliasrecor0_.Id as Id1990_, aliasrecor0_.Path as Path1990_, aliasrecor0_.RouteValues as RouteVal3_1990_, aliasrecor0_.Source as Source1990_, aliasrecor0_.Action_id as Action5_1990_ from ag_Orchard_Alias_AliasRecord aliasrecor0_ where aliasrecor0_.Id>@p0 order by aliasrecor0_.Id asc ]
  Name:p1 - Value:19
[SQL: select aliasrecor0_.Id as Id1990_, aliasrecor0_.Path as Path1990_, aliasrecor0_.RouteValues as RouteVal3_1990_, aliasrecor0_.Source as Source1990_, aliasrecor0_.Action_id as Action5_1990_ from ag_Orchard_Alias_AliasRecord aliasrecor0_ where aliasrecor0_.Id>@p0 order by aliasrecor0_.Id asc] ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: The wait operation timed out
   --- End of inner exception stack trace ---
   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.TrySetMetaData(_SqlMetaDataSet metaData, Boolean moreInfo)
   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, SqlDataReader ds)
   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) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\AdoNet\AbstractBatcher.cs:line 229
   at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 1224
   at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 419
   at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 251
   at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 1564
   --- End of inner exception stack trace ---
   at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 1571
   at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 1472
   at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 1465
   at NHibernate.Hql.Ast.ANTLR.Loader.QueryLoader.List(ISessionImplementor session, QueryParameters queryParameters) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Hql\Ast\ANTLR\Loader\QueryLoader.cs:line 288
   at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.List(ISessionImplementor session, QueryParameters queryParameters) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Hql\Ast\ANTLR\QueryTranslatorImpl.cs:line 109
   at NHibernate.Engine.Query.HQLQueryPlan.PerformList(QueryParameters queryParameters, ISessionImplementor session, IList results) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Engine\Query\HQLQueryPlan.cs:line 89
   at NHibernate.Impl.SessionImpl.List(IQueryExpression queryExpression, QueryParameters queryParameters, IList results) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Impl\SessionImpl.cs:line 659
   at NHibernate.Impl.AbstractSessionImpl.List(IQueryExpression queryExpression, QueryParameters parameters) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Impl\AbstractSessionImpl.cs:line 92
   at NHibernate.Impl.ExpressionQueryImpl.List() in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Impl\ExpressionQueryImpl.cs:line 58
   at NHibernate.Linq.DefaultQueryProvider.ExecuteQuery(NhLinqExpression nhLinqExpression, IQuery query, NhLinqExpression nhQuery) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Linq\DefaultQueryProvider.cs:line 103
   at NHibernate.Linq.DefaultQueryProvider.Execute(Expression expression) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Linq\DefaultQueryProvider.cs:line 35
   at NHibernate.Linq.DefaultQueryProvider.Execute[TResult](Expression expression) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Linq\DefaultQueryProvider.cs:line 40
   at Remotion.Linq.QueryableBase`1.GetEnumerator() in :line 0
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Orchard.Alias.Implementation.Storage.AliasStorage.List(Expression`1 predicate)
   at Orchard.Alias.Implementation.Updater.AliasHolderUpdater.Refresh()
2014-04-19 12:11:02,567 [8] Orchard.Alias.Implementation.Updater.AliasHolderUpdater - (null) - Exception during Alias refresh
 (null)
NHibernate.Exceptions.GenericADOException: could not execute query
[ select aliasrecor0_.Id as Id1990_, aliasrecor0_.Path as Path1990_, aliasrecor0_.RouteValues as RouteVal3_1990_, aliasrecor0_.Source as Source1990_, aliasrecor0_.Action_id as Action5_1990_ from ag_Orchard_Alias_AliasRecord aliasrecor0_ where aliasrecor0_.Id>@p0 order by aliasrecor0_.Id asc ]
Apr 20, 2014 at 8:05 PM
I have figured out that issue is manifestation of following defect.

https://orchard.codeplex.com/workitem/20411