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 1182119A04 for ; Tue, 5 Apr 2016 04:16:26 +0000 (UTC) Received: (qmail 37930 invoked by uid 500); 5 Apr 2016 04:16:21 -0000 Delivered-To: apmail-ignite-user-archive@ignite.apache.org Received: (qmail 37882 invoked by uid 500); 5 Apr 2016 04:16: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 37872 invoked by uid 99); 5 Apr 2016 04:16: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; Tue, 05 Apr 2016 04:16: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 50083C0606 for ; Tue, 5 Apr 2016 04:16:20 +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 mx1-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 Vfqpt8j9heWr for ; Tue, 5 Apr 2016 04:16:17 +0000 (UTC) Received: from mail-oi0-f54.google.com (mail-oi0-f54.google.com [209.85.218.54]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 64DE55FB06 for ; Tue, 5 Apr 2016 04:16:17 +0000 (UTC) Received: by mail-oi0-f54.google.com with SMTP id p188so2753011oih.2 for ; Mon, 04 Apr 2016 21:16:17 -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=p4wCNtp4n4xV1W2rqivbgOi9QhTcA7L45sPKqM5i5vE=; b=T4H1SgYbDBXVR2cM6OTI8G5CwZnulE9e+Zdw6jx1w2QwwaDFsEZa89o9sBRJidPeeW zpdEpcOlMgGLdKfzoZIiR6ClOe0AbNsdffFvOm9sTE1YmdtNDXvu5BnAj8kncsXbe9l9 hNvtgvs3kdb9KZfo6mx97s4FgN2ddlGbgxgazUWkYJd836kpU9Xl7IdiNTqJDOrlUJIr bxPMTUuaBnNMXKqY4dpcSNSw0DtjijRk+X44eWi3SG1zPc2WZSczqNHM5ev34b9CFPGU 0M2uyyA60VMy2qmyEC7E6yf86mg31geIu4654ku9rKduTSwEPaiFXwkDiFW+Zu1Jla1W lRmA== 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=p4wCNtp4n4xV1W2rqivbgOi9QhTcA7L45sPKqM5i5vE=; b=e6BYEEBRZGrx/fK0ZXw5HjoyaVc1OcUkY1LCisqwuN7NsiXm78PvcazpvnKsyRsaf6 V4xOL0EaGV5RcUGFyR359nrINB0vnOgs3tJhMQpbA++cL6Sd495kTigSLazHjeoK5OSD GJUV4t8d5d45iGG/wzbc92JQKsdCLrRuqqeez+cWyVAgCsI4xCHMcwslW27nO8//RkgP st0e88aTTjdY3rCP+iXuH8W7SszcW61q8EPvUYKQy6j3C5QXSPcpYqxJSiUMsCFpyIXN E5nqZOGYrKRSDMmcR5cDTZ50TA3TyeHn/r697o2vxJq24/Nh5MnTDSNHeOlC4UbdiJcM AB0A== X-Gm-Message-State: AD7BkJIqM5F9f+6SuS8dKtPdsb85l1move2Gmwy4SijFT32ETSUjfjQAaN63xWS4atP5s5WsTBTANTDdvLLYtA== MIME-Version: 1.0 X-Received: by 10.202.222.5 with SMTP id v5mr12182730oig.82.1459829776538; Mon, 04 Apr 2016 21:16:16 -0700 (PDT) Received: by 10.202.104.12 with HTTP; Mon, 4 Apr 2016 21:16:16 -0700 (PDT) In-Reply-To: References: Date: Tue, 5 Apr 2016 00:16:16 -0400 Message-ID: Subject: Re: SQLServer Persistence Store Error From: Murthy Kakarlamudi To: user@ignite.apache.org Content-Type: multipart/alternative; boundary=001a113ce7a8436471052fb51b46 --001a113ce7a8436471052fb51b46 Content-Type: text/plain; charset=UTF-8 Hi Pavel, I was playing around with different options and once I specified [Serializable] annotation at the entity class level, I was able to successfully insert into cache. With this setting LoadCache() method is working as well. Not sure if this is the right approach. I will not prefer this as this needs an update to a auto-generated class and any subsequent updates might overide the manual settings. On a separate note, is there a way I can query the cache using sql console. In java, I can set IGNITE_H2_DEBUG_CONSOLE to query the cache. Wondering if there is an equivalent on .NET side. Thanks, Satya. On Mon, Apr 4, 2016 at 8:08 PM, Murthy Kakarlamudi wrote: > 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> CustomTransactionsDetail>(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 < >>>>>>>> ksatya@gmail.com> 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. >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > --001a113ce7a8436471052fb51b46 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Pavel,
=C2=A0 =C2=A0I was playing around with diffe= rent options and once I specified [Serializable] annotation at the entity c= lass level, I was able to successfully insert into cache. With this setting= LoadCache() method is working as well. Not sure if this is the right appro= ach. I will not prefer this as this needs an update to a auto-generated cla= ss and any subsequent updates might overide the manual settings.
=
On a separate note, is there a way I can query the cache usi= ng sql console. In java, I can set IGNITE_H2_DEBUG_CONSOLE to query the cac= he. Wondering if there is an equivalent on .NET side.

<= div>Thanks,
Satya.

On Mon, Apr 4, 2016 at 8:08 PM, Murthy Kakarlamudi <= span dir=3D"ltr"><= ksatya@gmail.com> wrote:
Hi Pavel,
=C2=A0 =C2=A0I am not able to send the solutio= n zip in gmail. It is blocking as the zip file contains executables. Can yo= u please check if you can download the solution from the below location:


Thanks,
Murthy.

On Mon, Apr 4, 2016 at 11= :09 AM, Pavel Tupitsyn <ptupitsyn@gridgain.com> wrote:<= br>
LoadCache arguments= are serialized and passed over network. Cache instance can't be used a= s a LoadCache argument.
Please try to do a cache put directly in = the main method:
=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 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, 20= 16 at 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 my CacheAdapter implementation which is in a different dll. Can you ple= ase help where I went wrong:

In my main program, I= was passing cache in LoadCache method:
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 = 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 cache.Load= Cache(null,cache);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 Console.WriteLine(">> Organization Cache Size: &qu= ot; + 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 impl= ementation, I tried to access Cache as below:

public override void LoadCache(Action<object, object> act, par= ams 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.Custo= mTransactionsDetails;
=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 e= ntry 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 customT= xnDetailsList)
=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}"= , 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.Wr= iteLine("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<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }
<= div class=3D"gmail_extra">
On Mon, Apr 4, 201= 6 at 8:26 AM, Pavel Tupitsyn <ptupitsyn@gridgain.com> w= rote:
Instead of LoadCac= he, can you try a simple cache put and see what happens?

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

and with entity from EF:

cache[2] =3D=C2=A0entities.CustomTran= sactionsDetails.First();
=
Pavel.
<= /div>

On Mon, Apr 4, 2016 at 3:20 PM, Murthy Kakarlamudi &l= t;ksatya@gmail.com> wrote:
Sorr= y....attached the wrong version. Below is the full entity class and the Cac= heStore implementation.

namespace MyIgnite
{
=C2=A0 =C2=A0 using System;
=C2=A0 =C2=A0 usi= ng 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> T= ransactionID { get; set; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 pub= lic 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.












--001a113ce7a8436471052fb51b46--