Base solution for your next web application
Open Closed

Issue with Test Case #1360


User avatar
0
maharatha created

Castle.MicroKernel.ComponentActivator.ComponentActivatorException : ComponentActivator: could not instantiate xxxx.xxx.EntityFramework.CORPACCOUNTINGDbContext ---- System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. -------- System.InvalidOperationException : Sequence contains no matching element

I am getting this error when I run the test cases provided by AbpZero.

Any ideas?


9 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Which version of ABP do you use ? Did you make an nuget package upgrade recently or this just started to happen ?

    Also, can you share the full exception stacktrace if possible ?

  • User Avatar
    0
    maharatha created

    I am using Abp 9.7 and latest version of Abp Zero. I wasn't using the test cases before and decided to start using it now, so can't say what could have broke this. Here is the complete exception :

    Test Name: XXXXX.YYYYYYY.Tests.Auditing.AuditLogAppService_Tests.Test1(cultureName: "en") Test FullName: XXXXX.YYYYYYY.Tests.Auditing.AuditLogAppService_Tests.Test1 (0519c3fdd562f69227b885ca8782c51d90c41c79) Test Source: C:\Source Code\ZZZZZ\DEVCODE\Tests\XXXXX.YYYYYYY.Tests\Auditing\AuditLogAppService_Tests.cs : line 30 Test Outcome: Failed Test Duration: 0:00:00.001

    Result StackTrace: at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate constructor, Object[] arguments, Type implType) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden) at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally) at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy) at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden) at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired) at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context) at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy) at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy) at Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary arguments) at Castle.Windsor.WindsorContainer.ResolveT at Abp.Dependency.IocManager.ResolveT in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Dependency\IocManager.cs:line 160 at XXXXX.YYYYYYY.Tests.AppTestBase.UsingDbContext(Nullable1 tenantId, Action1 action) in C:\Source Code\ZZZZZ\DEVCODE\Tests\XXXXX.YYYYYYY.Tests\AppTestBase.cs:line 157 at XXXXX.YYYYYYY.Tests.AppTestBase.UsingDbContext(Action1 action) in C:\Source Code\ZZZZZ\DEVCODE\Tests\XXXXX.YYYYYYY.Tests\AppTestBase.cs:line 135 at XXXXX.YYYYYYY.Tests.AppTestBase..ctor() in C:\Source Code\ZZZZZ\DEVCODE\Tests\XXXXX.YYYYYYY.Tests\AppTestBase.cs:line 42 at XXXXX.YYYYYYY.Tests.Auditing.AuditLogAppService_Tests..ctor() in C:\Source Code\ZZZZZ\DEVCODE\Tests\XXXXX.YYYYYYY.Tests\Auditing\AuditLogAppService_Tests.cs:line 20 ----- Inner Stack Trace ----- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.FastCreateInstance(Type implType, Object[] arguments, ConstructorCandidate constructor) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate constructor, Object[] arguments, Type implType) ----- Inner Stack Trace ----- at System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate) at System.Data.Entity.Utilities.DbProviderManifestExtensions.GetStoreTypeFromName(DbProviderManifest providerManifest, String name) at System.Data.Entity.ModelConfiguration.Configuration.Properties.Primitive.PrimitivePropertyConfiguration.ConfigureColumn(EdmProperty column, EntityType table, DbProviderManifest providerManifest) at System.Data.Entity.ModelConfiguration.Configuration.Properties.Primitive.PrimitivePropertyConfiguration.Configure(EdmProperty column, EntityType table, DbProviderManifest providerManifest, Boolean allowOverride, Boolean fillFromExistingConfiguration) at System.Data.Entity.ModelConfiguration.Configuration.Properties.Primitive.PrimitivePropertyConfiguration.<>c__DisplayClass4.<Configure>b__3(Tuple2 pm) at System.Data.Entity.Utilities.IEnumerableExtensions.Each[T](IEnumerable1 ts, Action1 action) at System.Data.Entity.ModelConfiguration.Configuration.Properties.Primitive.PrimitivePropertyConfiguration.Configure(IEnumerable1 propertyMappings, DbProviderManifest providerManifest, Boolean allowOverride, Boolean fillFromExistingConfiguration) at System.Data.Entity.ModelConfiguration.Configuration.Types.StructuralTypeConfiguration.ConfigurePropertyMappings(IList1 propertyMappings, DbProviderManifest providerManifest, Boolean allowOverride) at System.Data.Entity.ModelConfiguration.Configuration.Types.EntityTypeConfiguration.ConfigurePropertyMappings(DbDatabaseMapping databaseMapping, EntityType entityType, DbProviderManifest providerManifest, Boolean allowOverride) at System.Data.Entity.ModelConfiguration.Configuration.Types.EntityTypeConfiguration.Configure(EntityType entityType, DbDatabaseMapping databaseMapping, DbProviderManifest providerManifest) at System.Data.Entity.ModelConfiguration.Configuration.ModelConfiguration.ConfigureEntityTypes(DbDatabaseMapping databaseMapping, ICollection1 entitySets, DbProviderManifest providerManifest) at System.Data.Entity.ModelConfiguration.Configuration.ModelConfiguration.Configure(DbDatabaseMapping databaseMapping, DbProviderManifest providerManifest) at System.Data.Entity.DbModelBuilder.Build(DbProviderManifest providerManifest, DbProviderInfo providerInfo) at System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection) at System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) at System.Data.Entity.Internal.RetryLazy2.GetValue(TInput input) at System.Data.Entity.Internal.LazyInternalContext.InitializeContext() at System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes() at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext() at Abp.EntityFramework.AbpDbContext.RegisterToChanges() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.EntityFramework\EntityFramework\AbpDbContext.cs:line 126 at Abp.Zero.EntityFramework.AbpZeroDbContext`3..ctor(DbConnection dbConnection, Boolean contextOwnsConnection) in D:\Halil\GitHub\module-zero\src\Abp.Zero.EntityFramework\Zero\EntityFramework\AbpZeroDbContext.cs:line 81 at XXXXX.YYYYYYY.EntityFramework.YYYYYYYDbContext..ctor(DbConnection dbConnection) in C:\Source Code\ZZZZZ\DEVCODE\XXXXX.YYYYYYY.EntityFramework\EntityFramework\YYYYYYYDbContext.cs:line 689 Result Message: Castle.MicroKernel.ComponentActivator.ComponentActivatorException : ComponentActivator: could not instantiate XXXXX.YYYYYYY.EntityFramework.YYYYYYYDbContext ---- System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. -------- System.InvalidOperationException : Sequence contains no matching element

  • User Avatar
    0
    hikalkan created
    Support Team

    One of our customers had this problem too. It's not related to AspNet Zero probably, but related to Effort library. But we want to replicate the problem in our environment. Which version was you solution before upgrading to 0.9.7? We will do the same.

  • User Avatar
    0
    maharatha created

    0.9.6. I upgrade as soon it's released

  • User Avatar
    0
    hikalkan created
    Support Team

    OK, thank you. We will try to upgrade from v0.9.6 to v0.9.7 to re-create the problem.

  • User Avatar
    0
    mikek created

    bump...

    I've run into the same issue trying to run any of the tests using version 0.10.3.0 of Abp. How did you resolve the issue?

    Cheers, mike

  • User Avatar
    0
    mikek created

    It seems that this issue is caused by Effort not supporting some datetypes, as per <a class="postlink" href="https://github.com/tamasflamich/effort/issues/10">https://github.com/tamasflamich/effort/issues/10</a>

    I resolved the issue by removing all DataType annotations.

  • User Avatar
    0
    hikalkan created
    Support Team

    Thank you for information sharing.

  • User Avatar
    0
    maharatha created

    Hi Mike -

    Could you let me know what exactly you removed to make it work ? Some code will be helpful.

    Hilkan -

    I copied and pasted the latest test code and still it's having issue. So I am unable to understand why it's working with the template when i download and it doesn't work in my application.

    Thanks, Partha