Hi,
I suddenly started getting the following exception when compiling any report: Cannot create an abstract class
This happens in a server and don't happens on another server (the same application).
Exception when compile the report on a server
Re: Exception when compile the report on a server
Hello,
Can you send us the full message with stack?
Thank you.
Can you send us the full message with stack?
Thank you.
Re: Exception when compile the report on a server
The full exception (exception . toString()) that happens on this server:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Cannot create an abstract class. at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor) at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions) at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions) at Reports.Report.InitializeComponent() at Reports.Report..ctor() --- End of inner exception stack trace --- at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor) at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions) at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions) at Stimulsoft.Report.StiReport.GetReportsFromAssembly(Assembly assembly) at Stimulsoft.Report.StiReport.GetReportFromAssembly(Assembly assembly) at Stimulsoft.Report.StiReport.CreateInstance(String path) at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate, Object standaloneReportType) at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate) at Stimulsoft.Report.StiReport.Compile(String path, StiOutputType outputType, Boolean autoCreate) at Stimulsoft.Report.StiReport.Compile(String path, StiOutputType outputType) at Stimulsoft.Report.StiReport.Compile(StiOutputType outputType) at Stimulsoft.Report.StiReport.Compile() at Stimulsoft.Report.StiReport.b__18_0() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Stimulsoft.Report.StiReport.CompileAsync() at SolidSoft.Report.RenderReport.renderReport(String connectionString, StiReport report, Boolean showWatermark, List`1 data, List`1 parameters)
Another info: This run on .NET 5
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Cannot create an abstract class. at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor) at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions) at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions) at Reports.Report.InitializeComponent() at Reports.Report..ctor() --- End of inner exception stack trace --- at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor) at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions) at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions) at Stimulsoft.Report.StiReport.GetReportsFromAssembly(Assembly assembly) at Stimulsoft.Report.StiReport.GetReportFromAssembly(Assembly assembly) at Stimulsoft.Report.StiReport.CreateInstance(String path) at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate, Object standaloneReportType) at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate) at Stimulsoft.Report.StiReport.Compile(String path, StiOutputType outputType, Boolean autoCreate) at Stimulsoft.Report.StiReport.Compile(String path, StiOutputType outputType) at Stimulsoft.Report.StiReport.Compile(StiOutputType outputType) at Stimulsoft.Report.StiReport.Compile() at Stimulsoft.Report.StiReport.b__18_0() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Stimulsoft.Report.StiReport.CompileAsync() at SolidSoft.Report.RenderReport.renderReport(String connectionString, StiReport report, Boolean showWatermark, List`1 data, List`1 parameters)
Another info: This run on .NET 5
Re: Exception when compile the report on a server
This exception . StackTrace:
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor) at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions) at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions) at Stimulsoft.Report.StiReport.GetReportsFromAssembly(Assembly assembly) at Stimulsoft.Report.StiReport.GetReportFromAssembly(Assembly assembly) at Stimulsoft.Report.StiReport.CreateInstance(String path) at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate, Object standaloneReportType) at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate) at Stimulsoft.Report.StiReport.Compile(String path, StiOutputType outputType, Boolean autoCreate) at Stimulsoft.Report.StiReport.Compile(String path, StiOutputType outputType) at Stimulsoft.Report.StiReport.Compile(StiOutputType outputType) at Stimulsoft.Report.StiReport.Compile() at Stimulsoft.Report.StiReport.b__18_0() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Stimulsoft.Report.StiReport.CompileAsync() at SolidSoft.Report.RenderReport.renderReport(String connectionString, StiReport report, Boolean showWatermark, List`1 data, List`1 parameters)
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor) at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions) at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions) at Stimulsoft.Report.StiReport.GetReportsFromAssembly(Assembly assembly) at Stimulsoft.Report.StiReport.GetReportFromAssembly(Assembly assembly) at Stimulsoft.Report.StiReport.CreateInstance(String path) at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate, Object standaloneReportType) at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate) at Stimulsoft.Report.StiReport.Compile(String path, StiOutputType outputType, Boolean autoCreate) at Stimulsoft.Report.StiReport.Compile(String path, StiOutputType outputType) at Stimulsoft.Report.StiReport.Compile(StiOutputType outputType) at Stimulsoft.Report.StiReport.Compile() at Stimulsoft.Report.StiReport.b__18_0() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Stimulsoft.Report.StiReport.CompileAsync() at SolidSoft.Report.RenderReport.renderReport(String connectionString, StiReport report, Boolean showWatermark, List`1 data, List`1 parameters)
Re: Exception when compile the report on a server
This is urgent, please advice.
I updated .NET 5 on both servers and also try with an empty report.
Continue to work on one server and did not work on another.
I can't find stimulsoft .NET source code on my account to download and check deeper inside CompileAsync method.
Another point: All my reports came from a string with the report xml file: LoadFromString
I updated .NET 5 on both servers and also try with an empty report.
Continue to work on one server and did not work on another.
I can't find stimulsoft .NET source code on my account to download and check deeper inside CompileAsync method.
Another point: All my reports came from a string with the report xml file: LoadFromString
Re: Exception when compile the report on a server
I just found that this issue is related with the ZXing.Net.Bindings.CoreCompact.System.Drawing that was added to the project yesterday.
ZXing uses CoreCompact.System.Drawing.v2 and Stimulsoft uses System.Drawing.Common. Probably came from here the issue even don't happen in development environment and happen on one server and not another.
ZXing uses CoreCompact.System.Drawing.v2 and Stimulsoft uses System.Drawing.Common. Probably came from here the issue even don't happen in development environment and happen on one server and not another.
Re: Exception when compile the report on a server
You can close this issue.
I found an alternative to ZXing.Net.Bindings.CoreCompact.System.Drawing and the incompatibility was workarounded.
I found an alternative to ZXing.Net.Bindings.CoreCompact.System.Drawing and the incompatibility was workarounded.
Re: Exception when compile the report on a server
Hello,
Great!
Let us know if you need any additional help.
Thank you.
Great!
Let us know if you need any additional help.
Thank you.