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 304AF18D3F for ; Mon, 4 Apr 2016 11:51:29 +0000 (UTC) Received: (qmail 29468 invoked by uid 500); 4 Apr 2016 11:51:28 -0000 Delivered-To: apmail-ignite-user-archive@ignite.apache.org Received: (qmail 29429 invoked by uid 500); 4 Apr 2016 11:51:28 -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 29419 invoked by uid 99); 4 Apr 2016 11:51:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Apr 2016 11:51:28 +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 69956C690F for ; Mon, 4 Apr 2016 11:51:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.298 X-Spam-Level: * X-Spam-Status: No, score=1.298 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gridgain-com.20150623.gappssmtp.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id XF_AX6liiDb8 for ; Mon, 4 Apr 2016 11:51:26 +0000 (UTC) Received: from mail-oi0-f47.google.com (mail-oi0-f47.google.com [209.85.218.47]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id C03925FB5D for ; Mon, 4 Apr 2016 11:51:25 +0000 (UTC) Received: by mail-oi0-f47.google.com with SMTP id s79so63794077oie.1 for ; Mon, 04 Apr 2016 04:51:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gridgain-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=Sl//XL+kPvdMZU750aM5L7QbQFNo4aqFL8YwgUyAHYE=; b=NceTL7sn3e0iAuhXCXEYcU17qGksBLPR9efTH8mGnGP1AQvr4aM/hPyOeDHJEom5eJ ddcNlWyGIj62ZbRr9cWY7To97I4sPJcrzKpC2XbGIHLBg39HUU7sAiFSurwHHI/auMD5 jN/t9GnCZqCemcEJ78er0bAq7xyo41SVb7xi2YBhBkjyW25UFWmjv8NByO19NpD86/tF k3afe/F57Uk7OHp4QVBSBbBYGL2f+hU9Zunj5oItxa0n7rNEEeI8KJBBInKSdjg+ZfOT DH2vU7JdOH+f9URDTCH9MO+7rOBItYQwMaEHgY5f6PEcFyQtxgiscWNTEK9ukzNqsdfC hHmw== 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:from:date :message-id:subject:to; bh=Sl//XL+kPvdMZU750aM5L7QbQFNo4aqFL8YwgUyAHYE=; b=WHa5oMbfU2kxmG0Io+ZZuhXEkSOVipUEfoeLS7QiE0HTcPcQThQ48aUB3Ql3xjIidl H5hRbgqfoyxfeSZNY6LkpjZMl8JZegnrExz+ZiWKZVUC0ZTXC4WBQXB1J8Jc7x/HvZ51 6TgMlJ1sHSaesrhK9qnitCrp27ex0aTThkaKLTVsLeJ+uvPMDA4CNpRlOvVtHoLMqJul eKrFnp9PhRhenyfGnlJDZasJ7HZ5rOhNDDUBrBDRsCnSQaL1NIlc1HZAQUgdfQ4E0oYM 2wJ2KJeB6C+cCxF4RT9Uh3MkmjTPmUDNZjxqHSFsV98lSJcj14BEsl25+wuMa+W8Pmaz TGnw== X-Gm-Message-State: AD7BkJJLi8yaMjB+DxEzF8IgYAn09oIAuUdf+LKmYA0dU250ndG78J2oqD7kgiKRIKx7QD83b7VH/laLF6JLycYO X-Received: by 10.202.196.72 with SMTP id u69mr9726788oif.78.1459770679300; Mon, 04 Apr 2016 04:51:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.31.70 with HTTP; Mon, 4 Apr 2016 04:50:49 -0700 (PDT) In-Reply-To: References: From: Pavel Tupitsyn Date: Mon, 4 Apr 2016 14:50:49 +0300 Message-ID: Subject: Re: SQLServer Persistence Store Error To: user@ignite.apache.org Content-Type: multipart/alternative; boundary=001a11352a4ecb27ef052fa758af --001a11352a4ecb27ef052fa758af Content-Type: text/plain; charset=UTF-8 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 > 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 >> 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 >>> 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. >>>> >>> >>> >> > --001a11352a4ecb27ef052fa758af Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Satya,

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

Can yo= u please attach your entity class code?
* Does it have any naviga= tion properties that may cause SQL queries?
* How do you serializ= e it in Ignite? (Do you implement IBinarizable?)

T= hanks,

Pavel.


<= /div>

On Mon, Apr = 4, 2016 at 2:13 PM, Murthy Kakarlamudi <ksatya@gmail.com> wro= te:
Hi Pavel,
=C2=A0= =C2=A0Thanks 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<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 and call act on each entry to lo= ad it into the cache.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f= oreach (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(&= quot;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 }

I= can see the statement:=C2=A0"Adding = to cache: " in the node output and the control hangs at the next line = executing the "act" method and then it throws SQLException Timeou= t. 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 return= ed by Entity Framework without any errors.

Thanks,
Satya.
<= br>
On Mon, Apr 4, 2016 at 4:40 AM, Pavel Tupitsy= n <ptupitsyn@gridgain.com> wrote:
Hi Satya,

"Timeout expired.=C2=A0 The timeout period elapse= d prior to completion of the operation or the server is not responding.= "
This is an SQL exception. Please make sure that you= r 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.=C2=A0
I'= ;ve added a Jira ticket, we'll fix it shortly:=C2=A0https://issues= .apache.org/jira/browse/IGNITE-2943

Thank you,=

Pavel

On Mon, Apr 4, 2016 at 7:07 AM, M= urthy Kakarlamudi <ksatya@gmail.com> wrote:
Hello all,
=C2=A0 =C2=A0I was able to= resolve the error I posted above. I had to basically add the relevant Enti= tyFramwork references in the solution that runs my Ignite server node. Afte= r successfully creating the cache, however I am running into the below time= out issue:

[00:02:37] Ignite node started OK = (id=3Dcf8c5e00)
[00:02:37] Topology snapshot [ver=3D1, servers=3D= 1, clients=3D0, CPUs=3D4, heap=3D0.89GB]
>>> Cache qu= ery example started
Adding to cache: 228505
= [00:03:10,524][SEVERE][pub-#10%null%][GridJobWorker] Failed to execute job = [jobId=3Dbcc9f6fd351-cf8c5e00-c86f-4e58-b0ad-6754896baf34, ses=3DGridJobSes= sionImpl [ses=3DGridTaskSessionImpl [taskName=3Do.a.i.i.processors.cache.Gr= idCacheAdapter$LoadCacheClosure, dep=3DLocalDeployment [super=3DGridDeploym= ent [ts=3D1459742547098, depMode=3DSHARED, clsLdr=3Dsun.misc.Launcher$AppCl= assLoader@764c12b6, clsLdrId=3Da9c9f6fd351-cf8c5e00-c86f-4e58-b0ad-6754896b= af34, userVer=3D0, loc=3Dtrue, sampleClsName=3Djava.lang.String, pendingUnd= eploy=3Dfalse, undeployed=3Dfalse, usage=3D0]], taskClsName=3Do.a.i.i.proce= ssors.cache.GridCacheAdapter$LoadCacheClosure, sesId=3Dacc9f6fd351-cf8c5e00= -c86f-4e58-b0ad-6754896baf34, startTime=3D1459742557568, endTime=3D92233720= 36854775807, taskNodeId=3Dcf8c5e00-c86f-4e58-b0ad-6754896baf34, clsLdr=3Dsu= n.misc.Launcher$AppClassLoader@764c12b6, closed=3Dfalse, cpSpi=3Dnull, fail= Spi=3Dnull, loadSpi=3Dnull, usage=3D1, fullSup=3Dfalse, subjId=3Dcf8c5e00-c= 86f-4e58-b0ad-6754896baf34, mapFut=3DIgniteFuture [orig=3DGridFutureAdapter= [resFlag=3D0, res=3Dnull, startTime=3D1459742557584, endTime=3D0, ignoreIn= terrupts=3Dfalse, lsnr=3Dnull, state=3DINIT]]], jobId=3Dbcc9f6fd351-cf8c5e0= 0-c86f-4e58-b0ad-6754896baf34]]
class org.apache.ignite.IgniteExc= eption: class org.apache.ignite.IgniteException: 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.igni= te.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureP= rocessor.java:1792

Apache.Ignite.Core.C= ache.Store.CacheStoreException was unhandled
=C2=A0 HResult=3D-214623308= 8
=C2=A0 Message=3Dclass org.apache.ignite.IgniteException: <= b>Timeout expired.=C2=A0 The timeout period elapsed prior to completion of = the operation or the server is not responding.
=C2=A0 S= ource=3DApache.Ignite.Core
=C2=A0 StackTrace:
=C2=A0 = =C2=A0 =C2=A0 =C2=A0at Apache.Ignite.Core.Impl.Unmanaged.UnmanagedCallbacks= .Error(Void* target, Int32 errType, SByte* errClsChars, Int32 errClsCharsLe= n, SByte* errMsgChars, Int32 errMsgCharsLen, Void* errData, Int32 errDataLe= n)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at Apache.Ignite.Core.Impl.U= nmanaged.IgniteJniNativeMethods.TargetInStreamOutLong(Void* ctx, Void* targ= et, Int32 opType, Int64 memPtr)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at Apa= che.Ignite.Core.Impl.Unmanaged.UnmanagedUtils.TargetInStreamOutLong(IUnmana= gedTarget target, Int32 opType, Int64 memPtr)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0at Apache.Ignite.Core.Impl.PlatformTarget.DoOutOp(Int32 type, Act= ion`1 action)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at MyIgniteConsole.Progr= am.Main(String[] args) in C:\Data\Professional\dotnet\workspace\MyIgnite\My= IgniteConsole\Program.cs:line 29
=C2=A0 =C2=A0 =C2=A0 =C2= =A0at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[]= args)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.AppDomain.ExecuteAsse= mbly(String assemblyFile, Evidence assemblySecurity, String[] args)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at Microsoft.VisualStudio.HostingProcess.Host= Proc.RunUsersAssembly()
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.Thre= ading.ExecutionContext.RunInternal(ExecutionContext executionContext, Conte= xtCallback callback, Object state, Boolean preserveSyncCtx)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0at System.Threading.ExecutionContext.Run(ExecutionC= ontext executionContext, ContextCallback callback, Object state, Boolean pr= eserveSyncCtx)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.Threading.Exe= cutionContext.Run(ExecutionContext executionContext, ContextCallback callba= ck, Object state)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.Threading.= ThreadHelper.ThreadStart()
=C2=A0 InnerException:=C2=A0

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

In my s= tore implementation I have the following overide method:
=C2=A0public override void LoadCache(Action<object, object> act, p= arams 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 enti= ties.personDetails;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 // Iterate over whole underlying store and call act on each entry to lo= ad it into the cache.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f= oreach (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.personDetailID, entry);
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }


thanks in advance for your help...

Satya.

On Sat, Apr 2, 2016 at 11:49 AM, Murthy Kakarl= amudi <ksatya@gmail.com> wrote:
Hi,
=C2=A0 =C2=A0In my .NET application, I have a= n underlying SQL Server DB that I am planning to access using Ignite Persis= tence feature. I was following the StoreExample provided in the examples an= d created the ignite configuration accordingly.=C2=A0

<= div>
<property name=3D"cacheConfiguration">
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 <list>
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 <bean class=3D"org.apache.ignite.configuration.CacheConf= iguration">
=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"/>
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D"cacheStoreFactory"&= gt;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <bean cla= ss=3D"org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactor= y">
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 <property name=3D"typeName" value=3D"MyIgnite.SQLServ= erStore, 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 SQLSe= rverStore which is part of MyIgnite dll is as below. I am using EntityFrame= work as ORM to access underlying SQLServer.

c= lass SQLServerStore : CacheStoreAdapter
=C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 private TestEntities entities;
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 public SQLServerStore()
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 entitie= s =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"/> cal= l.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 /// </summary>
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 /// <param name=3D"act">Action tha= t loads a cache entry.</param>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = /// <param name=3D"args">Optional arguments.</param><= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 public override void LoadCache(Action= <object, object> act, params object[] args)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 var per= sonDetailsList =3D entities.PersonDetails;
=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=A0personDetailsLis= t)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 act(entry.personD, entry);=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }
}

Whwn I try to run the above, I am g= etting the below error.

Apache.Ignite.Core.Co= mmon.IgniteException was unhandled
=C2=A0 HResult=3D-2146233088
=C2=A0 Message=3DException has been thrown by the target of an invoca= tion.
=C2=A0 Source=3DApache.Ignite.Core
=C2=A0 StackTr= ace:
=C2=A0 =C2=A0 =C2=A0 =C2=A0at Apache.Ignite.Core.Impl.Unmana= ged.UnmanagedCallbacks.Error(Void* target, Int32 errType, SByte* errClsChar= s, Int32 errClsCharsLen, SByte* errMsgChars, Int32 errMsgCharsLen, Void* er= rData, Int32 errDataLen)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at Apache.Ign= ite.Core.Impl.Unmanaged.IgniteJniNativeMethods.IgnitionStart(Void* ctx, SBy= te* cfgPath, SByte* gridName, Int32 factoryId, Int64 dataPtr)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0at Apache.Ignite.Core.Impl.Unmanaged.UnmanagedUtils= .IgnitionStart(UnmanagedContext ctx, String cfgPath, String gridName, Boole= an clientMode)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at Apache.Ignite.Core.I= gnition.Start(IgniteConfiguration cfg)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0at MyIgniteConsole.Program.Main(String[] args) in C:\Data\Professional\d= otnet\workspace\MyIgnite\MyIgniteConsole\Program.cs:line 21
=C2= =A0 =C2=A0 =C2=A0 =C2=A0at System.AppDomain._nExecuteAssembly(RuntimeAssemb= ly assembly, String[] args)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.= AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, S= tring[] args)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at Microsoft.VisualStudi= o.HostingProcess.HostProc.RunUsersAssembly()
=C2=A0 =C2=A0 =C2=A0= =C2=A0at System.Threading.ExecutionContext.RunInternal(ExecutionContext ex= ecutionContext, ContextCallback callback, Object state, Boolean preserveSyn= cCtx)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at System.Threading.ExecutionCon= text.Run(ExecutionContext executionContext, ContextCallback callback, Objec= t state, Boolean preserveSyncCtx)
=C2=A0 =C2=A0 =C2=A0 =C2=A0at S= ystem.Threading.ExecutionContext.Run(ExecutionContext executionContext, Con= textCallback callback, Object state)
=C2=A0 =C2=A0 =C2=A0 =C2=A0a= t System.Threading.ThreadHelper.ThreadStart()
=C2=A0 InnerExcepti= on:=C2=A0


Any help would be a= ppreciated.

Thanks,
Satya.




--001a11352a4ecb27ef052fa758af--