You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by siva <si...@bizruntime.com> on 2020/01/17 06:49:44 UTC

Could not create .NET CacheStore

I am using .net core client and server Apache Ignite v2.7.6.

After started thick client node,from thick client trying to get cache

client code:
-------------
 public IIgnite StartIgniteClient()
{
	try
	{
		if (_IGNITE_CLIENT == null)
		{
			Ignition.ClientMode = true;
		   _IGNITE_CLIENT = Ignition.Start(GetIgniteConfiguration());
		}

	}
	catch (Exception ex)
	{
		throw;
	}
	
	return _IGNITE_CLIENT;
}

public IgniteConfiguration GetIgniteConfiguration()
        {
            IgniteConfiguration config = null;
            try
            {
                config = new IgniteConfiguration
                {

                    IgniteInstanceName = "EntityActorIgniteClientNode",

                    DiscoverySpi = new TcpDiscoverySpi
                    {
                        IpFinder = new TcpDiscoveryStaticIpFinder
                        {
                            Endpoints = _endPoints//new[] { "localhost"
}//127.0.0.1 or ip
                        },
                        SocketTimeout = TimeSpan.FromSeconds(3000)
                    },
                    DataStorageConfiguration = new
DataStorageConfiguration()
                    {
                        DefaultDataRegionConfiguration = new
DataRegionConfiguration()
                        {
                            Name = "IgniteDataRegion",
                            PersistenceEnabled = true
                        },
                        StoragePath = "C:\\client\\storage",
                        WalPath = "C:\\client\\wal",
                        WalArchivePath = "C:\\client\\walArchive"
                    },
                    WorkDirectory = "C:\\client\\work",
                    // Explicitly configure TCP communication SPI by
changing local port number for
                    // the nodes from the first cluster.
                    CommunicationSpi = new TcpCommunicationSpi()
                    {
                        LocalPort = 47100
                    },
                    PeerAssemblyLoadingMode =
Apache.Ignite.Core.Deployment.PeerAssemblyLoadingMode.CurrentAppDomain

                };
            }
            catch (Exception ex)
            {
                throw;
            }
            return config;
        }

		
*var cache = _IGNITE_CLIENT.GetCache<object, object>(cacheName);*//throwing
exception

*Exception*:
-----------
javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException:
Could not create .NET CacheStore
	at
org.apache.ignite.internal.processors.cache.GridCacheUtils.convertToCacheException(GridCacheUtils.java:1337)
	at org.apache.ignite.internal.IgniteKernal.cache(IgniteKernal.java:2905)
	at
org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.processInStreamOutObject(PlatformProcessorImpl.java:526)
	at
org.apache.ignite.internal.processors.platform.PlatformTargetProxyImpl.inStreamOutObject(PlatformTargetProxyImpl.java:79)
Caused by: class org.apache.ignite.IgniteCheckedException: Could not create
.NET CacheStore
	at
org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:409)
	at
org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:746)
	at
org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:324)
	at
org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
	at
org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
	at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1313)
	at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:2172)
	at
org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.processClientCacheStartRequests(CacheAffinitySharedManager.java:438)
	at
org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.processClientCachesChanges(CacheAffinitySharedManager.java:637)
	at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.processCustomExchangeTask(GridCacheProcessor.java:391)
	at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.processCustomTask(GridCachePartitionExchangeManager.java:2489)
	at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2634)
	at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2553)
	at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
	at java.lang.Thread.run(Thread.java:748)
Caused by: class org.apache.ignite.IgniteException: Could not resolve
unregistered type
IgnitePersistenceApp.CacheStoreFactory.TenantCacheStoreFactory
	at
org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.inLongOutLong(Native
Method)
	at
org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:65)
	at
org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:404)
	... 14 more



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Could not create .NET CacheStore

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

1. You don't need to add cache to every node's configuration. Once cache is
created in cluster, all client nodes can access it, regardless of whether
they have it in their configuration or not.
BUT
2. Yes, all nodes are going to instantiate every factory and store locally
before they can access this cache. We are planning to change that in future
releases, so that Cache Store is only started if it is needed.

