Return-Path: X-Original-To: apmail-ignite-user-archive@minotaur.apache.org Delivered-To: apmail-ignite-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5FC6A194F5 for ; Mon, 4 Apr 2016 15:20:25 +0000 (UTC) Received: (qmail 62376 invoked by uid 500); 4 Apr 2016 15:20:20 -0000 Delivered-To: apmail-ignite-user-archive@ignite.apache.org Received: (qmail 62329 invoked by uid 500); 4 Apr 2016 15:20:20 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 62319 invoked by uid 99); 4 Apr 2016 15:20:20 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Apr 2016 15:20:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id A6765C04C5 for ; Mon, 4 Apr 2016 15:20:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id U-I1RyCEbRHL for ; Mon, 4 Apr 2016 15:20:17 +0000 (UTC) Received: from mail-ob0-f181.google.com (mail-ob0-f181.google.com [209.85.214.181]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id BF7475F1E5 for ; Mon, 4 Apr 2016 15:20:16 +0000 (UTC) Received: by mail-ob0-f181.google.com with SMTP id j9so53073298obd.3 for ; Mon, 04 Apr 2016 08:20:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=ZVk+R1Js7JaK5cEMrnJ/yWiEW3UvDwsXi9etVeX8qhE=; b=D2Ws7rykp6eWOMkA/i05jDgZQPixcTknVGN41UZwlYMVDV94/oNOEvL6ErLl3+yPKa 0PqNmGMIqw2bs1lWqFPtUZGFFZojKP4OQwaW9t6Fla7gszW2UhowH50FiRZGoWz7fQTI 8Qc6ZlY8RbDmYbtZYNNKMQBMF1zwlnnhR5AFOOcQgjdCSCJQ4pZfOw91sVnCELvntDqw CRTtkmDxNur8SFv3nooZTQ94s9czOeLKoO9i8E4XhZmYAad088AI3KK2Zzn0QfrgvS20 CP8Ajz49y5vun3jUdt9O71cM424pJ03b2VhkhwJ4EIJ/epeQNaWSZuU3WHYo2tNjLz58 jWgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=ZVk+R1Js7JaK5cEMrnJ/yWiEW3UvDwsXi9etVeX8qhE=; b=kgPEbtYlMlh0FFTt6NwYXJaYBOi3e+d1pY/HBgQ3V4Tx8rTFLCFrkqWqiK+MVdk+wi 3k+hgn4Wbgll+TUL73IlZ3T0AFG/fKHLWe5EZdSs9HHbXQYJy6CYtoSStWAhJHN/o1wC ZUv5UZ9aTynkXgtlA3IaJD85GB/ZQu8awX/UBSj9Xc7BGPk9ENdudxNZIZxU2zr+N+Lw /NtP3S3bvaimqIu2TjVyMb42E1w5caVWLNRa/urCGQSporeDDe7HF+ieYW2eRbaqSczu fkl/Km2IjZlZ24iPa5xQMoYMi5hkzH8X7aOf+jBSPN5muQuqEf/OHFGDh3RaoIV/wTaW QK1w== X-Gm-Message-State: AD7BkJIch2ramirUEZE2sdFerm4aVhIQpL9lSLs5+/Ki9pU3LiaK7Gokd8XG6fBTFusKZ9X1h+oaFlxfBmZO8A== MIME-Version: 1.0 X-Received: by 10.60.135.4 with SMTP id po4mr9637403oeb.36.1459783210285; Mon, 04 Apr 2016 08:20:10 -0700 (PDT) Received: by 10.202.104.12 with HTTP; Mon, 4 Apr 2016 08:20:10 -0700 (PDT) In-Reply-To: References: Date: Mon, 4 Apr 2016 11:20:10 -0400 Message-ID: Subject: Re: SQLServer Persistence Store Error From: Murthy Kakarlamudi To: user@ignite.apache.org Content-Type: multipart/alternative; boundary=047d7b414f64b2c423052faa433d --047d7b414f64b2c423052faa433d Content-Type: text/plain; charset=UTF-8 Oh ok...will try that option. Sure, will send you the zipped copy of my solution for you to investigate further. Thanks much for your help. Satya, On Mon, Apr 4, 2016 at 11:09 AM, Pavel Tupitsyn wrote: > LoadCache arguments are serialized and passed over network. Cache instance > can't be used as a LoadCache argument. > Please try to do a cache put directly in the main method: > using (var ignite = Ignition.Start(cfg)) > { > var cache = ignite.GetCache( > null); > cache.Put(1, entities.CustomTransactionsDetails.First()); > } > > I suspect there is an issue with serializing CustomTransactionsDetail > instances. > Entity Framework POCO proxies can't be serialized by Ignite automatically. > You have to either disable proxies ( > https://msdn.microsoft.com/en-us/library/dd456853(v=vs.100).aspx), or > implement IBinarizable with manual serialization. > > If you send me your whole solution in a zip file, I'll be able to > investigate further. > > Thanks, > > Pavel. > > On Mon, Apr 4, 2016 at 5:53 PM, Murthy Kakarlamudi > wrote: > >> Hi Pavel, >> I was trying to do that before and ran into issues passing cache >> object to my CacheAdapter implementation which is in a different dll. Can >> you please help where I went wrong: >> >> In my main program, I was passing cache in LoadCache method: >> using (var ignite = Ignition.Start(cfg)) >> { >> Console.WriteLine(">>> Cache query example started"); >> var cache = ignite.GetCache> CustomTransactionsDetail>(null); >> *cache.LoadCache(null,cache);* >> Console.WriteLine(">> Organization Cache Size: " + >> cache.GetSize()); >> Console.ReadLine(); >> } >> >> In my CacheStoreAdapter implementation, I tried to access Cache as below: >> >> public override void LoadCache(Action act, params >> object[] args) >> { >> try { >> * ICache cache = (ICache)args[0]; // Throwing an error >> here.* >> var customTxnDetailsList = >> entities.CustomTransactionsDetails; >> // Iterate over whole underlying store and call act on >> each entry to load it into the cache. >> foreach (CustomTransactionsDetail entry in >> customTxnDetailsList) >> { >> Console.WriteLine("Adding to cache: {0} {1}", >> entry.CustomTransDetailID, entry); >> //act(entry.CustomTransDetailID, entry); >> >> } >> }catch(Exception e) >> { >> Console.WriteLine("Exception is {0}", e); >> } >> >> } >> >> On Mon, Apr 4, 2016 at 8:26 AM, Pavel Tupitsyn >> wrote: >> >>> Instead of LoadCache, can you try a simple cache put and see what >>> happens? >>> >>> cache[1] = new CustomTransactionsDetail(); >>> >>> and with entity from EF: >>> >>> cache[2] = entities.CustomTransactionsDetails.First(); >>> >>> Pavel. >>> >>> On Mon, Apr 4, 2016 at 3:20 PM, Murthy Kakarlamudi >>> wrote: >>> >>>> Sorry....attached the wrong version. Below is the full entity class and >>>> the CacheStore implementation. >>>> >>>> namespace MyIgnite >>>> { >>>> using System; >>>> using System.Collections.Generic; >>>> >>>> public partial class CustomTransactionsDetail >>>> { >>>> public Nullable TransactionID { get; set; } >>>> public string InstrumentTypeName { get; set; } >>>> public string InstrumentTypeShortName { get; set; } >>>> public string DealType { get; set; } >>>> public string PutCall { get; set; } >>>> public Nullable Expiry { get; set; } >>>> public string Side { get; set; } >>>> public Nullable Comodity1Month { get; set; } >>>> public Nullable Comodity2Month { get; set; } >>>> public Nullable Asset1 { get; set; } >>>> public Nullable Asset2 { get; set; } >>>> public Nullable QtyAsset1 { get; set; } >>>> public Nullable QtyAsset2 { get; set; } >>>> public Nullable StrikePrice { get; set; } >>>> public Nullable RiskFreeRate { get; set; } >>>> public Nullable CostOfCarry1 { get; set; } >>>> public Nullable CostOfCarry2 { get; set; } >>>> public Nullable VolatilityAsset1 { get; set; } >>>> public Nullable VolatilityAsset2 { get; set; } >>>> public Nullable FixedPrice { get; set; } >>>> public Nullable BUID { get; set; } >>>> public Nullable PortfolioID { get; set; } >>>> public Nullable StrategyID { get; set; } >>>> public Nullable CPID { get; set; } >>>> public Nullable TraderID { get; set; } >>>> public Nullable InsTypeID { get; set; } >>>> public string ListOfAllIndexText { get; set; } >>>> public Nullable MvStartMonth { get; set; } >>>> public string SourceSysName { get; set; } >>>> public Nullable EndOfDayDate { get; set; } >>>> public Nullable DealSideGPID { get; set; } >>>> public Nullable ProfileID { get; set; } >>>> public Nullable InstrumentSeqNo { get; set; } >>>> public Nullable InstrumentSourceID { get; set; } >>>> public string EventSourceName { get; set; } >>>> public string CFlowTypeID { get; set; } >>>> public string RTStatName { get; set; } >>>> public string TranStatName { get; set; } >>>> public Nullable SequenceNo { get; set; } >>>> public Nullable TimeStamp { get; set; } >>>> public Nullable CustomTransHeaderID { get; set; } >>>> public int CustomTransDetailID { get; set; } >>>> public string IndexName1 { get; set; } >>>> public string IndexName2 { get; set; } >>>> public Nullable LTD_PNL { get; set; } >>>> } >>>> } >>>> >>>> public override void LoadCache(Action act, params >>>> object[] args) >>>> { >>>> try { >>>> var customTxnDetailsList = >>>> entities.CustomTransactionsDetails; >>>> // Iterate over whole underlying store and call act on >>>> each entry to load it into the cache. >>>> foreach (CustomTransactionsDetail entry in >>>> customTxnDetailsList) >>>> { >>>> Console.WriteLine("Adding to cache: {0}", >>>> entry.CustomTransDetailID); >>>> act(entry.CustomTransDetailID, entry); >>>> >>>> } >>>> }catch(Exception e) >>>> { >>>> Console.WriteLine("Exception is {0}", e); >>>> } >>>> >>>> } >>>> >>>> static void Main(string[] args) >>>> { >>>> var cfg = new IgniteConfiguration >>>> { >>>> SpringConfigUrl = >>>> @"C:\Data\Professional\dotnet\workspace\MyIgnite\MyIgniteConsole\config\ignite.xml", >>>> JvmOptions = new List { "-Xms512m", "-Xmx1024m" >>>> } >>>> }; >>>> //Ignition.ClientMode = true; >>>> using (var ignite = Ignition.Start(cfg)) >>>> { >>>> Console.WriteLine(">>> Cache query example started"); >>>> var cache = ignite.GetCache>>> CustomTransactionsDetail>(null); >>>> >>>> cache.LoadCache(null); >>>> >>>> Console.ReadLine(); >>>> } >>>> >>>> >>>> Console.ReadLine(); >>>> } >>>> >>>> There are no other parts to these files. These POCOs are generated by >>>> Entity Framework. Please let me know if you need additional information. >>>> >>>> Satya. >>>> >>>> On Mon, Apr 4, 2016 at 8:11 AM, Pavel Tupitsyn >>>> wrote: >>>> >>>>> Satya, >>>>> >>>>> In your code above there is "act(entry.personDetailID, entry);", >>>>> but there is no personDetailID member in the CustomTransactionsDetail >>>>> class. >>>>> Are you sure this is the correct one? Also, it is a partial class - >>>>> are there any parts in other files? >>>>> >>>>> Can you attach full source code of your application? >>>>> >>>>> Thanks, >>>>> Pavel. >>>>> >>>>> On Mon, Apr 4, 2016 at 2:59 PM, Murthy Kakarlamudi >>>>> wrote: >>>>> >>>>>> Below is my entity. I am not doing any serialization currently while >>>>>> storing in the cache. >>>>>> >>>>>> namespace MyIgnite >>>>>> { >>>>>> using System; >>>>>> using System.Collections.Generic; >>>>>> >>>>>> public partial class CustomTransactionsDetail >>>>>> { >>>>>> public Nullable TransactionID { get; set; } >>>>>> public string TypeName { get; set; } >>>>>> public Nullable Expiry { get; set; } >>>>>> public string Side { get; set; } >>>>>> public Nullable TimeStamp { get; set; } >>>>>> public Nullable CustomTransHeaderID { get; set; } >>>>>> public int CustomTransDetailID { get; set; } >>>>>> >>>>>> } >>>>>> } >>>>>> >>>>>> Thanks, >>>>>> Satya. >>>>>> >>>>>> On Mon, Apr 4, 2016 at 7:50 AM, Pavel Tupitsyn < >>>>>> ptupitsyn@gridgain.com> wrote: >>>>>> >>>>>>> Satya, >>>>>>> >>>>>>> Looks like exception comes from your entity member(s) during >>>>>>> serialization. >>>>>>> >>>>>>> Can you please attach your entity class code? >>>>>>> * Does it have any navigation properties that may cause SQL queries? >>>>>>> * How do you serialize it in Ignite? (Do you implement IBinarizable?) >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Pavel. >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Mon, Apr 4, 2016 at 2:13 PM, Murthy Kakarlamudi >>>>>> > wrote: >>>>>>> >>>>>>>> Hi Pavel, >>>>>>>> Thanks for your response. I stepped through the LoadCache method >>>>>>>> in debug mode and noticed that it is failing at the act() method. Below is >>>>>>>> my code for LoacCache. >>>>>>>> >>>>>>>> public override void LoadCache(Action act, params >>>>>>>> object[] args) >>>>>>>> { >>>>>>>> var personDetailsList = entities.personDetails; >>>>>>>> // Iterate over whole underlying store and call act on >>>>>>>> each entry to load it into the cache. >>>>>>>> foreach (personDetail entry in personDetailsList) >>>>>>>> { >>>>>>>> Console.WriteLine("Adding to cache: " + >>>>>>>> entry.personDetailID); >>>>>>>> act(entry.personDetailID, entry); >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>>> I can see the statement: "Adding to cache: " in the node output >>>>>>>> and the control hangs at the next line executing the "act" method and then >>>>>>>> it throws SQLException Timeout. Not sure why the "act" method is taking so >>>>>>>> much time to store the entries in cache. >>>>>>>> >>>>>>>> For testing, I commented out "act" statement and the program >>>>>>>> completed looping through all the entries returned by Entity Framework >>>>>>>> without any errors. >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Satya. >>>>>>>> >>>>>>>> On Mon, Apr 4, 2016 at 4:40 AM, Pavel Tupitsyn < >>>>>>>> ptupitsyn@gridgain.com> wrote: >>>>>>>> >>>>>>>>> Hi Satya, >>>>>>>>> >>>>>>>>> "*Timeout expired. The timeout period elapsed prior to >>>>>>>>> completion of the operation or the server is not responding.*" >>>>>>>>> This is an SQL exception. Please make sure that your entity >>>>>>>>> connection works. >>>>>>>>> You can set a breakpoint on the first line of LoadCache method, >>>>>>>>> step over your code and see what happens. Or wrap it in try-catch block. >>>>>>>>> >>>>>>>>> Meanwhile, looks like cache store error messages are not very >>>>>>>>> informative. >>>>>>>>> I've added a Jira ticket, we'll fix it shortly: >>>>>>>>> https://issues.apache.org/jira/browse/IGNITE-2943 >>>>>>>>> >>>>>>>>> Thank you, >>>>>>>>> >>>>>>>>> Pavel >>>>>>>>> >>>>>>>>> On Mon, Apr 4, 2016 at 7:07 AM, Murthy Kakarlamudi < >>>>>>>>> ksatya@gmail.com> wrote: >>>>>>>>> >>>>>>>>>> Hello all, >>>>>>>>>> I was able to resolve the error I posted above. I had to >>>>>>>>>> basically add the relevant EntityFramwork references in the solution that >>>>>>>>>> runs my Ignite server node. After successfully creating the cache, however >>>>>>>>>> I am running into the below timeout issue: >>>>>>>>>> >>>>>>>>>> [00:02:37] Ignite node started OK (id=cf8c5e00) >>>>>>>>>> [00:02:37] Topology snapshot [ver=1, servers=1, clients=0, >>>>>>>>>> CPUs=4, heap=0.89GB] >>>>>>>>>> *>>> Cache query example started* >>>>>>>>>> *Adding to cache: 228505* >>>>>>>>>> [00:03:10,524][SEVERE][pub-#10%null%][GridJobWorker] Failed to >>>>>>>>>> execute job [jobId=bcc9f6fd351-cf8c5e00-c86f-4e58-b0ad-6754896baf34, >>>>>>>>>> ses=GridJobSessionImpl [ses=GridTaskSessionImpl >>>>>>>>>> [taskName=o.a.i.i.processors.cache.GridCacheAdapter$LoadCacheClosure, >>>>>>>>>> dep=LocalDeployment [super=GridDeployment [ts=1459742547098, >>>>>>>>>> depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@764c12b6, >>>>>>>>>> clsLdrId=a9c9f6fd351-cf8c5e00-c86f-4e58-b0ad-6754896baf34, userVer=0, >>>>>>>>>> loc=true, sampleClsName=java.lang.String, pendingUndeploy=false, >>>>>>>>>> undeployed=false, usage=0]], >>>>>>>>>> taskClsName=o.a.i.i.processors.cache.GridCacheAdapter$LoadCacheClosure, >>>>>>>>>> sesId=acc9f6fd351-cf8c5e00-c86f-4e58-b0ad-6754896baf34, >>>>>>>>>> startTime=1459742557568, endTime=9223372036854775807, >>>>>>>>>> taskNodeId=cf8c5e00-c86f-4e58-b0ad-6754896baf34, >>>>>>>>>> clsLdr=sun.misc.Launcher$AppClassLoader@764c12b6, closed=false, >>>>>>>>>> cpSpi=null, failSpi=null, loadSpi=null, usage=1, fullSup=false, >>>>>>>>>> subjId=cf8c5e00-c86f-4e58-b0ad-6754896baf34, mapFut=IgniteFuture >>>>>>>>>> [orig=GridFutureAdapter [resFlag=0, res=null, startTime=1459742557584, >>>>>>>>>> endTime=0, ignoreInterrupts=false, lsnr=null, state=INIT]]], >>>>>>>>>> jobId=bcc9f6fd351-cf8c5e00-c86f-4e58-b0ad-6754896baf34]] >>>>>>>>>> class org.apache.ignite.IgniteException: class >>>>>>>>>> org.apache.ignite.IgniteException: Timeout expired. The timeout period >>>>>>>>>> elapsed prior to completion of the operation or the server is not >>>>>>>>>> responding. >>>>>>>>>> at >>>>>>>>>> org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1792 >>>>>>>>>> >>>>>>>>>> Apache.Ignite.Core.Cache.Store.CacheStoreException was unhandled >>>>>>>>>> HResult=-2146233088 >>>>>>>>>> Message=class org.apache.ignite.IgniteException: *Timeout >>>>>>>>>> expired. The timeout period elapsed prior to completion of the operation >>>>>>>>>> or the server is not responding.* >>>>>>>>>> Source=Apache.Ignite.Core >>>>>>>>>> StackTrace: >>>>>>>>>> at >>>>>>>>>> Apache.Ignite.Core.Impl.Unmanaged.UnmanagedCallbacks.Error(Void* target, >>>>>>>>>> Int32 errType, SByte* errClsChars, Int32 errClsCharsLen, SByte* >>>>>>>>>> errMsgChars, Int32 errMsgCharsLen, Void* errData, Int32 errDataLen) >>>>>>>>>> at >>>>>>>>>> Apache.Ignite.Core.Impl.Unmanaged.IgniteJniNativeMethods.TargetInStreamOutLong(Void* >>>>>>>>>> ctx, Void* target, Int32 opType, Int64 memPtr) >>>>>>>>>> at >>>>>>>>>> Apache.Ignite.Core.Impl.Unmanaged.UnmanagedUtils.TargetInStreamOutLong(IUnmanagedTarget >>>>>>>>>> target, Int32 opType, Int64 memPtr) >>>>>>>>>> at Apache.Ignite.Core.Impl.PlatformTarget.DoOutOp(Int32 >>>>>>>>>> type, Action`1 action) >>>>>>>>>> at MyIgniteConsole.Program.Main(String[] args) in >>>>>>>>>> C:\Data\Professional\dotnet\workspace\MyIgnite\MyIgniteConsole\Program.cs:line >>>>>>>>>> 29 >>>>>>>>>> at System.AppDomain._nExecuteAssembly(RuntimeAssembly >>>>>>>>>> assembly, String[] args) >>>>>>>>>> at System.AppDomain.ExecuteAssembly(String assemblyFile, >>>>>>>>>> Evidence assemblySecurity, String[] args) >>>>>>>>>> at >>>>>>>>>> Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() >>>>>>>>>> at >>>>>>>>>> System.Threading.ExecutionContext.RunInternal(ExecutionContext >>>>>>>>>> executionContext, ContextCallback callback, Object state, Boolean >>>>>>>>>> preserveSyncCtx) >>>>>>>>>> at System.Threading.ExecutionContext.Run(ExecutionContext >>>>>>>>>> executionContext, ContextCallback callback, Object state, Boolean >>>>>>>>>> preserveSyncCtx) >>>>>>>>>> at System.Threading.ExecutionContext.Run(ExecutionContext >>>>>>>>>> executionContext, ContextCallback callback, Object state) >>>>>>>>>> at System.Threading.ThreadHelper.ThreadStart() >>>>>>>>>> InnerException: >>>>>>>>>> >>>>>>>>>> From my main program, I am making below call: >>>>>>>>>> cache.LoadCache(null); >>>>>>>>>> >>>>>>>>>> In my store implementation I have the following overide method: >>>>>>>>>> public override void LoadCache(Action act, >>>>>>>>>> params object[] args) >>>>>>>>>> { >>>>>>>>>> var personDetailsList = entities.personDetails; >>>>>>>>>> // Iterate over whole underlying store and call act >>>>>>>>>> on each entry to load it into the cache. >>>>>>>>>> foreach (personDetail entry in personDetailsList) >>>>>>>>>> { >>>>>>>>>> Console.WriteLine("Adding to cache: " + >>>>>>>>>> entry.personDetailID); >>>>>>>>>> act(entry.personDetailID, entry); >>>>>>>>>> >>>>>>>>>> } >>>>>>>>>> >>>>>>>>>> } >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> thanks in advance for your help... >>>>>>>>>> >>>>>>>>>> Satya. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Sat, Apr 2, 2016 at 11:49 AM, Murthy Kakarlamudi < >>>>>>>>>> ksatya@gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> Hi, >>>>>>>>>>> In my .NET application, I have an underlying SQL Server DB >>>>>>>>>>> that I am planning to access using Ignite Persistence feature. I was >>>>>>>>>>> following the StoreExample provided in the examples and created the ignite >>>>>>>>>>> configuration accordingly. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration"> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory"> >>>>>>>>>>> >>>>>>>>>> value="MyIgnite.SQLServerStore, MyIgnite"/> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> My SQLServerStore which is part of MyIgnite dll is as below. I >>>>>>>>>>> am using EntityFramework as ORM to access underlying SQLServer. >>>>>>>>>>> >>>>>>>>>>> class SQLServerStore : CacheStoreAdapter >>>>>>>>>>> { >>>>>>>>>>> private TestEntities entities; >>>>>>>>>>> public SQLServerStore() >>>>>>>>>>> { >>>>>>>>>>> entities = new TestEntities(); >>>>>>>>>>> } >>>>>>>>>>> >>>>>>>>>>> /// >>>>>>>>>>> /// Loads all values from underlying persistent storage. >>>>>>>>>>> /// This method gets called as a result of >>>>>>>>>> cref="ICache{TK,TV}.LoadCache"/> call. >>>>>>>>>>> /// >>>>>>>>>>> /// Action that loads a cache >>>>>>>>>>> entry. >>>>>>>>>>> /// Optional arguments. >>>>>>>>>>> public override void LoadCache(Action >>>>>>>>>>> act, params object[] args) >>>>>>>>>>> { >>>>>>>>>>> var personDetailsList = entities.PersonDetails; >>>>>>>>>>> // Iterate over whole underlying store and call act >>>>>>>>>>> on each entry to load it into the cache. >>>>>>>>>>> foreach (personDetail entry in personDetailsList) >>>>>>>>>>> { >>>>>>>>>>> act(entry.personD, entry); >>>>>>>>>>> } >>>>>>>>>>> >>>>>>>>>>> } >>>>>>>>>>> } >>>>>>>>>>> >>>>>>>>>>> Whwn I try to run the above, I am getting the below error. >>>>>>>>>>> >>>>>>>>>>> Apache.Ignite.Core.Common.IgniteException was unhandled >>>>>>>>>>> HResult=-2146233088 >>>>>>>>>>> Message=Exception has been thrown by the target of an >>>>>>>>>>> invocation. >>>>>>>>>>> Source=Apache.Ignite.Core >>>>>>>>>>> StackTrace: >>>>>>>>>>> at >>>>>>>>>>> Apache.Ignite.Core.Impl.Unmanaged.UnmanagedCallbacks.Error(Void* target, >>>>>>>>>>> Int32 errType, SByte* errClsChars, Int32 errClsCharsLen, SByte* >>>>>>>>>>> errMsgChars, Int32 errMsgCharsLen, Void* errData, Int32 errDataLen) >>>>>>>>>>> at >>>>>>>>>>> Apache.Ignite.Core.Impl.Unmanaged.IgniteJniNativeMethods.IgnitionStart(Void* >>>>>>>>>>> ctx, SByte* cfgPath, SByte* gridName, Int32 factoryId, Int64 dataPtr) >>>>>>>>>>> at >>>>>>>>>>> Apache.Ignite.Core.Impl.Unmanaged.UnmanagedUtils.IgnitionStart(UnmanagedContext >>>>>>>>>>> ctx, String cfgPath, String gridName, Boolean clientMode) >>>>>>>>>>> at Apache.Ignite.Core.Ignition.Start(IgniteConfiguration >>>>>>>>>>> cfg) >>>>>>>>>>> at MyIgniteConsole.Program.Main(String[] args) in >>>>>>>>>>> C:\Data\Professional\dotnet\workspace\MyIgnite\MyIgniteConsole\Program.cs:line >>>>>>>>>>> 21 >>>>>>>>>>> at System.AppDomain._nExecuteAssembly(RuntimeAssembly >>>>>>>>>>> assembly, String[] args) >>>>>>>>>>> at System.AppDomain.ExecuteAssembly(String assemblyFile, >>>>>>>>>>> Evidence assemblySecurity, String[] args) >>>>>>>>>>> at >>>>>>>>>>> Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() >>>>>>>>>>> at >>>>>>>>>>> System.Threading.ExecutionContext.RunInternal(ExecutionContext >>>>>>>>>>> executionContext, ContextCallback callback, Object state, Boolean >>>>>>>>>>> preserveSyncCtx) >>>>>>>>>>> at System.Threading.ExecutionContext.Run(ExecutionContext >>>>>>>>>>> executionContext, ContextCallback callback, Object state, Boolean >>>>>>>>>>> preserveSyncCtx) >>>>>>>>>>> at System.Threading.ExecutionContext.Run(ExecutionContext >>>>>>>>>>> executionContext, ContextCallback callback, Object state) >>>>>>>>>>> at System.Threading.ThreadHelper.ThreadStart() >>>>>>>>>>> InnerException: >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Any help would be appreciated. >>>>>>>>>>> >>>>>>>>>>> Thanks, >>>>>>>>>>> Satya. >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > --047d7b414f64b2c423052faa433d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Oh ok...will try that option. Sure, will send you the zipp= ed copy of my solution for you to investigate further. Thanks much for your= help.

Satya,

=
On Mon, Apr 4, 2016 at 11:09 AM, Pavel Tupitsyn = <ptupitsyn@gridgain.com> wrote:
LoadCache arguments are serialized and pas= sed over network. Cache instance can't be used as a LoadCache argument.=
Please try to do a cache put directly in the main method:
<= div>
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 using (var ignite =3D Ignition.Start(cfg))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 var c= ache =3D ignite.GetCache<int, CustomTransactionsDetail>(null);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 cache.Put(1,=C2=A0entities.CustomTransactions= Details.First());
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 }

I suspect there is an issue with serializing=C2=A0CustomTransactionsDetail instances.
Entity Framew= ork POCO proxies can't be serialized by Ignite automatically.
You have to either disable proxies= (https://msdn.microsoft.com/en-us/library/dd456853(v= =3Dvs.100).aspx), or implement IBinarizable with manual serialization.<= /span>

If you send me your whole solution in a zip f= ile, I'll be able to investigate further.

Thanks,

Pavel.

On Mon, Apr 4, 2016 at 5:53 PM, Murthy Kakarlamudi <ksatya@g= mail.com> wrote:
Hi Pavel,
=C2=A0 =C2=A0 I was trying to do that before and ran= into issues passing cache object to my CacheAdapter implementation which i= s in a different dll. Can you please help where I went wrong:
In my main program, I was passing cache in LoadCache method:
using (var ignite =3D Ignition.Start(cfg))
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Console.WriteLine(">>> Cache = query example started");
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 var cache =3D ignite.GetCache<int, CustomTransactio= nsDetail>(null);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 cache.LoadCache(null,cache);
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Console.WriteLine(">&= gt; Organization Cache Size: " + cache.GetSize());
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Console.ReadLine();
<= div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }

<= div>In my CacheStoreAdapter implementation, I tried to access Cache as belo= w:

public override void LoadCache(Actio= n<object, object> act, params object[] args)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 try {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = ICache cache =3D (ICache)args[0]; // Throwing an error here.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 var customTxn= DetailsList =3D entities.CustomTransactionsDetails;
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // Iterate over whole underlying= store and call act on each entry to load it into the cache.
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 foreach (CustomTransac= tionsDetail entry in customTxnDetailsList)
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Console.WriteLine("Ad= ding to cache: {0} {1}", entry.CustomTransDetailID, entry);
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 //act= (entry.CustomTransDetailID, entry);

=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 }catch(Exception e)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 Console.WriteLine("Exception is {0}", e);
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }

On Mon, Apr 4, 2016 at 8:26 AM, Pavel Tupitsyn = <ptupitsyn@g= ridgain.com> wrote:
Instead of LoadCache, can you try a simple cache put and see what= happens?

cache[1] =3D new=C2=A0CustomTransactionsDetail();

and with entity from EF:<= /div>

cache[2] =3D= =C2=A0entities.CustomTransactionsDetails.First();
<= span style=3D"font-size:12.8px">
Pavel.

On Mon, Apr 4, 2016 at 3:20 PM, Murthy = Kakarlamudi <ksatya@gmail.com> wrote:
Sorry....attached the wrong version. Below is t= he full entity class and the CacheStore implementation.

=
namespace MyIgnite
{
=C2=A0 =C2=A0 using Sys= tem;
=C2=A0 =C2=A0 using System.Collections.Generic;
= =C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 public partial class CustomTran= sactionsDetail
=C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 public Nullable<int> TransactionID { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public string InstrumentTypeName { get; set; }=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public string InstrumentTypeShortNam= e { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public string DealTyp= e { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public string PutCall= { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable&= lt;System.DateTime> Expiry { get; set; }
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 public string Side { get; set; }
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 public Nullable<System.DateTime> Comodity1Month { get; set= ; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<System.DateTim= e> Comodity2Month { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 pu= blic Nullable<double> Asset1 { get; set; }
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 public Nullable<double> Asset2 { get; set; }
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<long> QtyAsset1 { get; se= t; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<long> QtyA= sset2 { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable&l= t;double> StrikePrice { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 public Nullable<double> RiskFreeRate { get; set; }
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<double> CostOfCarry1 { get; = set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<double> = CostOfCarry2 { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nul= lable<double> VolatilityAsset1 { get; set; }
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 public Nullable<double> VolatilityAsset2 { get; set; }<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<double> FixedPr= ice { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<= int> BUID { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nul= lable<int> PortfolioID { get; set; }
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 public Nullable<int> StrategyID { get; set; }
=C2=A0= =C2=A0 =C2=A0 =C2=A0 public Nullable<int> CPID { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<int> TraderID { get; s= et; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<int> InsT= ypeID { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public string Lis= tOfAllIndexText { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public = Nullable<System.DateTime> MvStartMonth { get; set; }
=C2=A0= =C2=A0 =C2=A0 =C2=A0 public string SourceSysName { get; set; }
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<System.DateTime> EndOfDay= Date { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<= ;int> DealSideGPID { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 p= ublic Nullable<int> ProfileID { get; set; }
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 public Nullable<int> InstrumentSeqNo { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<int> InstrumentSour= ceID { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public string Even= tSourceName { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public stri= ng CFlowTypeID { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public s= tring RTStatName { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public= string TranStatName { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 pu= blic Nullable<long> SequenceNo { get; set; }
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 public Nullable<System.DateTime> TimeStamp { get= ; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<int> C= ustomTransHeaderID { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 publ= ic int CustomTransDetailID { get; set; }
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 public string IndexName1 { get; set; }
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 public string IndexName2 { get; set; }
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 public Nullable<double> LTD_PNL { get; set; }
=
=C2=A0 =C2=A0 }
}

= =C2=A0public override void LoadCache(Action<object, object> act, para= ms object[] args)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 {
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 try {
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 var customTxnDetailsList =3D entitie= s.CustomTransactionsDetails;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 // Iterate over whole underlying store and call= act on each entry to load it into the cache.
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 foreach (CustomTransactionsDe= tail entry in customTxnDetailsList)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Console.WriteLine("Adding to cache:= {0}", entry.CustomTransDetailID);
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 act(entry.CustomTransDetailID= , entry);

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }ca= tch(Exception e)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Console.Write= Line("Exception is {0}", e);
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }

st= atic void Main(string[] args)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 {
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 var cfg =3D new IgniteConfig= uration
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 SpringConfigUrl =3D @&= quot;C:\Data\Professional\dotnet\workspace\MyIgnite\MyIgniteConsole\config\= ignite.xml",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 JvmOptions =3D new List<string> { "-Xms512m", &q= uot;-Xmx1024m" }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }= ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 //Ignition.ClientMode= =3D true;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 using (var i= gnite =3D Ignition.Start(cfg))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= Console.WriteLine(">>> Cache query example started");
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 var cache = =3D ignite.GetCache<int, CustomTransactionsDetail>(null);
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cache.LoadCache(null);=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Console.Rea= dLine();
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Conso= le.ReadLine();
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }

=
There are no other parts to these files. These POCOs are generat= ed by Entity Framework. Please let me know if you need additional informati= on.

Satya.

On Mon, Apr 4, 2016 at 8:11 AM, Pav= el Tupitsyn <ptupitsyn@gridgain.com> wrote:
Satya,

In your c= ode above there is "act(entry.personD= etailID, entry);",
but there is no=C2=A0personDetailID member in the=C2=A0CustomTransactionsDetail class.=C2=A0
Are you sure this is the correct one? Al= so, it is a partial class - are there any parts in other files?

Can you attach full source code of your application?

Thanks,
Pavel.
=

On Mon, Apr = 4, 2016 at 2:59 PM, Murthy Kakarlamudi <ksatya@gmail.com> wro= te:
Below is my entity. = I am not doing any serialization currently while storing in the cache.
=
namespace MyIgnite
{
=C2=A0 =C2=A0 = using System;
=C2=A0 =C2=A0 using System.Collections.Generic;
=C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 public partial class Cus= tomTransactionsDetail
=C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 public Nullable<int> TransactionID { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public string TypeName { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<System.DateTime> Expiry = { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public string Side { ge= t; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<System.D= ateTime> TimeStamp { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 p= ublic Nullable<int> CustomTransHeaderID { get; set; }
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 public int CustomTransDetailID { get; set; }
=

=C2=A0 =C2=A0 }
}

<= div>Thanks,
Satya.

On Mon, Apr 4, 2016 at 7:50 AM, Pavel Tupi= tsyn <ptupitsyn@gridgain.com> wrote:
Satya,

Looks like excep= tion comes from your entity member(s) during serialization.

<= /div>
Can you please attach your entity class code?
* Does it= have any navigation properties that may cause SQL queries?
* How= do you serialize it in Ignite? (Do you implement IBinarizable?)
=
Thanks,

Pavel.

=


On Mon, Apr 4, 2016 at 2:13 PM, Murthy Kakarlamudi <ksatya@g= mail.com> wrote:
Hi Pavel,
=C2=A0 =C2=A0Thanks for your response. I stepped thr= ough the LoadCache method in debug mode and noticed that it is failing at t= he act() method. Below is my code for LoacCache.

=
public override void LoadCache(A= ction<object, object> act, params object[] args)
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 {
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 var personDetailsList =3D entities.personDe= tails;
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 // Iterate over whole underlying store and call act on ea= ch entry to load it into the cache.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 foreach (personDetail entry in personDetailsList)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Consol= e.WriteLine("Adding to cache: " + entry.personDetailID);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 act(entry.personDetailID, entry);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0
<= div style=3D"font-size:12.8px">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }

I can see the statement:=C2=A0"Adding to cache: " in the node output and the control hangs at = the next line executing the "act" method and then it throws SQLEx= ception Timeout. Not sure why the "act" method is taking so much = time to store the entries in cache.

For testing, I commented out &= quot;act" statement and the program completed looping through all the = entries returned by Entity Framework without any errors.

Thanks,
Satya.

On Mon, Apr 4, 2016 at 4:40 AM, Pavel Tupitsyn <ptupits= yn@gridgain.com> wrote:
Hi Satya,

"Timeout expired.=C2=A0 The timeout period elapsed prior to comple= tion of the operation or the server is not responding."
This is an SQL exception. Please make sure that your entity connecti= on works.
You can set a breakpoint on the first line of LoadCache= method, step over your code and see what happens. Or wrap it in try-catch = block.

Meanwhile, looks like cache store erro= r messages are not very informative.=C2=A0
I've added a Jira = ticket, we'll fix it shortly:=C2=A0https://issues.apache.org/jira/= browse/IGNITE-2943

Thank you,

Pavel

On Mon, Apr 4, 2016 at 7:07 AM, Murthy Kakarlamudi= <ksatya@gmail.com> wrote:
=
Hello all,
=C2=A0 =C2=A0I was able to resolve the erro= r I posted above. I had to basically add the relevant EntityFramwork refere= nces in the solution that runs my Ignite server node. After successfully cr= eating the cache, however I am running into the below timeout issue:
<= div>
[00:02:37] Ignite node started OK (id=3Dcf8c5e00)
[00:02:37] Topology snapshot [ver=3D1, servers=3D1, clients=3D0, C= PUs=3D4, heap=3D0.89GB]
>>> Cache query example start= ed
Adding to cache: 228505
[00:03:10,524][SE= VERE][pub-#10%null%][GridJobWorker] Failed to execute job [jobId=3Dbcc9f6fd= 351-cf8c5e00-c86f-4e58-b0ad-6754896baf34, ses=3DGridJobSessionImpl [ses=3DG= ridTaskSessionImpl [taskName=3Do.a.i.i.processors.cache.GridCacheAdapter$Lo= adCacheClosure, dep=3DLocalDeployment [super=3DGridDeployment [ts=3D1459742= 547098, depMode=3DSHARED, clsLdr=3Dsun.misc.Launcher$AppClassLoader@764c12b= 6, clsLdrId=3Da9c9f6fd351-cf8c5e00-c86f-4e58-b0ad-6754896baf34, userVer=3D0= , loc=3Dtrue, sampleClsName=3Djava.lang.String, pendingUndeploy=3Dfalse, un= deployed=3Dfalse, usage=3D0]], taskClsName=3Do.a.i.i.processors.cache.GridC= acheAdapter$LoadCacheClosure, sesId=3Dacc9f6fd351-cf8c5e00-c86f-4e58-b0ad-6= 754896baf34, startTime=3D1459742557568, endTime=3D9223372036854775807, task= NodeId=3Dcf8c5e00-c86f-4e58-b0ad-6754896baf34, clsLdr=3Dsun.misc.Launcher$A= ppClassLoader@764c12b6, closed=3Dfalse, cpSpi=3Dnull, failSpi=3Dnull, loadS= pi=3Dnull, usage=3D1, fullSup=3Dfalse, subjId=3Dcf8c5e00-c86f-4e58-b0ad-675= 4896baf34, mapFut=3DIgniteFuture [orig=3DGridFutureAdapter [resFlag=3D0, re= s=3Dnull, startTime=3D1459742557584, endTime=3D0, ignoreInterrupts=3Dfalse,= lsnr=3Dnull, state=3DINIT]]], jobId=3Dbcc9f6fd351-cf8c5e00-c86f-4e58-b0ad-= 6754896baf34]]
class org.apache.ignite.IgniteException: class org= .apache.ignite.IgniteException: Timeout expired.=C2=A0 The timeout period e= lapsed prior to completion of the operation or the server is not responding= .
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.ignite.internal.proce= ssors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:179= 2

Apache.Ignite.Core.Cache.Store.CacheS= toreException was unhandled
=C2=A0 HResult=3D-2146233088
= =C2=A0 Message=3Dclass org.apache.ignite.IgniteException: Timeout expire= d.=C2=A0 The timeout period elapsed prior to completion of the operation or= the server is not responding.
=C2=A0 Source=3DApache.I= gnite.Core
=C2=A0 StackTrace:
=C2=A0 =C2=A0 =C2=A0 =C2= =A0at Apache.Ignite.Core.Impl.Unmanaged.UnmanagedCallbacks.Error(Void* targ= et, Int32 errType, SByte* errClsChars, Int32 errClsCharsLen, SByte* errMsgC= hars, Int32 errMsgCharsLen, Void* errData, Int32 errDataLen)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at Apache.Ignite.Core.Impl.Unmanaged.IgniteJn= iNativeMethods.TargetInStreamOutLong(Void* ctx, Void* target, Int32 opType,= Int64 memPtr)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at Apache.Ignite.Core.I= mpl.Unmanaged.UnmanagedUtils.TargetInStreamOutLong(IUnmanagedTarget target,= Int32 opType, Int64 memPtr)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at Apache= .Ignite.Core.Impl.PlatformTarget.DoOutOp(Int32 type, Action`1 action)
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0at MyIgniteConsole.Program.Main(String[] ar= gs) in C:\Data\Professional\dotnet\workspace\MyIgnite\MyIgniteConsole\Progr= am.cs:line 29
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.AppDomai= n._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0at System.AppDomain.ExecuteAssembly(String assembly= File, Evidence assemblySecurity, String[] args)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembl= y()
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.Threading.ExecutionConte= xt.RunInternal(ExecutionContext executionContext, ContextCallback callback,= Object state, Boolean preserveSyncCtx)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0at System.Threading.ExecutionContext.Run(ExecutionContext executionConte= xt, ContextCallback callback, Object state, Boolean preserveSyncCtx)
<= div>=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.Threading.ExecutionContext.Run(Exe= cutionContext executionContext, ContextCallback callback, Object state)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.Threading.ThreadHelper.ThreadSt= art()
=C2=A0 InnerException:=C2=A0

From my main program, I am making below call:
=C2=A0cache= .LoadCache(null);

In my store implementation I= have the following overide method:
=C2=A0public overr= ide void LoadCache(Action<object, object> act, params object[] args)<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 var personDetailsList =3D entities.personDetails;<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // Iterate over w= hole underlying store and call act on each entry to load it into the cache.=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 foreach (personDetail = entry in personDetailsList)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 Console.WriteLine("Adding to cache: " + entry.personDetail= ID);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 act(= entry.personDetailID, entry);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 }


thanks= in advance for your help...

Satya.

=

On Sat, Apr 2, 2016 at 11:49 AM, Murthy Kakarlamudi = <ksatya@gmail.com<= /a>> wrote:
Hi= ,
=C2=A0 =C2=A0In my .NET application, I have an underlying SQL Server = DB that I am planning to access using Ignite Persistence feature. I was fol= lowing the StoreExample provided in the examples and created the ignite con= figuration accordingly.=C2=A0

<property na= me=3D"cacheConfiguration">
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 <list>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <bean clas= s=3D"org.apache.ignite.configuration.CacheConfiguration">
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D"w= riteThrough" value=3D"true"/>
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D"readThrough" value= =3D"true"/>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 <property name=3D"cacheStoreFactory">
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <bean class=3D"org.apache= .ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <property name= =3D"typeName" value=3D"MyIgnite.SQLServerStore, MyIgnite&quo= t;/>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </bea= n>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </property>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </bean>
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 </list>
=C2=A0 =C2=A0 =C2=A0 </= property>

My SQLServerStore which is part= of MyIgnite dll is as below. I am using EntityFramework as ORM to access u= nderlying SQLServer.

class SQLServerStore : C= acheStoreAdapter
=C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 private TestEntities entities;
=C2=A0 =C2=A0 =C2=A0 =C2=A0= public SQLServerStore()
=C2=A0 =C2=A0 =C2=A0 =C2=A0 {
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 entities =3D new TestEntities();<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }

=C2=A0 =C2= =A0 =C2=A0 =C2=A0 /// <summary>
=C2=A0 =C2=A0 =C2=A0 =C2=A0= /// Loads all values from underlying persistent storage.
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 /// This method gets called as a result of <see cre= f=3D"ICache{TK,TV}.LoadCache"/> call.
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 /// </summary>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 //= / <param name=3D"act">Action that loads a cache entry.</= param>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 /// <param name=3D"= args">Optional arguments.</param>
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 public override void LoadCache(Action<object, object> act,= params object[] args)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 {
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 var personDetailsList =3D entitie= s.PersonDetails;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // Ite= rate over whole underlying store and call act on each entry to load it into= the cache.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 foreach (pe= rsonDetail=C2=A0entry in=C2=A0personDetailsList)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 act(entry.personD, entry);
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }
}
Whwn I try to run the above, I am getting the below error.

Apache.Ignite.Core.Common.IgniteException was unh= andled
=C2=A0 Message=3DExcep= tion has been thrown by the target of an invocation.
=C2=A0 Sourc= e=3DApache.Ignite.Core
=C2=A0 StackTrace:
=C2=A0 =C2=A0= =C2=A0 =C2=A0at Apache.Ignite.Core.Impl.Unmanaged.UnmanagedCallbacks.Error= (Void* target, Int32 errType, SByte* errClsChars, Int32 errClsCharsLen, SBy= te* errMsgChars, Int32 errMsgCharsLen, Void* errData, Int32 errDataLen)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at Apache.Ignite.Core.Impl.Unmanaged.Igni= teJniNativeMethods.IgnitionStart(Void* ctx, SByte* cfgPath, SByte* gridName= , Int32 factoryId, Int64 dataPtr)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at A= pache.Ignite.Core.Impl.Unmanaged.UnmanagedUtils.IgnitionStart(UnmanagedCont= ext ctx, String cfgPath, String gridName, Boolean clientMode)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0at Apache.Ignite.Core.Ignition.Start(IgniteConfigur= ation cfg)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at MyIgniteConsole.Program.= Main(String[] args) in C:\Data\Professional\dotnet\workspace\MyIgnite\MyIgn= iteConsole\Program.cs:line 21
=C2=A0 =C2=A0 =C2=A0 =C2=A0at Syste= m.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.AppDomain.ExecuteAssembly(String= assemblyFile, Evidence assemblySecurity, String[] args)
=C2=A0 = =C2=A0 =C2=A0 =C2=A0at Microsoft.VisualStudio.HostingProcess.HostProc.RunUs= ersAssembly()
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.Threading.Exec= utionContext.RunInternal(ExecutionContext executionContext, ContextCallback= callback, Object state, Boolean preserveSyncCtx)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0at System.Threading.ExecutionContext.Run(ExecutionContext exec= utionContext, ContextCallback callback, Object state, Boolean preserveSyncC= tx)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.Threading.ExecutionConte= xt.Run(ExecutionContext executionContext, ContextCallback callback, Object = state)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.Threading.ThreadHelpe= r.ThreadStart()
=C2=A0 InnerException:=C2=A0

=

Any help would be appreciated.

Thanks,
Satya.











--047d7b414f64b2c423052faa433d--