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 0A14219204 for ; Tue, 5 Apr 2016 00:08:48 +0000 (UTC) Received: (qmail 2602 invoked by uid 500); 5 Apr 2016 00:08:47 -0000 Delivered-To: apmail-ignite-user-archive@ignite.apache.org Received: (qmail 2557 invoked by uid 500); 5 Apr 2016 00:08:47 -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 2547 invoked by uid 99); 5 Apr 2016 00:08:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Apr 2016 00:08:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 332DD180450 for ; Tue, 5 Apr 2016 00:08:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id tEaVYmIAVMI3 for ; Tue, 5 Apr 2016 00:08:40 +0000 (UTC) Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 9AD975F65B for ; Tue, 5 Apr 2016 00:08:39 +0000 (UTC) Received: by mail-ob0-f173.google.com with SMTP id j9so62809787obd.3 for ; Mon, 04 Apr 2016 17:08:39 -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=Glh9Xa2LQrG8JIAJqt+h+m9AQeMEXGRNQ9BwtWJGMoc=; b=QvXvIuekU7tV8auOBzIRQqfxCLP3ujRw12N6krZRN225YyL/qsOSXm4SNTS+Wh0lAZ 3C9WRmUZHsniLp0JmAzhZryyLVOpd9zUTiAmz6ZKX+YvQW4bcsdkn5OkhuXV3MWMN+gq 5atO/VA71Gp/515+6BIh4sv923kWTZ63JSDh0WMPtI7INXP14dZC9KyO6CGUC2op2bg0 nv/MfETTQELANppgyuD/9uMzf/nCUnVRnWxhYWYIVSHxub6KfMsfcK3/zEb4k9wtGnhx 2r3YyKv35kidCw3fpxN3iA1VSpAsguAILVfsfpPjsmW29uL19yRyKGMj9wFXsXVgx1KT dc6w== 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=Glh9Xa2LQrG8JIAJqt+h+m9AQeMEXGRNQ9BwtWJGMoc=; b=UNjKt5W66J5PwBMwAlHFrRz9AYkn36QOV1N5KXLhML/cv8AnzVs0bguH8Ym104sGkv Lqj6EHfHeo2lHCNWOANP/HBrXt81J37woXcClg4IPdWdnZPUVNI3UvTff4gob0nca05T sWZ1B+1VP+uA3A1OmwFKtR96CJQOchqjpOoQvDyEiwACa8wmAWPV16NO/0Mo2qH/B3kf +8dsR9w0M/LcvLZOELHcUqopcHYBPg9pqbkJ1Edvn84M0ArJJJyDib1hzWGbRtTMdlK/ aqzY5FGbZuovOfimxOUD9jeT1kZN87dpdNhsmixADS0ytN9wP43nLVcFAKX1TEDqve4w 45pA== X-Gm-Message-State: AD7BkJI9VXFOLYLUlOWhbLq87JZw853+vbh5Y0Oyeh2XfBzojwYLPO72q02wJnsoUD3QfO6b8bZ3eMRLc5EFRQ== MIME-Version: 1.0 X-Received: by 10.182.58.97 with SMTP id p1mr11897365obq.33.1459814911879; Mon, 04 Apr 2016 17:08:31 -0700 (PDT) Received: by 10.202.104.12 with HTTP; Mon, 4 Apr 2016 17:08:31 -0700 (PDT) In-Reply-To: References: Date: Mon, 4 Apr 2016 20:08:31 -0400 Message-ID: Subject: Re: SQLServer Persistence Store Error From: Murthy Kakarlamudi To: user@ignite.apache.org Content-Type: multipart/alternative; boundary=e89a8f92406042b05f052fb1a52d --e89a8f92406042b05f052fb1a52d Content-Type: text/plain; charset=UTF-8 Hi Pavel, I am not able to send the solution zip in gmail. It is blocking as the zip file contains executables. Can you please check if you can download the solution from the below location: https://drive.google.com/open?id=0B8lM91-_3MwRS3pFU2JwRjJkYVU Thanks, Murthy. 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. >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > --e89a8f92406042b05f052fb1a52d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Pavel,
=C2=A0 =C2=A0I am not able to send the solut= ion zip in gmail. It is blocking as the zip file contains executables. Can = you please check if you can download the solution from the below location:<= /div>


