Repository navigation
Closed
Milestone
Description
After upgrade I am getting strange error:
System.Exception: Error trying to fetch w/ sql 'SELECT schemaname, relname FROM pg_stat_user_tables WHERE relname LIKE ? AND schemaname = ANY(?);'
---> System.MissingMethodException: Method not found: 'Npgsql.NpgsqlDataReader Npgsql.NpgsqlCommand.ExecuteReader()'.
at Marten.Util.CommandExtensions.Fetch[T](NpgsqlCommand cmd, String sql, Func`2 transform, Object[] parameters)
at Marten.Storage.TenantExtensions.<>c__DisplayClass4_0`1.<Fetch>b__0(NpgsqlConnection conn)
--- End of inner exception stack trace ---
at Marten.Storage.TenantExtensions.<>c__DisplayClass4_0`1.<Fetch>b__0(NpgsqlConnection conn)
at Marten.Storage.TenantExtensions.execute[T](ITenant tenant, Func`2 func)
at Marten.Storage.TenantExtensions.Fetch[T](ITenant tenant, String sql, Func`2 transform, Object[] parameters)
at Marten.Schema.DbObjects.SchemaTables()
at Marten.Schema.DocumentCleaner.CompletelyRemoveAll()
at CryptoAnalysis.Auth.Api.Startup.InitializeDatabase() in /src/CryptoAnalysis.Auth.Api/Startup.cs:line 207
at CryptoAnalysis.Auth.Api.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env) in /src/CryptoAnalysis.Auth.Api/Startup.cs:line 179
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app)
at Microsoft.AspNetCore.Hosting.WebHost.BuildApplication()
Any ideas why?
Activity
manigandham commentedon Sep 27, 2019
The stack trace tells you exactly what's wrong:
The
ExecuteReader()method doesn't exist. What did you upgrade? npgsql? Which version? Looks like Marten isn't compatible with it. You should post your issue there with more details on versions: https://github.com/JasperFx/martenYohDeadfall commentedon Sep 27, 2019
Closing in favor of #2626.
Various changes to reestablish 4.0 backwards compat
[-]System.Exception: Error trying to fetch w/ sql 'SELECT schemaname, relname FROM pg_stat_user_tables WHERE relname LIKE ? AND schemaname = ANY(?);' [/-][+]Marten failure with Npgsql 4.1.0: System.MissingMethodException[/+]Various changes to reestablish 4.0 backwards compat