Also, cache configuration will be discarded if cache exists in cluster,
this means, only the original cache settings will be used.

Regards,
-- 
Ilya Kasnacheev


пн, 20 янв. 2020 г. в 21:59, siva <si...@bizruntime.com>:

> Hi,
> Thanks for replaying with example.
> I have some query regarding cache store access and registering
> configuration.
> 1.Add or configure cache on evey client node on starting node or access
> cache time instead of,
> is there any other way like one time register cache configuration, after
> onward any client node can access cache configration?
> 2.Is that registering cache configuration on each node calling every
> factory
> and store implemented method or internally searching for existing cache
> configuration matches than override matching configuration.or something
> like
> that.
>
>
>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Could not create .NET CacheStore

Posted by siva <si...@bizruntime.com>.
Hi, 
Thanks for replaying with example.
I have some query regarding cache store access and registering
configuration.
1.Add or configure cache on evey client node on starting node or access
cache time instead of, 
is there any other way like one time register cache configuration, after
onward any client node can access cache configration? 
2.Is that registering cache configuration on each node calling every factory
and store implemented method or internally searching for existing cache
configuration matches than override matching configuration.or something like
that.








--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Could not create .NET CacheStore

Posted by Pavel Tupitsyn <pt...@apache.org>.
Yes, you can create a cache template in two ways:
* At startup: add IgniteConfiguration.CacheConfiguration where Name has an
asterisk in it, like 'cache-foo-*'
* After startup: Ignite.AddCacheConfiguration, same thing with `*` in the
Name

After that, when you call CreateCache<TK, TV>(string name), and the name
matches the template name,
settings from the template are applied:

ignite.CreateCache<int, string>("cache-foo-1")


On Sat, Jan 18, 2020 at 8:27 AM siva <si...@bizruntime.com> wrote:

> Hi,
>
> Thanks for reply.It's working fine now after added cache configuration and
> factory classes.
>
> so Is there any way like cache creation time create template and later for
> all other client can access same temple for the crossponding cache
> configuration?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Could not create .NET CacheStore

Posted by siva <si...@bizruntime.com>.
Hi,

Thanks for reply.It's working fine now after added cache configuration and
factory classes.

so Is there any way like cache creation time create template and later for
all other client can access same temple for the crossponding cache
configuration?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Could not create .NET CacheStore

Posted by Pavel Tupitsyn <pt...@apache.org>.
Looks like the class is not present on client node:
IgnitePersistenceApp.CacheStoreFactory.TenantCacheStoreFactory

Even though client node does not store cache data, it still requires cache
store class to be present.

On Fri, Jan 17, 2020 at 4:55 PM siva <si...@bizruntime.com> wrote:

> Hi,
> *Configuration in window system*:
> ------------------------------------------------
> 1.JAVA_HOME V1.8
> 2.IGNITE_HOME V2.6.0
> 3..Net Core V2.2
>
> here i observe behavior about the above exception....
>
> 1.In .net core console app with xml configuration working,but with new
> IgniteConfiguration(){} object not working.
>
> 2.In .Net Core Azure Service Fabric Stateless Application
>    -both way not working,on start thick client with client-config.xml file
> or new IgniteConfiguration(){}
>
> getting same issue "Could not create .NET CacheStore" on
> cache.GetCache<string,object>(stringCacheName);
>
> i am stuck here.i am missing any configuration or settings?
>
> Please any help appriciated.
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Could not create .NET CacheStore

Posted by siva <si...@bizruntime.com>.
Hi,
*Configuration in window system*:
------------------------------------------------
1.JAVA_HOME V1.8
2.IGNITE_HOME V2.6.0
3..Net Core V2.2

here i observe behavior about the above exception....

1.In .net core console app with xml configuration working,but with new
IgniteConfiguration(){} object not working.

2.In .Net Core Azure Service Fabric Stateless Application
   -both way not working,on start thick client with client-config.xml file
or new IgniteConfiguration(){}

getting same issue "Could not create .NET CacheStore" on
cache.GetCache<string,object>(stringCacheName);

i am stuck here.i am missing any configuration or settings?

Please any help appriciated.





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/