Thanks,
Murthy.

On Mon,= Apr 4, 2016 at 11:09 AM, Pavel Tupitsyn <ptupitsyn@gridgain.com&= gt; wrote:
L= oadCache arguments are serialized and passed over network. Cache instance c= an't be used as a LoadCache argument.
Please try to do a cach= e put directly in the main method:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 using (var ign= ite =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 cache =3D ignite.GetCache<int= , CustomTransactionsDetail>(null= );
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cache.P= ut(1,=C2=A0entities.CustomTransactionsDetails.First());
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }

I suspect there i= s an issue with serializing=C2=A0CustomTra= nsactionsDetail instances.
Entity Framework POCO proxies can't be ser= ialized by Ignite automatically.
You have to either disable proxies (https://m= sdn.microsoft.com/en-us/library/dd456853(v=3Dvs.100).aspx), or implemen= t IBinarizable with manual serialization.

If = you send me your whole solution in a zip file, I'll be able to investig= ate further.

<= /div>
Thanks,

Pavel.

On Mon, Apr 4, 2016 a= t 5:53 PM, Murthy Kakarlamudi <ksatya@gmail.com> wrote:
Hi Pavel,
=C2=A0 =C2=A0 I= was trying to do that before and ran into issues passing cache object to m= y CacheAdapter implementation which is in a different dll. Can you please h= elp 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 Con= sole.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 cache.LoadCach= e(null,cache);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 Console.WriteLine(">> Organization Cache Size: "= + cache.GetSize());
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 Console.ReadLine();
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 }

In my CacheStoreAdapter impleme= ntation, I tried to access Cache as below:

<= div>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 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 customTxnDetailsList =3D entities.CustomTr= ansactionsDetails;
=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 entr= y to load it into the cache.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 foreach (CustomTransactionsDetail entry in customTxnDe= tailsList)
=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} {1}", e= ntry.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, ent= ry);

=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 }

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

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

and with entity from EF:

cache[2] =3D=C2=A0entities.CustomTransac= tionsDetails.First();
Pavel.

