Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Failed on Postgresql 11 #8276

Closed
rthm93 opened this issue Sep 5, 2019 · 1 comment · Fixed by #8810
Closed

Setup Failed on Postgresql 11 #8276

rthm93 opened this issue Sep 5, 2019 · 1 comment · Fixed by #8810
Milestone

Comments

@rthm93
Copy link

rthm93 commented Sep 5, 2019

I faced the following error while trying to setup with Postgresql.

Setup failed: could not execute query
[ select rolerecord0_.Id as Id176_, rolerecord0_.Name as Name176_ from orchard_Orchard_Roles_RoleRecord rolerecord0_ where rolerecord0_.Name=:p0 ]
Name:p1 - Value:Anonymous
[SQL: select rolerecord0_.Id as Id176_, rolerecord0_.Name as Name176_ from orchard_Orchard_Roles_RoleRecord rolerecord0_ where rolerecord0_.Name=:p0]

Repro steps:

  1. Clone latest version from current repo.
  2. Open Orchard.sln in /src folder with Visual Studio 2019 Community Edition
  3. Press F5 to run
  4. Fill in necessary information and choose default recipe

PostgreSQL version: "PostgreSQL 11.5, compiled by Visual C++ build 1914, 64-bit"

@sebastienros sebastienros added this to the 1.10.x milestone Sep 5, 2019
@rthm93
Copy link
Author

rthm93 commented Sep 7, 2019

The following are the stack trace of exception, hope it helps.

   at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters, IResultTransformer forcedResultTransformer)
   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.Loader.Hql.QueryLoader.List(ISessionImplementor session, QueryParameters queryParameters)
   at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.List(ISessionImplementor session, QueryParameters queryParameters)
   at NHibernate.Engine.Query.HQLQueryPlan.PerformList(QueryParameters queryParameters, ISessionImplementor session, IList results)
   at NHibernate.Impl.SessionImpl.List(IQueryExpression queryExpression, QueryParameters queryParameters, IList results)
   at NHibernate.Impl.AbstractSessionImpl.List(IQueryExpression queryExpression, QueryParameters parameters)
   at NHibernate.Impl.AbstractQueryImpl2.List()
   at NHibernate.Linq.DefaultQueryProvider.ExecuteQuery(NhLinqExpression nhLinqExpression, IQuery query, NhLinqExpression nhQuery)
   at NHibernate.Linq.DefaultQueryProvider.Execute(Expression expression)
   at NHibernate.Linq.DefaultQueryProvider.Execute[TResult](Expression expression)
   at System.Linq.Queryable.SingleOrDefault[TSource](IQueryable`1 source)
   at Orchard.Data.Repository`1.Get(Expression`1 predicate) in E:\Git\Orchard\src\Orchard\Data\Repository.cs:line 88
   at Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Get(Expression`1 predicate) in E:\Git\Orchard\src\Orchard\Data\Repository.cs:line 57
   at Orchard.Roles.Services.RoleService.GetRoleByName(String name)
   at Orchard.Roles.Services.RoleService.GetPermissionsForRoleByNameInner(String name)
   at Orchard.Roles.Services.RoleService.<>c__DisplayClass28_0.<GetPermissionsForRoleByName>b__0(AcquireContext`1 ctx)
   at Orchard.Caching.Cache`2.CreateEntry(TKey k, Func`2 acquire) in E:\Git\Orchard\src\Orchard\Caching\Cache.cs:line 57
   at Orchard.Caching.Cache`2.AddEntry(TKey k, Func`2 acquire) in E:\Git\Orchard\src\Orchard\Caching\Cache.cs:line 27
   at Orchard.Caching.Cache`2.<>c__DisplayClass3_0.<Get>b__0(TKey k) in E:\Git\Orchard\src\Orchard\Caching\Cache.cs:line 19
   at System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFactory, Func`3 updateValueFactory)
   at Orchard.Caching.Cache`2.Get(TKey key, Func`2 acquire) in E:\Git\Orchard\src\Orchard\Caching\Cache.cs:line 17
   at Orchard.Caching.DefaultCacheManager.Get[TKey,TResult](TKey key, Func`2 acquire) in E:\Git\Orchard\src\Orchard\Caching\DefaultCacheManager.cs:line 33
   at Orchard.Roles.Services.RoleService.GetPermissionsForRoleByName(String name)
   at Orchard.Roles.Services.RolesBasedAuthorizationService.TryCheckAccess(Permission permission, IUser user, IContent content)
   at Orchard.Security.Authorizer.Authorize(Permission permission, IContent content, LocalizedString message) in E:\Git\Orchard\src\Orchard\Security\Authorizer.cs:line 72
   at Orchard.Security.Authorizer.Authorize(Permission permission) in E:\Git\Orchard\src\Orchard\Security\Authorizer.cs:line 60
   at Orchard.Exceptions.DefaultExceptionPolicy.RaiseNotification(Exception exception) in E:\Git\Orchard\src\Orchard\Exceptions\DefaultExceptionPolicy.cs:line 69
   at Orchard.Exceptions.DefaultExceptionPolicy.HandleException(Object sender, Exception exception) in E:\Git\Orchard\src\Orchard\Exceptions\DefaultExceptionPolicy.cs:line 44
   at Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, IEnumerable& returnValue) in E:\Git\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 59
   at Orchard.Events.DefaultOrchardEventBus.<NotifyHandlers>d__9.MoveNext() in E:\Git\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 41
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Orchard.Events.DefaultOrchardEventBus.Notify(String messageName, IDictionary`2 eventData) in E:\Git\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 27
   at Orchard.Events.EventsInterceptor.Intercept(IInvocation invocation) in E:\Git\Orchard\src\Orchard\Events\EventsInterceptor.cs:line 26
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at Castle.Proxies.IFeatureEventHandlerProxy.Installed(Feature feature)
   at Orchard.Environment.State.ShellStateCoordinator.Orchard.Environment.State.IShellStateManagerEventHandler.ApplyChanges() in E:\Git\Orchard\src\Orchard\Environment\State\ShellStateCoordinator.cs:line 180
   at Orchard.Events.DelegateHelper.<>c__DisplayClass13_0`1.<BuildAction>b__0(Object target, Object[] p) in E:\Git\Orchard\src\Orchard\Events\DelegateHelper.cs:line 110
   at Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String messageName, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in E:\Git\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 84
   at Orchard.Events.DefaultOrchardEventBus.TryInvoke(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in E:\Git\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 70
   at Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, IEnumerable& returnValue) in E:\Git\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 53

BenedekFarkas added a commit that referenced this issue Dec 6, 2024
)

* Updating Npgsql to version 4.0.17 (the latest minor version of the closest major version that isn't vulnerable)

https://github.com/OrchardCMS/Orchard/security/dependabot/54

* Fixing that Projection Migrations created indexes with the same name in different tables, which is not supported by PostgreSQL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants