Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-15845

.NET: CreateCache fails - Invalid array specification

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.6
    • 2.12
    • platforms
    • .NET: Fixed potential cache startup error when one of the loaded assemblies has certain compiler-generated type names that can't be parsed by Ignite.
    • Release Notes Required

    Description

      Ignition.Start fails with an exception:

      Failure in Java callback Apache.Ignite.Core.Common.IgniteException: Invalid array specification: MassTransit.Initializers.PropertyConverters.MessageDataPropertyConverter+<MassTransit-Initializers-IPropertyConverter<MassTransit-MessageData<System-Byte\[\]>\,MassTransit-MessageData<System-String>>-Convert>d__4`1
         at Apache.Ignite.Core.Impl.Binary.TypeNameParser.ParseArrayDefinition()
         at Apache.Ignite.Core.Impl.Binary.TypeNameParser.Parse()
         at Apache.Ignite.Core.Impl.Binary.TypeNameParser..ctor(String typeName, Int32& pos)
         at Apache.Ignite.Core.Impl.Binary.TypeNameParser.Parse(String typeName)
         at Apache.Ignite.Core.Binary.BinaryBasicNameMapper.GetTypeName(String name)
         at Apache.Ignite.Core.Impl.Binary.TypeResolver.<>c__DisplayClass8_0.<FindType>b__0(Type x)
         at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
         at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
         at Apache.Ignite.Core.Impl.Binary.TypeResolver.FindType(Assembly asm, String typeName, IBinaryNameMapper mapper)
         at Apache.Ignite.Core.Impl.Binary.TypeResolver.<>c__DisplayClass4_0.<ResolveNonGenericType>b__1(Assembly a)
         at System.Linq.Enumerable.SelectArrayIterator`2.MoveNext()
         at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
         at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
         at Apache.Ignite.Core.Impl.Binary.TypeResolver.ResolveNonGenericType(String assemblyName, String typeName, ICollection`1 assemblies, IBinaryNameMapper nameMapper)
         at Apache.Ignite.Core.Impl.Binary.TypeResolver.ResolveType(String assemblyName, TypeNameParser typeName, ICollection`1 assemblies, IBinaryNameMapper nameMapper)
         at Apache.Ignite.Core.Impl.Binary.TypeResolver.ResolveType(String typeName, String assemblyName, IBinaryNameMapper nameMapper)
         at Apache.Ignite.Core.Impl.Binary.Marshaller.ResolveType(String typeName)
         at Apache.Ignite.Core.Impl.Binary.Marshaller.GetDescriptor(Boolean userType, Int32 typeId, Boolean requiresType, String typeName, Type knownType)
         at Apache.Ignite.Core.Impl.Binary.Marshaller.GetDescriptor(String typeName, Boolean requiresType)
         at Apache.Ignite.Core.Impl.Unmanaged.UnmanagedCallbacks.<>c__DisplayClass98_0.<BinaryTypeGet>b__0()
         at Apache.Ignite.Core.Impl.Unmanaged.UnmanagedCallbacks.SafeCall[T](Func`1 func, Boolean allowUnitialized)
      

      1. ResolveNonGenericType should skip all generic types when scanning assemblies
      2. ParseArrayDefinition should be fixed

      Workaround

      Register SQL key and value types manually before starting the cache:

      ignite.GetBinary().GetBinaryType(typeof(TKey));
      ignite.GetBinary().GetBinaryType(typeof(TValue));
      

      Attachments

        Issue Links

          Activity

            People

              ptupitsyn Pavel Tupitsyn
              ptupitsyn Pavel Tupitsyn
              Igor Sapego Igor Sapego
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m