On Mon, Apr 4, 2016 at 3:20 PM, Murthy Kakarlamudi <<= a href=3D"mailto:ksatya@gmail.com" target=3D"_blank">ksatya@gmail.com&g= t; wrote:
Sorry..= ..attached the wrong version. Below is the full entity class and the CacheS= tore implementation.

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 CustomTransactionsDetail
=C2=A0 =C2= =A0 {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<int> Tran= sactionID { 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 InstrumentTypeShortName { get; set; }
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 public string DealType { 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<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<Sy= stem.DateTime> Comodity1Month { get; set; }
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 public Nullable<System.DateTime> Comodity2Month { get; set= ; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<double> Ass= et1 { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<= double> Asset2 { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 publi= c Nullable<long> QtyAsset1 { get; set; }
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 public Nullable<long> QtyAsset2 { get; set; }
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<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 N= ullable<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 Nullable<double> VolatilityA= sset1 { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable&l= t;double> VolatilityAsset2 { get; set; }
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 public Nullable<double> FixedPrice { 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 Nullable<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 Nul= lable<int> CPID { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 p= ublic Nullable<int> TraderID { get; set; }
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 public Nullable<int> InsTypeID { get; set; }
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 public string ListOfAllIndexText { get; set; }<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<System.DateTime>= ; MvStartMonth { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public s= tring SourceSysName { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 pub= lic Nullable<System.DateTime> EndOfDayDate { get; set; }
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<int> DealSideGPID { get; = set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<int> Pro= fileID { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable&= lt;int> InstrumentSeqNo { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 public Nullable<int> InstrumentSourceID { get; set; }
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 public string EventSourceName { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public string CFlowTypeID { get; set; }<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public string RTStatName { get; set; = }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public string TranStatName { get; s= et; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<long> Seq= uenceNo { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nu= llable<System.DateTime> TimeStamp { get; set; }
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 public Nullable<int> CustomTransHeaderID { get; set= ; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public int CustomTransDetailID { = get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public string Inde= xName1 { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public string In= dexName2 { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullabl= e<double> LTD_PNL { get; set; }
=C2=A0 =C2=A0 }
}=

=C2=A0public override void LoadC= ache(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 try {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 var customTxnDetailsList =3D entities.CustomTransactionsDetails;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // It= erate over whole underlying store and call act on each entry to load it int= o the cache.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 foreach (CustomTransactionsDetail entry in customTxnDetailsList)=
=C2=A0 =C2=A0 =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 C= onsole.WriteLine("Adding to cache: {0}", entry.CustomTransDetailI= D);
=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 }<= /div>

static 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 IgniteConfiguration
=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 @"C:\Data\Professional\dotnet\wo= rkspace\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", "-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 ignite =3D Ignition.Start(cfg))<= /div>
=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(">&= gt;> 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, Cu= stomTransactionsDetail>(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.ReadLine();
=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.ReadLine();
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 }

There are no othe= r parts to these files. These POCOs are generated by Entity Framework. Plea= se let me know if you need additional information.

Satya.

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

In your code above there is "act(entry.personDetailID, entry);"= ;,
but there is no=C2=A0personDe= tailID member in the=C2=A0CustomTra= nsactionsDetail class.=C2=A0
Are you sure this is the correct one? Also, it is a partial class - are= there any parts in other files?

Can you atta= ch full source code of your application?

Than= ks,
Pavel.

On Mon, Apr 4, 2016 at 2:59 PM, Murthy Kaka= rlamudi <ksatya@gmail.com> wrote:
Below is my entity. I am not doing any serializatio= n currently while storing in the cache.

namespace M= yIgnite
{
=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 CustomTransactionsDetail
=C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<i= nt> TransactionID { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 pu= blic string TypeName { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 pu= blic Nullable<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> TimeStamp { get; s= et; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public Nullable<int> Cust= omTransHeaderID { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public = int CustomTransDetailID { get; set; }

=C2=A0 =C2= =A0 }
}

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 me= mber(s) during serialization.

Can you please attac= h your entity class code?
* Does it have any navigation propertie= s that may cause SQL queries?
* How do you serialize it in Ignite= ? (Do you implement IBinarizable?)

Thanks,

Pavel.



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

public override void LoadCache(Action<object, object> act, = params object[] args)
=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 va= r personDetailsList =3D entities.personDetails;
=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.personDetailID);
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 act(entry.personDetail= ID, 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 }

I can see the stat= ement:=C2=A0"Adding to cache: " = in the node output and the control hangs at the next line executing the &qu= ot;act" method and then it throws SQLException Timeout. Not sure why t= he "act" method is taking so much time to store the entries in ca= che.

For testing, I commented out "act" statement and th= e program completed looping through all the entries returned by Entity Fram= ework without any errors.

Thanks,
Satya.
=

On Mon, Apr 4, 20= 16 at 4:40 AM, Pavel Tupitsyn <ptupitsyn@gridgain.com> = wrote:
Hi Satya,
"Timeout expired.=C2= =A0 The timeout period elapsed prior to completion of the operation or the = server is not responding."
This is an SQL excepti= on. Please make sure that your entity connection works.
You can s= et 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 infor= mative.=C2=A0
I've added a Jira ticket, we'll fix it shor= tly:=C2=A0https://issues.apache.org/jira/browse/IGNITE-2943
<= div>
Thank you,

Pavel

On M= on, Apr 4, 2016 at 7:07 AM, Murthy Kakarlamudi <ksatya@gmail.com> wrote:
Hello all,=C2=A0 =C2=A0I was able to resolve the error I posted above. I had to ba= sically add the relevant EntityFramwork references in the solution that run= s my Ignite server node. After successfully creating the cache, however I a= m running into the below timeout issue:

[00:0= 2:37] Ignite node started OK (id=3Dcf8c5e00)
[00:02:37] Topology = snapshot [ver=3D1, servers=3D1, clients=3D0, CPUs=3D4, heap=3D0.89GB]
=
>>> Cache query example started
Adding to= cache: 228505
[00:03:10,524][SEVERE][pub-#10%null%][GridJobW= orker] Failed to execute job [jobId=3Dbcc9f6fd351-cf8c5e00-c86f-4e58-b0ad-6= 754896baf34, ses=3DGridJobSessionImpl [ses=3DGridTaskSessionImpl [taskName= =3Do.a.i.i.processors.cache.GridCacheAdapter$LoadCacheClosure, dep=3DLocalD= eployment [super=3DGridDeployment [ts=3D1459742547098, depMode=3DSHARED, cl= sLdr=3Dsun.misc.Launcher$AppClassLoader@764c12b6, clsLdrId=3Da9c9f6fd351-cf= 8c5e00-c86f-4e58-b0ad-6754896baf34, userVer=3D0, loc=3Dtrue, sampleClsName= =3Djava.lang.String, pendingUndeploy=3Dfalse, undeployed=3Dfalse, usage=3D0= ]], taskClsName=3Do.a.i.i.processors.cache.GridCacheAdapter$LoadCacheClosur= e, sesId=3Dacc9f6fd351-cf8c5e00-c86f-4e58-b0ad-6754896baf34, startTime=3D14= 59742557568, endTime=3D9223372036854775807, taskNodeId=3Dcf8c5e00-c86f-4e58= -b0ad-6754896baf34, clsLdr=3Dsun.misc.Launcher$AppClassLoader@764c12b6, clo= sed=3Dfalse, cpSpi=3Dnull, failSpi=3Dnull, loadSpi=3Dnull, usage=3D1, fullS= up=3Dfalse, subjId=3Dcf8c5e00-c86f-4e58-b0ad-6754896baf34, mapFut=3DIgniteF= uture [orig=3DGridFutureAdapter [resFlag=3D0, res=3Dnull, startTime=3D14597= 42557584, endTime=3D0, ignoreInterrupts=3Dfalse, lsnr=3Dnull, state=3DINIT]= ]], jobId=3Dbcc9f6fd351-cf8c5e00-c86f-4e58-b0ad-6754896baf34]]
cl= ass org.apache.ignite.IgniteException: class org.apache.ignite.IgniteExcept= ion: Timeout expired.=C2=A0 The timeout period elapsed 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.processors.closure.GridClosureP= rocessor$C2.execute(GridClosureProcessor.java:1792

Apache.Ignite.Core.Cache.Store.CacheStoreException was unhandle= d
=C2=A0 HResult=3D-2146233088
=C2=A0 Message=3Dclass org.= apache.ignite.IgniteException: Timeout expired.=C2=A0 The timeout period= elapsed prior to completion of the operation or the server is not respondi= ng.
=C2=A0 Source=3DApache.Ignite.Core
=C2=A0= StackTrace:
=C2=A0 =C2=A0 =C2=A0 =C2=A0at Apache.Ignite.Core.Imp= l.Unmanaged.UnmanagedCallbacks.Error(Void* target, Int32 errType, SByte* er= rClsChars, Int32 errClsCharsLen, SByte* errMsgChars, Int32 errMsgCharsLen, = Void* errData, Int32 errDataLen)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0at Apache.Ignite.Core.Impl.Unmanaged.IgniteJniNativeMethods.TargetInStre= amOutLong(Void* ctx, Void* target, Int32 opType, Int64 memPtr)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0at Apache.Ignite.Core.Impl.Unmanaged.UnmanagedUt= ils.TargetInStreamOutLong(IUnmanagedTarget target, Int32 opType, Int64 memP= tr)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at Apache.Ignite.Core.Impl.Platfor= mTarget.DoOutOp(Int32 type, Action`1 action)
=C2=A0 =C2=A0 =C2=A0= =C2=A0at MyIgniteConsole.Program.Main(String[] args) in C:\Data\Profession= al\dotnet\workspace\MyIgnite\MyIgniteConsole\Program.cs:line 29
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.AppDomain._nExecuteAssembly(Runti= meAssembly assembly, String[] args)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at= System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySec= urity, String[] args)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at Microsoft.Vis= ualStudio.HostingProcess.HostProc.RunUsersAssembly()
=C2=A0 =C2= =A0 =C2=A0 =C2=A0at System.Threading.ExecutionContext.RunInternal(Execution= Context executionContext, ContextCallback callback, Object state, Boolean p= reserveSyncCtx)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.Threading.Ex= ecutionContext.Run(ExecutionContext executionContext, ContextCallback callb= ack, Object state, Boolean preserveSyncCtx)
=C2=A0 =C2=A0 =C2=A0 = =C2=A0at System.Threading.ExecutionContext.Run(ExecutionContext executionCo= ntext, ContextCallback callback, Object state)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0at System.Threading.ThreadHelper.ThreadStart()
=C2=A0 I= nnerException:=C2=A0

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

In my store implementation I have the following over= ide method:
=C2=A0public 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 = var personDetailsList =3D entities.personDetails;
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // Iterate over whole underlying store a= nd 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 personDetail= sList)
=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.WriteLin= e("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
=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 y= our help...

Satya.

=

On Sat, Apr = 2, 2016 at 11:49 AM, Murthy Kakarlamudi <ksatya@gmail.com> wr= ote:
Hi,
=C2=A0 =C2= =A0In my .NET application, I have an underlying SQL Server DB that I am pla= nning to access using Ignite Persistence feature. I was following the Store= Example provided in the examples and created the ignite configuration accor= dingly.=C2=A0

<property name=3D"cache= Configuration">
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <list><= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <bean class=3D"org.apa= che.ignite.configuration.CacheConfiguration">
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D"writeThrough"= ; value=3D"true"/>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 <property name=3D"readThrough" value=3D"true&q= uot;/>
=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"typeNam= e" value=3D"MyIgnite.SQLServerStore, MyIgnite"/>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </bean>
= =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 d= ll is as below. I am using EntityFramework as ORM to access underlying SQLS= erver.

class SQLServerStore : CacheStoreAdapt= er
=C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 private = TestEntities entities;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public SQLServ= erStore()
=C2=A0 =C2=A0 =C2=A0 =C2=A0 {
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 entities =3D new TestEntities();
=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 cref=3D"= ICache{TK,TV}.LoadCache"/> call.
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 /// </summary>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 /// <para= m name=3D"act">Action that loads a cache entry.</param><= /div>
=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 ob= ject[] 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 each entry to load it into the cache= .
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 foreach (personDetail= =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
<= div>=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 unhandled
=C2=A0 HResult=3D-2146233088
=C2=A0 Message=3DException has b= een thrown by the target of an invocation.
=C2=A0 Source=3DApache= .Ignite.Core
=C2=A0 StackTrace:
=C2=A0 =C2=A0 =C2=A0 = =C2=A0at Apache.Ignite.Core.Impl.Unmanaged.UnmanagedCallbacks.Error(Void* t= arget, Int32 errType, SByte* errClsChars, Int32 errClsCharsLen, SByte* errM= sgChars, Int32 errMsgCharsLen, Void* errData, Int32 errDataLen)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0at Apache.Ignite.Core.Impl.Unmanaged.IgniteJniNa= tiveMethods.IgnitionStart(Void* ctx, SByte* cfgPath, SByte* gridName, Int32= factoryId, Int64 dataPtr)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at Apache.I= gnite.Core.Impl.Unmanaged.UnmanagedUtils.IgnitionStart(UnmanagedContext ctx= , String cfgPath, String gridName, Boolean clientMode)
=C2=A0 =C2= =A0 =C2=A0 =C2=A0at Apache.Ignite.Core.Ignition.Start(IgniteConfiguration c= fg)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at MyIgniteConsole.Program.Main(St= ring[] args) in C:\Data\Professional\dotnet\workspace\MyIgnite\MyIgniteCons= ole\Program.cs:line 21
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.AppDo= main._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0at System.AppDomain.ExecuteAssembly(String assem= blyFile, Evidence assemblySecurity, String[] args)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAsse= mbly()
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.Threading.ExecutionCo= ntext.RunInternal(ExecutionContext executionContext, ContextCallback callba= ck, Object state, Boolean preserveSyncCtx)
=C2=A0 =C2=A0 =C2=A0 = =C2=A0at System.Threading.ExecutionContext.Run(ExecutionContext executionCo= ntext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.Threading.ExecutionContext.Run(= ExecutionContext executionContext, ContextCallback callback, Object state)<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.Threading.ThreadHelper.Threa= dStart()
=C2=A0 InnerException:=C2=A0

<= div>
Any help would be appreciated.

= Thanks,
Satya.











--e89a8f92406042b05f052fb1a52d--