Failed to find mapping description

classic Classic list List threaded Threaded
14 messages Options
krishnangc krishnangc
Reply | Threaded
Open this post in threaded view
|

Failed to find mapping description


Hi,

Trying to load the entire table to cache. Getting the following error.

bob.loadCache(null,"java.lang.String","select * from EXCEPTION_MASTER where EXCEPTION_ID='37471' ");}
bob.loadCache(null);


Tried both but getting the same error. What mistake am I doing.

Thanks in advance

Krishna

start ignite
[13:30:28]    __________  ________________
[13:30:28]   /  _/ ___/ |/ /  _/_  __/ __/
[13:30:28]  _/ // (7 7    // /  / / / _/  
[13:30:28] /___/\___/_/|_/___/ /_/ /___/  
[13:30:28]
[13:30:28] ver. 1.3.0-incubating#20150710-sha1:2ade6d00
[13:30:28] 2015 Copyright(C) Apache Software Foundation
[13:30:28]
[13:30:28] Ignite documentation: http://ignite.incubator.apache.org
[13:30:28]
[13:30:28] Quiet mode.
[13:30:28]   ^-- Logging to file '/home/hadoop/Downloads/apache-ignite-fabric-1.2.0-incubating-bin/work/log/ignite-9fc3b00d.log'
[13:30:28]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or "-v" to ignite.{sh|bat}
[13:30:28]
[13:30:28] Initial heap size is 89MB (should be no less than 512MB, use -Xms512m -Xmx512m).
[13:30:28] Configured plugins:
[13:30:28]   ^-- None
[13:30:28]
oracle.jdbc.pool.OracleDataSource@726b5b3c
the datasource is created
[13:30:30] Performance suggestions for grid  (fix if possible)
[13:30:30] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[13:30:30]   ^-- Enable ATOMIC mode if not using transactions (set 'atomicityMode' to ATOMIC)
[13:30:30]   ^-- Enable write-behind to persistent store (set 'writeBehindEnabled' to true)
[13:30:30]
[13:30:30] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
[13:30:30]
[13:30:30] Ignite node started OK (id=9fc3b00d)
[13:30:30] Topology snapshot [ver=1, server nodes=1, client nodes=0, CPUs=8, heap=1.3GB]
started ignite
load cache
loading cache
[13:30:30,555][ERROR][ignite-#8%pub-null%][GridJobWorker] Failed to execute job [jobId=1455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270, ses=GridJobSessionImpl [ses=GridTaskSessionImpl [taskName=o.a.i.i.processors.cache.GridCacheAdapter$LoadCacheClosure, dep=LocalDeployment [super=GridDeployment [ts=1438070428955, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@3479404a, clsLdrId=b155da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270, userVer=0, loc=true, sampleClsName=java.lang.String, pendingUndeploy=false, undeployed=false, usage=0]], taskClsName=o.a.i.i.processors.cache.GridCacheAdapter$LoadCacheClosure, sesId=0455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270, startTime=1438070430512, endTime=9223372036854775807, taskNodeId=9fc3b00d-a21a-4b1d-8965-b16cb8197270, clsLdr=sun.misc.Launcher$AppClassLoader@3479404a, closed=false, cpSpi=null, failSpi=null, loadSpi=null, usage=1, fullSup=false, subjId=9fc3b00d-a21a-4b1d-8965-b16cb8197270, mapFut=IgniteFuture [orig=GridFutureAdapter [resFlag=0, res=null, startTime=1438070430523, endTime=0, ignoreInterrupts=false, lsnr=null, state=INIT]]], jobId=1455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270]]
class org.apache.ignite.IgniteException: javax.cache.CacheException: Failed to find mapping description [key=java.lang.String, cache=AlgoCache]
        at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1711)
        at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:482)
        at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6145)
        at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:476)
        at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:429)
        at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: javax.cache.integration.CacheLoaderException: javax.cache.CacheException: Failed to find mapping description [key=java.lang.String, cache=AlgoCache]
        at org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:482)
        at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.localLoadCache(GridDhtCacheAdapter.java:419)
        at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.localLoadCache(IgniteCacheProxy.java:333)
        at org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5375)
        at org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5322)
        at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1708)
        ... 8 more
Caused by: javax.cache.CacheException: Failed to find mapping description [key=java.lang.String, cache=AlgoCache]
        at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.entryMapping(CacheAbstractJdbcStore.java:611)
        at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.loadCache(CacheAbstractJdbcStore.java:641)
        at org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:456)
        ... 13 more
[13:30:30,561][ERROR][ignite-#8%pub-null%][GridTaskWorker] Failed to obtain remote job result policy for result from ComputeTask.result(..) method (will fail the whole task): GridJobResultImpl [job=C2 [], sib=GridJobSiblingImpl [sesId=0455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270, jobId=1455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270, nodeId=9fc3b00d-a21a-4b1d-8965-b16cb8197270, isJobDone=false], jobCtx=GridJobContextImpl [jobId=1455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270, timeoutObj=null, attrs={}], node=TcpDiscoveryNode [id=9fc3b00d-a21a-4b1d-8965-b16cb8197270, addrs=[0:0:0:0:0:0:0:1%1, 127.0.0.1, 192.168.1.55], sockAddrs=[/192.168.1.55:47500, /0:0:0:0:0:0:0:1%1:47500, /127.0.0.1:47500, /192.168.1.55:47500], discPort=47500, order=1, intOrder=1, loc=true, ver=1.3.0#20150710-sha1:2ade6d00, isClient=false], ex=class o.a.i.IgniteException: javax.cache.CacheException: Failed to find mapping description [key=java.lang.String, cache=AlgoCache], hasRes=true, isCancelled=false, isOccupied=true]
class org.apache.ignite.IgniteException: Remote job threw user exception (override or implement ComputeTask.result(..) method if you would like to have automatic failover for this exception).
        at org.apache.ignite.compute.ComputeTaskAdapter.result(ComputeTaskAdapter.java:102)
        at org.apache.ignite.internal.processors.task.GridTaskWorker$3.apply(GridTaskWorker.java:834)
        at org.apache.ignite.internal.processors.task.GridTaskWorker$3.apply(GridTaskWorker.java:827)
        at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6177)
        at org.apache.ignite.internal.processors.task.GridTaskWorker.result(GridTaskWorker.java:827)
        at org.apache.ignite.internal.processors.task.GridTaskWorker.onResponse(GridTaskWorker.java:723)
        at org.apache.ignite.internal.processors.task.GridTaskProcessor.processJobExecuteResponse(GridTaskProcessor.java:932)
        at org.apache.ignite.internal.processors.job.GridJobWorker.finishJob(GridJobWorker.java:747)
        at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:534)
        at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:429)
        at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: class org.apache.ignite.IgniteException: javax.cache.CacheException: Failed to find mapping description [key=java.lang.String, cache=AlgoCache]
        at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1711)
        at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:482)
        at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6145)
        at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:476)
        ... 5 more
Caused by: javax.cache.integration.CacheLoaderException: javax.cache.CacheException: Failed to find mapping description [key=java.lang.String, cache=AlgoCache]
        at org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:482)
        at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.localLoadCache(GridDhtCacheAdapter.java:419)
        at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.localLoadCache(IgniteCacheProxy.java:333)
        at org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5375)
        at org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5322)
        at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1708)
        ... 8 more
Caused by: javax.cache.CacheException: Failed to find mapping description [key=java.lang.String, cache=AlgoCache]
        at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.entryMapping(CacheAbstractJdbcStore.java:611)
        at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.loadCache(CacheAbstractJdbcStore.java:641)
        at org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:456)
        ... 13 more
loaded cache
Alexey Kuznetsov Alexey Kuznetsov
Reply | Threaded
Open this post in threaded view
|

Re: Failed to find mapping description

Krishna,

It seems that you not properly configured your AlgoCache cache type metadata.
You need to configure Cache Type Metadata to associate AlgoCache and JdbcPojoStore.

In short your need to specify: db schema name, db table, key type (full class name), value type (full class name) , collection of db-to-java key fields mappings, collection of db-to-java value fields mappings.
It could be done from XML or code.

 
Let me know if you have more questions.

On Tue, Jul 28, 2015 at 2:59 PM, krishnangc <[hidden email]> wrote:

Hi,

Trying to load the entire table to cache. Getting the following error.

bob.loadCache(null,"java.lang.String","select * from EXCEPTION_MASTER where
EXCEPTION_ID='37471' ");}
bob.loadCache(null);


Tried both but getting the same error. What mistake am I doing.

Thanks in advance

Krishna

start ignite
[13:30:28]    __________  ________________
[13:30:28]   /  _/ ___/ |/ /  _/_  __/ __/
[13:30:28]  _/ // (7 7    // /  / / / _/
[13:30:28] /___/\___/_/|_/___/ /_/ /___/
[13:30:28]
[13:30:28] ver. 1.3.0-incubating#20150710-sha1:2ade6d00
[13:30:28] 2015 Copyright(C) Apache Software Foundation
[13:30:28]
[13:30:28] Ignite documentation: http://ignite.incubator.apache.org
[13:30:28]
[13:30:28] Quiet mode.
[13:30:28]   ^-- Logging to file
'/home/hadoop/Downloads/apache-ignite-fabric-1.2.0-incubating-bin/work/log/ignite-9fc3b00d.log'
[13:30:28]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false
or "-v" to ignite.{sh|bat}
[13:30:28]
[13:30:28] Initial heap size is 89MB (should be no less than 512MB, use
-Xms512m -Xmx512m).
[13:30:28] Configured plugins:
[13:30:28]   ^-- None
[13:30:28]
oracle.jdbc.pool.OracleDataSource@726b5b3c
the datasource is created
[13:30:30] Performance suggestions for grid  (fix if possible)
[13:30:30] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[13:30:30]   ^-- Enable ATOMIC mode if not using transactions (set
'atomicityMode' to ATOMIC)
[13:30:30]   ^-- Enable write-behind to persistent store (set
'writeBehindEnabled' to true)
[13:30:30]
[13:30:30] To start Console Management & Monitoring run
ignitevisorcmd.{sh|bat}
[13:30:30]
[13:30:30] Ignite node started OK (id=9fc3b00d)
[13:30:30] Topology snapshot [ver=1, server nodes=1, client nodes=0, CPUs=8,
heap=1.3GB]
started ignite
load cache
loading cache
[13:30:30,555][ERROR][ignite-#8%pub-null%][GridJobWorker] Failed to execute
job [jobId=1455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270,
ses=GridJobSessionImpl [ses=GridTaskSessionImpl
[taskName=o.a.i.i.processors.cache.GridCacheAdapter$LoadCacheClosure,
dep=LocalDeployment [super=GridDeployment [ts=1438070428955, depMode=SHARED,
clsLdr=sun.misc.Launcher$AppClassLoader@3479404a,
clsLdrId=b155da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270, userVer=0,
loc=true, sampleClsName=java.lang.String, pendingUndeploy=false,
undeployed=false, usage=0]],
taskClsName=o.a.i.i.processors.cache.GridCacheAdapter$LoadCacheClosure,
sesId=0455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270,
startTime=1438070430512, endTime=9223372036854775807,
taskNodeId=9fc3b00d-a21a-4b1d-8965-b16cb8197270,
clsLdr=sun.misc.Launcher$AppClassLoader@3479404a, closed=false, cpSpi=null,
failSpi=null, loadSpi=null, usage=1, fullSup=false,
subjId=9fc3b00d-a21a-4b1d-8965-b16cb8197270, mapFut=IgniteFuture
[orig=GridFutureAdapter [resFlag=0, res=null, startTime=1438070430523,
endTime=0, ignoreInterrupts=false, lsnr=null, state=INIT]]],
jobId=1455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270]]
class org.apache.ignite.IgniteException: javax.cache.CacheException: Failed
to find mapping description [key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1711)
        at
org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:482)
        at
org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6145)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:476)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:429)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: javax.cache.integration.CacheLoaderException:
javax.cache.CacheException: Failed to find mapping description
[key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:482)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.localLoadCache(GridDhtCacheAdapter.java:419)
        at
org.apache.ignite.internal.processors.cache.IgniteCacheProxy.localLoadCache(IgniteCacheProxy.java:333)
        at
org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5375)
        at
org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5322)
        at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1708)
        ... 8 more
Caused by: javax.cache.CacheException: Failed to find mapping description
[key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.entryMapping(CacheAbstractJdbcStore.java:611)
        at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.loadCache(CacheAbstractJdbcStore.java:641)
        at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:456)
        ... 13 more
[13:30:30,561][ERROR][ignite-#8%pub-null%][GridTaskWorker] Failed to obtain
remote job result policy for result from ComputeTask.result(..) method (will
fail the whole task): GridJobResultImpl [job=C2 [], sib=GridJobSiblingImpl
[sesId=0455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270,
jobId=1455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270,
nodeId=9fc3b00d-a21a-4b1d-8965-b16cb8197270, isJobDone=false],
jobCtx=GridJobContextImpl
[jobId=1455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270, timeoutObj=null,
attrs={}], node=TcpDiscoveryNode [id=9fc3b00d-a21a-4b1d-8965-b16cb8197270,
addrs=[0:0:0:0:0:0:0:1%1, 127.0.0.1, 192.168.1.55],
sockAddrs=[/192.168.1.55:47500, /0:0:0:0:0:0:0:1%1:47500, /127.0.0.1:47500,
/192.168.1.55:47500], discPort=47500, order=1, intOrder=1, loc=true,
ver=1.3.0#20150710-sha1:2ade6d00, isClient=false], ex=class
o.a.i.IgniteException: javax.cache.CacheException: Failed to find mapping
description [key=java.lang.String, cache=AlgoCache], hasRes=true,
isCancelled=false, isOccupied=true]
class org.apache.ignite.IgniteException: Remote job threw user exception
(override or implement ComputeTask.result(..) method if you would like to
have automatic failover for this exception).
        at
org.apache.ignite.compute.ComputeTaskAdapter.result(ComputeTaskAdapter.java:102)
        at
org.apache.ignite.internal.processors.task.GridTaskWorker$3.apply(GridTaskWorker.java:834)
        at
org.apache.ignite.internal.processors.task.GridTaskWorker$3.apply(GridTaskWorker.java:827)
        at
org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6177)
        at
org.apache.ignite.internal.processors.task.GridTaskWorker.result(GridTaskWorker.java:827)
        at
org.apache.ignite.internal.processors.task.GridTaskWorker.onResponse(GridTaskWorker.java:723)
        at
org.apache.ignite.internal.processors.task.GridTaskProcessor.processJobExecuteResponse(GridTaskProcessor.java:932)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.finishJob(GridJobWorker.java:747)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:534)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:429)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: class org.apache.ignite.IgniteException:
javax.cache.CacheException: Failed to find mapping description
[key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1711)
        at
org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:482)
        at
org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6145)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:476)
        ... 5 more
Caused by: javax.cache.integration.CacheLoaderException:
javax.cache.CacheException: Failed to find mapping description
[key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:482)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.localLoadCache(GridDhtCacheAdapter.java:419)
        at
org.apache.ignite.internal.processors.cache.IgniteCacheProxy.localLoadCache(IgniteCacheProxy.java:333)
        at
org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5375)
        at
org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5322)
        at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1708)
        ... 8 more
Caused by: javax.cache.CacheException: Failed to find mapping description
[key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.entryMapping(CacheAbstractJdbcStore.java:611)
        at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.loadCache(CacheAbstractJdbcStore.java:641)
        at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:456)
        ... 13 more
loaded cache




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Failed-to-find-mapping-description-tp725.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.



--
Alexey Kuznetsov
GridGain Systems
www.gridgain.com
dsetrakyan dsetrakyan
Reply | Threaded
Open this post in threaded view
|

Re: Failed to find mapping description

As a side note, I would also fix the error message in Ignite to provide a better explanation to users. 

For example, the message could say:
----
Failed to find mapping description [key=java.lang.String, cache=AlgoCache]. Please configure CacheTypeMetadata to associate 'AlgoCache' with JdbcPojoStore.
----

Alexey, can you file a ticket or, better yet, just fix it in code?

D.

On Tue, Jul 28, 2015 at 1:23 AM, Alexey Kuznetsov <[hidden email]> wrote:
Krishna,

It seems that you not properly configured your AlgoCache cache type metadata.
You need to configure Cache Type Metadata to associate AlgoCache and JdbcPojoStore.

In short your need to specify: db schema name, db table, key type (full class name), value type (full class name) , collection of db-to-java key fields mappings, collection of db-to-java value fields mappings.
It could be done from XML or code.

 
Let me know if you have more questions.

On Tue, Jul 28, 2015 at 2:59 PM, krishnangc <[hidden email]> wrote:

Hi,

Trying to load the entire table to cache. Getting the following error.

bob.loadCache(null,"java.lang.String","select * from EXCEPTION_MASTER where
EXCEPTION_ID='37471' ");}
bob.loadCache(null);


Tried both but getting the same error. What mistake am I doing.

Thanks in advance

Krishna

start ignite
[13:30:28]    __________  ________________
[13:30:28]   /  _/ ___/ |/ /  _/_  __/ __/
[13:30:28]  _/ // (7 7    // /  / / / _/
[13:30:28] /___/\___/_/|_/___/ /_/ /___/
[13:30:28]
[13:30:28] ver. 1.3.0-incubating#20150710-sha1:2ade6d00
[13:30:28] 2015 Copyright(C) Apache Software Foundation
[13:30:28]
[13:30:28] Ignite documentation: http://ignite.incubator.apache.org
[13:30:28]
[13:30:28] Quiet mode.
[13:30:28]   ^-- Logging to file
'/home/hadoop/Downloads/apache-ignite-fabric-1.2.0-incubating-bin/work/log/ignite-9fc3b00d.log'
[13:30:28]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false
or "-v" to ignite.{sh|bat}
[13:30:28]
[13:30:28] Initial heap size is 89MB (should be no less than 512MB, use
-Xms512m -Xmx512m).
[13:30:28] Configured plugins:
[13:30:28]   ^-- None
[13:30:28]
oracle.jdbc.pool.OracleDataSource@726b5b3c
the datasource is created
[13:30:30] Performance suggestions for grid  (fix if possible)
[13:30:30] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[13:30:30]   ^-- Enable ATOMIC mode if not using transactions (set
'atomicityMode' to ATOMIC)
[13:30:30]   ^-- Enable write-behind to persistent store (set
'writeBehindEnabled' to true)
[13:30:30]
[13:30:30] To start Console Management & Monitoring run
ignitevisorcmd.{sh|bat}
[13:30:30]
[13:30:30] Ignite node started OK (id=9fc3b00d)
[13:30:30] Topology snapshot [ver=1, server nodes=1, client nodes=0, CPUs=8,
heap=1.3GB]
started ignite
load cache
loading cache
[13:30:30,555][ERROR][ignite-#8%pub-null%][GridJobWorker] Failed to execute
job [jobId=1455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270,
ses=GridJobSessionImpl [ses=GridTaskSessionImpl
[taskName=o.a.i.i.processors.cache.GridCacheAdapter$LoadCacheClosure,
dep=LocalDeployment [super=GridDeployment [ts=1438070428955, depMode=SHARED,
clsLdr=sun.misc.Launcher$AppClassLoader@3479404a,
clsLdrId=b155da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270, userVer=0,
loc=true, sampleClsName=java.lang.String, pendingUndeploy=false,
undeployed=false, usage=0]],
taskClsName=o.a.i.i.processors.cache.GridCacheAdapter$LoadCacheClosure,
sesId=0455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270,
startTime=1438070430512, endTime=9223372036854775807,
taskNodeId=9fc3b00d-a21a-4b1d-8965-b16cb8197270,
clsLdr=sun.misc.Launcher$AppClassLoader@3479404a, closed=false, cpSpi=null,
failSpi=null, loadSpi=null, usage=1, fullSup=false,
subjId=9fc3b00d-a21a-4b1d-8965-b16cb8197270, mapFut=IgniteFuture
[orig=GridFutureAdapter [resFlag=0, res=null, startTime=1438070430523,
endTime=0, ignoreInterrupts=false, lsnr=null, state=INIT]]],
jobId=1455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270]]
class org.apache.ignite.IgniteException: javax.cache.CacheException: Failed
to find mapping description [key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1711)
        at
org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:482)
        at
org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6145)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:476)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:429)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: javax.cache.integration.CacheLoaderException:
javax.cache.CacheException: Failed to find mapping description
[key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:482)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.localLoadCache(GridDhtCacheAdapter.java:419)
        at
org.apache.ignite.internal.processors.cache.IgniteCacheProxy.localLoadCache(IgniteCacheProxy.java:333)
        at
org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5375)
        at
org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5322)
        at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1708)
        ... 8 more
Caused by: javax.cache.CacheException: Failed to find mapping description
[key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.entryMapping(CacheAbstractJdbcStore.java:611)
        at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.loadCache(CacheAbstractJdbcStore.java:641)
        at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:456)
        ... 13 more
[13:30:30,561][ERROR][ignite-#8%pub-null%][GridTaskWorker] Failed to obtain
remote job result policy for result from ComputeTask.result(..) method (will
fail the whole task): GridJobResultImpl [job=C2 [], sib=GridJobSiblingImpl
[sesId=0455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270,
jobId=1455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270,
nodeId=9fc3b00d-a21a-4b1d-8965-b16cb8197270, isJobDone=false],
jobCtx=GridJobContextImpl
[jobId=1455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270, timeoutObj=null,
attrs={}], node=TcpDiscoveryNode [id=9fc3b00d-a21a-4b1d-8965-b16cb8197270,
addrs=[0:0:0:0:0:0:0:1%1, 127.0.0.1, 192.168.1.55],
sockAddrs=[/192.168.1.55:47500, /0:0:0:0:0:0:0:1%1:47500, /127.0.0.1:47500,
/192.168.1.55:47500], discPort=47500, order=1, intOrder=1, loc=true,
ver=1.3.0#20150710-sha1:2ade6d00, isClient=false], ex=class
o.a.i.IgniteException: javax.cache.CacheException: Failed to find mapping
description [key=java.lang.String, cache=AlgoCache], hasRes=true,
isCancelled=false, isOccupied=true]
class org.apache.ignite.IgniteException: Remote job threw user exception
(override or implement ComputeTask.result(..) method if you would like to
have automatic failover for this exception).
        at
org.apache.ignite.compute.ComputeTaskAdapter.result(ComputeTaskAdapter.java:102)
        at
org.apache.ignite.internal.processors.task.GridTaskWorker$3.apply(GridTaskWorker.java:834)
        at
org.apache.ignite.internal.processors.task.GridTaskWorker$3.apply(GridTaskWorker.java:827)
        at
org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6177)
        at
org.apache.ignite.internal.processors.task.GridTaskWorker.result(GridTaskWorker.java:827)
        at
org.apache.ignite.internal.processors.task.GridTaskWorker.onResponse(GridTaskWorker.java:723)
        at
org.apache.ignite.internal.processors.task.GridTaskProcessor.processJobExecuteResponse(GridTaskProcessor.java:932)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.finishJob(GridJobWorker.java:747)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:534)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:429)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: class org.apache.ignite.IgniteException:
javax.cache.CacheException: Failed to find mapping description
[key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1711)
        at
org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:482)
        at
org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6145)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:476)
        ... 5 more
Caused by: javax.cache.integration.CacheLoaderException:
javax.cache.CacheException: Failed to find mapping description
[key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:482)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.localLoadCache(GridDhtCacheAdapter.java:419)
        at
org.apache.ignite.internal.processors.cache.IgniteCacheProxy.localLoadCache(IgniteCacheProxy.java:333)
        at
org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5375)
        at
org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5322)
        at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1708)
        ... 8 more
Caused by: javax.cache.CacheException: Failed to find mapping description
[key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.entryMapping(CacheAbstractJdbcStore.java:611)
        at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.loadCache(CacheAbstractJdbcStore.java:641)
        at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:456)
        ... 13 more
loaded cache




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Failed-to-find-mapping-description-tp725.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.



--
Alexey Kuznetsov
GridGain Systems
www.gridgain.com

krishnangc krishnangc
Reply | Threaded
Open this post in threaded view
|

Re: Failed to find mapping description

In reply to this post by Alexey Kuznetsov
Hi Alexey,

Thanks for the quick response. I generated the Config file using the Ignite Schema Import Utility. Please find the code below.
 public static <K, V> CacheConfiguration<K, V> cache(String name, Factory<CacheStore<K, V>> storeFactory) {
        if (storeFactory == null)
             throw new IllegalArgumentException("Cache store factory cannot be null.");

        CacheConfiguration<K, V> ccfg = new CacheConfiguration<>(name);

        ccfg.setCacheStoreFactory(storeFactory);
        ccfg.setReadThrough(true);
        ccfg.setWriteThrough(true);

        // Configure cache types.
        Collection<CacheTypeMetadata> meta = new ArrayList<>();

        // EXCEPTION_MASTER.
        CacheTypeMetadata type = new CacheTypeMetadata();

        meta.add(type);

        type.setDatabaseSchema("ALGORECONUTIL_DEV");
        type.setDatabaseTable("EXCEPTION_MASTER");
        type.setKeyType(ExceptionMasterKey.class.getName());
        type.setValueType(ExceptionMaster.class.getName());

        // Key fields for EXCEPTION_MASTER.
        Collection<CacheTypeFieldMetadata> keys = new ArrayList<>();
        keys.add(new CacheTypeFieldMetadata("EXCEPTION_OID", Types.NUMERIC, "exceptionOid", java.math.BigDecimal.class));
       
        type.setKeyFields(keys);

        // Value fields for EXCEPTION_MASTER.
        Collection<CacheTypeFieldMetadata> vals = new ArrayList<>();
        vals.add(new CacheTypeFieldMetadata("EXCEPTION_ID", Types.VARCHAR, "exceptionId", String.class));
       
        vals.add(new CacheTypeFieldMetadata("EXCEPTION_CREATED_DATE", Types.DATE, "exceptionCreatedDate", java.sql.Date.class));
       
        vals.add(new CacheTypeFieldMetadata("EXCEPTION_PROCESSING_DATE", Types.DATE, "exceptionProcessingDate", java.sql.Date.class));
       
        vals.add(new CacheTypeFieldMetadata("EXCEPTION_COMPLETION_DATE", Types.DATE, "exceptionCompletionDate", java.sql.Date.class));
       
        vals.add(new CacheTypeFieldMetadata("EXCEPTION_PRIORITY", Types.VARCHAR, "exceptionPriority", String.class));
       
        vals.add(new CacheTypeFieldMetadata("EXCEPTION_SEVERITY", Types.VARCHAR, "exceptionSeverity", String.class));
       
        vals.add(new CacheTypeFieldMetadata("GEOGRAPHY_ID", Types.NUMERIC, "geographyId", java.math.BigDecimal.class));
       
        vals.add(new CacheTypeFieldMetadata("COUNTRY_ID", Types.INTEGER, "countryId", Integer.class));
       
        vals.add(new CacheTypeFieldMetadata("BRANCH_ID", Types.INTEGER, "branchId", Integer.class));
       
        vals.add(new CacheTypeFieldMetadata("L1L2STATUS", Types.VARCHAR, "l1l2status", String.class));
       
        vals.add(new CacheTypeFieldMetadata("SERVICE_LEVEL", Types.VARCHAR, "serviceLevel", String.class));
       
        vals.add(new CacheTypeFieldMetadata("RECONCILIATION_TYPE", Types.VARCHAR, "reconciliationType", String.class));
       
        vals.add(new CacheTypeFieldMetadata("UPDATED_BY", Types.VARCHAR, "updatedBy", String.class));
       
        vals.add(new CacheTypeFieldMetadata("UPDATED_DATE", Types.OTHER, "updatedDate", Object.class));
       
        vals.add(new CacheTypeFieldMetadata("SESSION_ID", Types.VARCHAR, "sessionId", String.class));
       
        vals.add(new CacheTypeFieldMetadata("RECORD_END_DATE", Types.OTHER, "recordEndDate", Object.class));
       
        vals.add(new CacheTypeFieldMetadata("RECORD_STATUS", Types.VARCHAR, "recordStatus", String.class));
       
        vals.add(new CacheTypeFieldMetadata("CREATED_DATE", Types.OTHER, "createdDate", Object.class));
       
        vals.add(new CacheTypeFieldMetadata("EXCEPTION_CATEGORY", Types.VARCHAR, "exceptionCategory", String.class));
       
        vals.add(new CacheTypeFieldMetadata("EXCEPTION_DESCRIPTION", Types.VARCHAR, "exceptionDescription", String.class));
       
        vals.add(new CacheTypeFieldMetadata("EXCEPTION_OID", Types.NUMERIC, "exceptionOid", java.math.BigDecimal.class));
       
        vals.add(new CacheTypeFieldMetadata("EXCEPTION_STATUS", Types.VARCHAR, "exceptionStatus", String.class));
       
        vals.add(new CacheTypeFieldMetadata("EXCEPTION_TYPE_ID", Types.NUMERIC, "exceptionTypeId", java.math.BigDecimal.class));
       
        vals.add(new CacheTypeFieldMetadata("FUNCTIONAL_AREA_ID", Types.NUMERIC, "functionalAreaId", java.math.BigDecimal.class));
       
        vals.add(new CacheTypeFieldMetadata("IPADDRESS", Types.VARCHAR, "ipaddress", String.class));
       
        vals.add(new CacheTypeFieldMetadata("PRODUCTLINE_ID", Types.NUMERIC, "productlineId", java.math.BigDecimal.class));
       
        vals.add(new CacheTypeFieldMetadata("RECON_ID", Types.VARCHAR, "reconId", String.class));
       
        vals.add(new CacheTypeFieldMetadata("RECORD_VERSION", Types.INTEGER, "recordVersion", int.class));
       
        vals.add(new CacheTypeFieldMetadata("CREATED_BY", Types.VARCHAR, "createdBy", String.class));
       
        vals.add(new CacheTypeFieldMetadata("LINK_ID", Types.NUMERIC, "linkId", java.math.BigDecimal.class));
       
        vals.add(new CacheTypeFieldMetadata("BUSINESS_CONTEXT_ID", Types.VARCHAR, "businessContextId", String.class));
       
        vals.add(new CacheTypeFieldMetadata("RECON_EXECUTION_ID", Types.NUMERIC, "reconExecutionId", java.math.BigDecimal.class));
       
        vals.add(new CacheTypeFieldMetadata("BUSINESS_PROCESS_ID", Types.VARCHAR, "businessProcessId", String.class));
       
        vals.add(new CacheTypeFieldMetadata("MANUAL_ENTRY_FLAG", Types.VARCHAR, "manualEntryFlag", String.class));
       
        vals.add(new CacheTypeFieldMetadata("PROCESSING_TYPE", Types.VARCHAR, "processingType", String.class));
       
        vals.add(new CacheTypeFieldMetadata("ASSET_CLASS_ID", Types.VARCHAR, "assetClassId", String.class));
       
        vals.add(new CacheTypeFieldMetadata("TRADE_DATE", Types.DATE, "tradeDate", java.sql.Date.class));
       
        vals.add(new CacheTypeFieldMetadata("PARENT_EXCEPTION_ID", Types.VARCHAR, "parentExceptionId", String.class));
       
        vals.add(new CacheTypeFieldMetadata("MERGED_EXCEPTION_ID", Types.VARCHAR, "mergedExceptionId", String.class));
       
        vals.add(new CacheTypeFieldMetadata("GROUPED_EXCEPTION_ID", Types.VARCHAR, "groupedExceptionId", String.class));
       
        vals.add(new CacheTypeFieldMetadata("EXCEPTION_GROUP_INDICATOR", Types.VARCHAR, "exceptionGroupIndicator", String.class));
       
        vals.add(new CacheTypeFieldMetadata("TOTAL_OUTSTANDING_AMOUNT", Types.FLOAT, "totalOutstandingAmount", Double.class));
       
        vals.add(new CacheTypeFieldMetadata("CLEARING_DATE", Types.DATE, "clearingDate", java.sql.Date.class));
       
        vals.add(new CacheTypeFieldMetadata("REASON_CODE", Types.VARCHAR, "reasonCode", String.class));
       
        vals.add(new CacheTypeFieldMetadata("COMMENTS", Types.VARCHAR, "comments", String.class));
       
        vals.add(new CacheTypeFieldMetadata("EXCEPTION_AUTHORIZATION_STATUS", Types.VARCHAR, "exceptionAuthorizationStatus", String.class));
       
        vals.add(new CacheTypeFieldMetadata("SUSPENSE_ENTRY_FLAG", Types.VARCHAR, "suspenseEntryFlag", String.class));
       
        type.setValueFields(vals);

        // Query fields for EXCEPTION_MASTER.
        Map<String, Class<?>> qryFlds = new LinkedHashMap<>();

        qryFlds.put("exceptionId", String.class);
       
        qryFlds.put("exceptionCreatedDate", java.sql.Date.class);
       
        qryFlds.put("exceptionProcessingDate", java.sql.Date.class);
       
        qryFlds.put("exceptionCompletionDate", java.sql.Date.class);
       
        qryFlds.put("exceptionPriority", String.class);
       
        qryFlds.put("exceptionSeverity", String.class);
       
        qryFlds.put("geographyId", java.math.BigDecimal.class);
       
        qryFlds.put("countryId", Integer.class);
       
        qryFlds.put("branchId", Integer.class);
       
        qryFlds.put("l1l2status", String.class);
       
        qryFlds.put("serviceLevel", String.class);
       
        qryFlds.put("reconciliationType", String.class);
       
        qryFlds.put("updatedBy", String.class);
       
        qryFlds.put("updatedDate", Object.class);
       
        qryFlds.put("sessionId", String.class);
       
        qryFlds.put("recordEndDate", Object.class);
       
        qryFlds.put("recordStatus", String.class);
       
        qryFlds.put("createdDate", Object.class);
       
        qryFlds.put("exceptionCategory", String.class);
       
        qryFlds.put("exceptionDescription", String.class);
       
        qryFlds.put("exceptionOid", java.math.BigDecimal.class);
       
        qryFlds.put("exceptionStatus", String.class);
       
        qryFlds.put("exceptionTypeId", java.math.BigDecimal.class);
       
        qryFlds.put("functionalAreaId", java.math.BigDecimal.class);
       
        qryFlds.put("ipaddress", String.class);
       
        qryFlds.put("productlineId", java.math.BigDecimal.class);
       
        qryFlds.put("reconId", String.class);
       
        qryFlds.put("recordVersion", int.class);
       
        qryFlds.put("createdBy", String.class);
       
        qryFlds.put("linkId", java.math.BigDecimal.class);
       
        qryFlds.put("businessContextId", String.class);
       
        qryFlds.put("reconExecutionId", java.math.BigDecimal.class);
       
        qryFlds.put("businessProcessId", String.class);
       
        qryFlds.put("manualEntryFlag", String.class);
       
        qryFlds.put("processingType", String.class);
       
        qryFlds.put("assetClassId", String.class);
       
        qryFlds.put("tradeDate", java.sql.Date.class);
       
        qryFlds.put("parentExceptionId", String.class);
       
        qryFlds.put("mergedExceptionId", String.class);
       
        qryFlds.put("groupedExceptionId", String.class);
       
        qryFlds.put("exceptionGroupIndicator", String.class);
       
        qryFlds.put("totalOutstandingAmount", Double.class);
       
        qryFlds.put("clearingDate", java.sql.Date.class);
       
        qryFlds.put("reasonCode", String.class);
       
        qryFlds.put("comments", String.class);
       
        qryFlds.put("exceptionAuthorizationStatus", String.class);
       
        qryFlds.put("suspenseEntryFlag", String.class);
       

        type.setQueryFields(qryFlds);

        // Ascending fields for EXCEPTION_MASTER.
        Map<String, Class<?>> ascFlds = new LinkedHashMap<>();

        ascFlds.put("exceptionOid", java.math.BigDecimal.class);
       
        type.setAscendingFields(ascFlds);

        ccfg.setTypeMetadata(meta);

        return ccfg;
Alexey Kuznetsov Alexey Kuznetsov
Reply | Threaded
Open this post in threaded view
|

Re: Failed to find mapping description

In reply to this post by dsetrakyan
I extended error message in ignite-1.3.3 branch that will be released shortly.

On Tue, Jul 28, 2015 at 3:37 PM, Dmitriy Setrakyan <[hidden email]> wrote:
As a side note, I would also fix the error message in Ignite to provide a better explanation to users. 

For example, the message could say:
----
Failed to find mapping description [key=java.lang.String, cache=AlgoCache]. Please configure CacheTypeMetadata to associate 'AlgoCache' with JdbcPojoStore.
----

Alexey, can you file a ticket or, better yet, just fix it in code?

D.

On Tue, Jul 28, 2015 at 1:23 AM, Alexey Kuznetsov <[hidden email]> wrote:
Krishna,

It seems that you not properly configured your AlgoCache cache type metadata.
You need to configure Cache Type Metadata to associate AlgoCache and JdbcPojoStore.

In short your need to specify: db schema name, db table, key type (full class name), value type (full class name) , collection of db-to-java key fields mappings, collection of db-to-java value fields mappings.
It could be done from XML or code.

 
Let me know if you have more questions.

On Tue, Jul 28, 2015 at 2:59 PM, krishnangc <[hidden email]> wrote:

Hi,

Trying to load the entire table to cache. Getting the following error.

bob.loadCache(null,"java.lang.String","select * from EXCEPTION_MASTER where
EXCEPTION_ID='37471' ");}
bob.loadCache(null);


Tried both but getting the same error. What mistake am I doing.

Thanks in advance

Krishna

start ignite
[13:30:28]    __________  ________________
[13:30:28]   /  _/ ___/ |/ /  _/_  __/ __/
[13:30:28]  _/ // (7 7    // /  / / / _/
[13:30:28] /___/\___/_/|_/___/ /_/ /___/
[13:30:28]
[13:30:28] ver. 1.3.0-incubating#20150710-sha1:2ade6d00
[13:30:28] 2015 Copyright(C) Apache Software Foundation
[13:30:28]
[13:30:28] Ignite documentation: http://ignite.incubator.apache.org
[13:30:28]
[13:30:28] Quiet mode.
[13:30:28]   ^-- Logging to file
'/home/hadoop/Downloads/apache-ignite-fabric-1.2.0-incubating-bin/work/log/ignite-9fc3b00d.log'
[13:30:28]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false
or "-v" to ignite.{sh|bat}
[13:30:28]
[13:30:28] Initial heap size is 89MB (should be no less than 512MB, use
-Xms512m -Xmx512m).
[13:30:28] Configured plugins:
[13:30:28]   ^-- None
[13:30:28]
oracle.jdbc.pool.OracleDataSource@726b5b3c
the datasource is created
[13:30:30] Performance suggestions for grid  (fix if possible)
[13:30:30] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[13:30:30]   ^-- Enable ATOMIC mode if not using transactions (set
'atomicityMode' to ATOMIC)
[13:30:30]   ^-- Enable write-behind to persistent store (set
'writeBehindEnabled' to true)
[13:30:30]
[13:30:30] To start Console Management & Monitoring run
ignitevisorcmd.{sh|bat}
[13:30:30]
[13:30:30] Ignite node started OK (id=9fc3b00d)
[13:30:30] Topology snapshot [ver=1, server nodes=1, client nodes=0, CPUs=8,
heap=1.3GB]
started ignite
load cache
loading cache
[13:30:30,555][ERROR][ignite-#8%pub-null%][GridJobWorker] Failed to execute
job [jobId=1455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270,
ses=GridJobSessionImpl [ses=GridTaskSessionImpl
[taskName=o.a.i.i.processors.cache.GridCacheAdapter$LoadCacheClosure,
dep=LocalDeployment [super=GridDeployment [ts=1438070428955, depMode=SHARED,
clsLdr=sun.misc.Launcher$AppClassLoader@3479404a,
clsLdrId=b155da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270, userVer=0,
loc=true, sampleClsName=java.lang.String, pendingUndeploy=false,
undeployed=false, usage=0]],
taskClsName=o.a.i.i.processors.cache.GridCacheAdapter$LoadCacheClosure,
sesId=0455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270,
startTime=1438070430512, endTime=9223372036854775807,
taskNodeId=9fc3b00d-a21a-4b1d-8965-b16cb8197270,
clsLdr=sun.misc.Launcher$AppClassLoader@3479404a, closed=false, cpSpi=null,
failSpi=null, loadSpi=null, usage=1, fullSup=false,
subjId=9fc3b00d-a21a-4b1d-8965-b16cb8197270, mapFut=IgniteFuture
[orig=GridFutureAdapter [resFlag=0, res=null, startTime=1438070430523,
endTime=0, ignoreInterrupts=false, lsnr=null, state=INIT]]],
jobId=1455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270]]
class org.apache.ignite.IgniteException: javax.cache.CacheException: Failed
to find mapping description [key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1711)
        at
org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:482)
        at
org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6145)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:476)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:429)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: javax.cache.integration.CacheLoaderException:
javax.cache.CacheException: Failed to find mapping description
[key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:482)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.localLoadCache(GridDhtCacheAdapter.java:419)
        at
org.apache.ignite.internal.processors.cache.IgniteCacheProxy.localLoadCache(IgniteCacheProxy.java:333)
        at
org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5375)
        at
org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5322)
        at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1708)
        ... 8 more
Caused by: javax.cache.CacheException: Failed to find mapping description
[key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.entryMapping(CacheAbstractJdbcStore.java:611)
        at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.loadCache(CacheAbstractJdbcStore.java:641)
        at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:456)
        ... 13 more
[13:30:30,561][ERROR][ignite-#8%pub-null%][GridTaskWorker] Failed to obtain
remote job result policy for result from ComputeTask.result(..) method (will
fail the whole task): GridJobResultImpl [job=C2 [], sib=GridJobSiblingImpl
[sesId=0455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270,
jobId=1455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270,
nodeId=9fc3b00d-a21a-4b1d-8965-b16cb8197270, isJobDone=false],
jobCtx=GridJobContextImpl
[jobId=1455da3de41-9fc3b00d-a21a-4b1d-8965-b16cb8197270, timeoutObj=null,
attrs={}], node=TcpDiscoveryNode [id=9fc3b00d-a21a-4b1d-8965-b16cb8197270,
addrs=[0:0:0:0:0:0:0:1%1, 127.0.0.1, 192.168.1.55],
sockAddrs=[/192.168.1.55:47500, /0:0:0:0:0:0:0:1%1:47500, /127.0.0.1:47500,
/192.168.1.55:47500], discPort=47500, order=1, intOrder=1, loc=true,
ver=1.3.0#20150710-sha1:2ade6d00, isClient=false], ex=class
o.a.i.IgniteException: javax.cache.CacheException: Failed to find mapping
description [key=java.lang.String, cache=AlgoCache], hasRes=true,
isCancelled=false, isOccupied=true]
class org.apache.ignite.IgniteException: Remote job threw user exception
(override or implement ComputeTask.result(..) method if you would like to
have automatic failover for this exception).
        at
org.apache.ignite.compute.ComputeTaskAdapter.result(ComputeTaskAdapter.java:102)
        at
org.apache.ignite.internal.processors.task.GridTaskWorker$3.apply(GridTaskWorker.java:834)
        at
org.apache.ignite.internal.processors.task.GridTaskWorker$3.apply(GridTaskWorker.java:827)
        at
org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6177)
        at
org.apache.ignite.internal.processors.task.GridTaskWorker.result(GridTaskWorker.java:827)
        at
org.apache.ignite.internal.processors.task.GridTaskWorker.onResponse(GridTaskWorker.java:723)
        at
org.apache.ignite.internal.processors.task.GridTaskProcessor.processJobExecuteResponse(GridTaskProcessor.java:932)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.finishJob(GridJobWorker.java:747)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:534)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:429)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: class org.apache.ignite.IgniteException:
javax.cache.CacheException: Failed to find mapping description
[key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1711)
        at
org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:482)
        at
org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6145)
        at
org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:476)
        ... 5 more
Caused by: javax.cache.integration.CacheLoaderException:
javax.cache.CacheException: Failed to find mapping description
[key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:482)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.localLoadCache(GridDhtCacheAdapter.java:419)
        at
org.apache.ignite.internal.processors.cache.IgniteCacheProxy.localLoadCache(IgniteCacheProxy.java:333)
        at
org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5375)
        at
org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheClosure.call(GridCacheAdapter.java:5322)
        at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1708)
        ... 8 more
Caused by: javax.cache.CacheException: Failed to find mapping description
[key=java.lang.String, cache=AlgoCache]
        at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.entryMapping(CacheAbstractJdbcStore.java:611)
        at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.loadCache(CacheAbstractJdbcStore.java:641)
        at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:456)
        ... 13 more
loaded cache




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Failed-to-find-mapping-description-tp725.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.



--
Alexey Kuznetsov
GridGain Systems
www.gridgain.com




--
Alexey Kuznetsov
GridGain Systems
www.gridgain.com
Alexey Kuznetsov Alexey Kuznetsov
Reply | Threaded
Open this post in threaded view
|

Re: Failed to find mapping description

In reply to this post by krishnangc
Krishna,

Looking into your code I assume that you create cache using cache configuration generated by code you provided.

So you should load cache like this

 bob.loadCache(null, ExceptionMasterKey.class.getName(), "select * from EXCEPTION_MASTER where EXCEPTION_ID='37471' ");

P.S. just several minor comments.
  I see that actually ExceptionMasterKey is just a wrapper for BigDecimal.
  If you use only ONE type per cache you could replace everywhere ExceptionMasterKey with BigDecimal.
  Also it is OK to have BigDecimal as a key? How about to use Long (if it is suits your database). Long is much more fast and lightweight than BigDecimal.


On Tue, Jul 28, 2015 at 3:53 PM, krishnangc <[hidden email]> wrote:
Hi Alexey,

Thanks for the quick response. I generated the Config file using the Ignite
Schema Import Utility. Please find the code below.
 public static <K, V> CacheConfiguration<K, V> cache(String name,
Factory<CacheStore&lt;K, V>> storeFactory) {
        if (storeFactory == null)
             throw new IllegalArgumentException("Cache store factory cannot
be null.");

        CacheConfiguration<K, V> ccfg = new CacheConfiguration<>(name);

        ccfg.setCacheStoreFactory(storeFactory);
        ccfg.setReadThrough(true);
        ccfg.setWriteThrough(true);

        // Configure cache types.
        Collection<CacheTypeMetadata> meta = new ArrayList<>();

        // EXCEPTION_MASTER.
        CacheTypeMetadata type = new CacheTypeMetadata();

        meta.add(type);

        type.setDatabaseSchema("ALGORECONUTIL_DEV");
        type.setDatabaseTable("EXCEPTION_MASTER");
        type.setKeyType(ExceptionMasterKey.class.getName());
        type.setValueType(ExceptionMaster.class.getName());

        // Key fields for EXCEPTION_MASTER.
        Collection<CacheTypeFieldMetadata> keys = new ArrayList<>();
        keys.add(new CacheTypeFieldMetadata("EXCEPTION_OID", Types.NUMERIC,
"exceptionOid", java.math.BigDecimal.class));

        type.setKeyFields(keys);

        // Value fields for EXCEPTION_MASTER.
        Collection<CacheTypeFieldMetadata> vals = new ArrayList<>();
        vals.add(new CacheTypeFieldMetadata("EXCEPTION_ID", Types.VARCHAR,
"exceptionId", String.class));

        vals.add(new CacheTypeFieldMetadata("EXCEPTION_CREATED_DATE",
Types.DATE, "exceptionCreatedDate", java.sql.Date.class));

        vals.add(new CacheTypeFieldMetadata("EXCEPTION_PROCESSING_DATE",
Types.DATE, "exceptionProcessingDate", java.sql.Date.class));

        vals.add(new CacheTypeFieldMetadata("EXCEPTION_COMPLETION_DATE",
Types.DATE, "exceptionCompletionDate", java.sql.Date.class));

        vals.add(new CacheTypeFieldMetadata("EXCEPTION_PRIORITY",
Types.VARCHAR, "exceptionPriority", String.class));

        vals.add(new CacheTypeFieldMetadata("EXCEPTION_SEVERITY",
Types.VARCHAR, "exceptionSeverity", String.class));

        vals.add(new CacheTypeFieldMetadata("GEOGRAPHY_ID", Types.NUMERIC,
"geographyId", java.math.BigDecimal.class));

        vals.add(new CacheTypeFieldMetadata("COUNTRY_ID", Types.INTEGER,
"countryId", Integer.class));

        vals.add(new CacheTypeFieldMetadata("BRANCH_ID", Types.INTEGER,
"branchId", Integer.class));

        vals.add(new CacheTypeFieldMetadata("L1L2STATUS", Types.VARCHAR,
"l1l2status", String.class));

        vals.add(new CacheTypeFieldMetadata("SERVICE_LEVEL", Types.VARCHAR,
"serviceLevel", String.class));

        vals.add(new CacheTypeFieldMetadata("RECONCILIATION_TYPE",
Types.VARCHAR, "reconciliationType", String.class));

        vals.add(new CacheTypeFieldMetadata("UPDATED_BY", Types.VARCHAR,
"updatedBy", String.class));

        vals.add(new CacheTypeFieldMetadata("UPDATED_DATE", Types.OTHER,
"updatedDate", Object.class));

        vals.add(new CacheTypeFieldMetadata("SESSION_ID", Types.VARCHAR,
"sessionId", String.class));

        vals.add(new CacheTypeFieldMetadata("RECORD_END_DATE", Types.OTHER,
"recordEndDate", Object.class));

        vals.add(new CacheTypeFieldMetadata("RECORD_STATUS", Types.VARCHAR,
"recordStatus", String.class));

        vals.add(new CacheTypeFieldMetadata("CREATED_DATE", Types.OTHER,
"createdDate", Object.class));

        vals.add(new CacheTypeFieldMetadata("EXCEPTION_CATEGORY",
Types.VARCHAR, "exceptionCategory", String.class));

        vals.add(new CacheTypeFieldMetadata("EXCEPTION_DESCRIPTION",
Types.VARCHAR, "exceptionDescription", String.class));

        vals.add(new CacheTypeFieldMetadata("EXCEPTION_OID", Types.NUMERIC,
"exceptionOid", java.math.BigDecimal.class));

        vals.add(new CacheTypeFieldMetadata("EXCEPTION_STATUS",
Types.VARCHAR, "exceptionStatus", String.class));

        vals.add(new CacheTypeFieldMetadata("EXCEPTION_TYPE_ID",
Types.NUMERIC, "exceptionTypeId", java.math.BigDecimal.class));

        vals.add(new CacheTypeFieldMetadata("FUNCTIONAL_AREA_ID",
Types.NUMERIC, "functionalAreaId", java.math.BigDecimal.class));

        vals.add(new CacheTypeFieldMetadata("IPADDRESS", Types.VARCHAR,
"ipaddress", String.class));

        vals.add(new CacheTypeFieldMetadata("PRODUCTLINE_ID", Types.NUMERIC,
"productlineId", java.math.BigDecimal.class));

        vals.add(new CacheTypeFieldMetadata("RECON_ID", Types.VARCHAR,
"reconId", String.class));

        vals.add(new CacheTypeFieldMetadata("RECORD_VERSION", Types.INTEGER,
"recordVersion", int.class));

        vals.add(new CacheTypeFieldMetadata("CREATED_BY", Types.VARCHAR,
"createdBy", String.class));

        vals.add(new CacheTypeFieldMetadata("LINK_ID", Types.NUMERIC,
"linkId", java.math.BigDecimal.class));

        vals.add(new CacheTypeFieldMetadata("BUSINESS_CONTEXT_ID",
Types.VARCHAR, "businessContextId", String.class));

        vals.add(new CacheTypeFieldMetadata("RECON_EXECUTION_ID",
Types.NUMERIC, "reconExecutionId", java.math.BigDecimal.class));

        vals.add(new CacheTypeFieldMetadata("BUSINESS_PROCESS_ID",
Types.VARCHAR, "businessProcessId", String.class));

        vals.add(new CacheTypeFieldMetadata("MANUAL_ENTRY_FLAG",
Types.VARCHAR, "manualEntryFlag", String.class));

        vals.add(new CacheTypeFieldMetadata("PROCESSING_TYPE",
Types.VARCHAR, "processingType", String.class));

        vals.add(new CacheTypeFieldMetadata("ASSET_CLASS_ID", Types.VARCHAR,
"assetClassId", String.class));

        vals.add(new CacheTypeFieldMetadata("TRADE_DATE", Types.DATE,
"tradeDate", java.sql.Date.class));

        vals.add(new CacheTypeFieldMetadata("PARENT_EXCEPTION_ID",
Types.VARCHAR, "parentExceptionId", String.class));

        vals.add(new CacheTypeFieldMetadata("MERGED_EXCEPTION_ID",
Types.VARCHAR, "mergedExceptionId", String.class));

        vals.add(new CacheTypeFieldMetadata("GROUPED_EXCEPTION_ID",
Types.VARCHAR, "groupedExceptionId", String.class));

        vals.add(new CacheTypeFieldMetadata("EXCEPTION_GROUP_INDICATOR",
Types.VARCHAR, "exceptionGroupIndicator", String.class));

        vals.add(new CacheTypeFieldMetadata("TOTAL_OUTSTANDING_AMOUNT",
Types.FLOAT, "totalOutstandingAmount", Double.class));

        vals.add(new CacheTypeFieldMetadata("CLEARING_DATE", Types.DATE,
"clearingDate", java.sql.Date.class));

        vals.add(new CacheTypeFieldMetadata("REASON_CODE", Types.VARCHAR,
"reasonCode", String.class));

        vals.add(new CacheTypeFieldMetadata("COMMENTS", Types.VARCHAR,
"comments", String.class));

        vals.add(new
CacheTypeFieldMetadata("EXCEPTION_AUTHORIZATION_STATUS", Types.VARCHAR,
"exceptionAuthorizationStatus", String.class));

        vals.add(new CacheTypeFieldMetadata("SUSPENSE_ENTRY_FLAG",
Types.VARCHAR, "suspenseEntryFlag", String.class));

        type.setValueFields(vals);

        // Query fields for EXCEPTION_MASTER.
        Map<String, Class&lt;?>> qryFlds = new LinkedHashMap<>();

        qryFlds.put("exceptionId", String.class);

        qryFlds.put("exceptionCreatedDate", java.sql.Date.class);

        qryFlds.put("exceptionProcessingDate", java.sql.Date.class);

        qryFlds.put("exceptionCompletionDate", java.sql.Date.class);

        qryFlds.put("exceptionPriority", String.class);

        qryFlds.put("exceptionSeverity", String.class);

        qryFlds.put("geographyId", java.math.BigDecimal.class);

        qryFlds.put("countryId", Integer.class);

        qryFlds.put("branchId", Integer.class);

        qryFlds.put("l1l2status", String.class);

        qryFlds.put("serviceLevel", String.class);

        qryFlds.put("reconciliationType", String.class);

        qryFlds.put("updatedBy", String.class);

        qryFlds.put("updatedDate", Object.class);

        qryFlds.put("sessionId", String.class);

        qryFlds.put("recordEndDate", Object.class);

        qryFlds.put("recordStatus", String.class);

        qryFlds.put("createdDate", Object.class);

        qryFlds.put("exceptionCategory", String.class);

        qryFlds.put("exceptionDescription", String.class);

        qryFlds.put("exceptionOid", java.math.BigDecimal.class);

        qryFlds.put("exceptionStatus", String.class);

        qryFlds.put("exceptionTypeId", java.math.BigDecimal.class);

        qryFlds.put("functionalAreaId", java.math.BigDecimal.class);

        qryFlds.put("ipaddress", String.class);

        qryFlds.put("productlineId", java.math.BigDecimal.class);

        qryFlds.put("reconId", String.class);

        qryFlds.put("recordVersion", int.class);

        qryFlds.put("createdBy", String.class);

        qryFlds.put("linkId", java.math.BigDecimal.class);

        qryFlds.put("businessContextId", String.class);

        qryFlds.put("reconExecutionId", java.math.BigDecimal.class);

        qryFlds.put("businessProcessId", String.class);

        qryFlds.put("manualEntryFlag", String.class);

        qryFlds.put("processingType", String.class);

        qryFlds.put("assetClassId", String.class);

        qryFlds.put("tradeDate", java.sql.Date.class);

        qryFlds.put("parentExceptionId", String.class);

        qryFlds.put("mergedExceptionId", String.class);

        qryFlds.put("groupedExceptionId", String.class);

        qryFlds.put("exceptionGroupIndicator", String.class);

        qryFlds.put("totalOutstandingAmount", Double.class);

        qryFlds.put("clearingDate", java.sql.Date.class);

        qryFlds.put("reasonCode", String.class);

        qryFlds.put("comments", String.class);

        qryFlds.put("exceptionAuthorizationStatus", String.class);

        qryFlds.put("suspenseEntryFlag", String.class);


        type.setQueryFields(qryFlds);

        // Ascending fields for EXCEPTION_MASTER.
        Map<String, Class&lt;?>> ascFlds = new LinkedHashMap<>();

        ascFlds.put("exceptionOid", java.math.BigDecimal.class);

        type.setAscendingFields(ascFlds);

        ccfg.setTypeMetadata(meta);

        return ccfg;



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Failed-to-find-mapping-description-tp725p728.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.



--
Alexey Kuznetsov
GridGain Systems
www.gridgain.com
krishnangc krishnangc
Reply | Threaded
Open this post in threaded view
|

Re: Failed to find mapping description

In reply to this post by krishnangc
Hi Alexey,

Thanks for the reply. Once i am past that I am getting this exception. I am pretty sure that i have the getter and setter for this. Still Ignite is searching for the same.

lass org.apache.ignite.IgniteCheckedException: Failed to initialize property 'exceptionOid' for key class 'class org.apache.ignite.examples.algofusion.ExceptionMasterKey' and value class 'class org.apache.ignite.examples.algofusion.ExceptionMaster'. Make sure that one of these classes contains respective getter method or field.
        at org.apache.ignite.internal.processors.query.GridQueryProcessor.buildClassProperty(GridQueryProcessor.java:1342)
        at org.apache.ignite.internal.processors.query.GridQueryProcessor.processClassMeta(GridQueryProcessor.java:1148)
        at org.apache.ignite.internal.processors.query.GridQueryProcessor.initializeCache(GridQueryProcessor.java:149)
        at org.apache.ignite.internal.processors.query.GridQueryProcessor.onCacheStart(GridQueryProcessor.java:249)
        at org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:922)
        at org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:779)
        at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:829)
        at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1538)
        at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1405)
        at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:931)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:477)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:458)
        at org.apache.ignite.Ignition.start(Ignition.java:321)
        at org.apache.ignite.examples.algofusion.AlgoDB.main(AlgoDB.java:89)
[15:45:29,007][ERROR][main][IgniteKernal] Failed to pre-stop processor: GridProcessorAdapter []
java.lang.NullPointerException
        at org.apache.ignite.internal.processors.cache.GridCacheEventManager.isRecordable(GridCacheEventManager.java:342)
        at org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStop(GridCacheProcessor.java:1089)
        at org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStop(GridCacheProcessor.java:896)
        at org.apache.ignite.internal.IgniteKernal.stop0(IgniteKernal.java:1706)
        at org.apache.ignite.internal.IgniteKernal.stop(IgniteKernal.java:1650)
        at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:852)
        at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1538)
        at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1405)
        at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:931)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:477)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:458)
        at org.apache.ignite.Ignition.start(Ignition.java:321)
        at org.apache.ignite.examples.algofusion.AlgoDB.main(AlgoDB.java:89)
[15:45:29] Ignite node stopped wih ERRORS [uptime=00:00:02:515]
Alexey Kuznetsov Alexey Kuznetsov
Reply | Threaded
Open this post in threaded view
|

Re: Failed to find mapping description

Krishna,

Please post here your classes ExceptionMasterKey and ExceptionMaster.
I will try to reproduce and share results with you.

Note,  that this mail list do not accept attachments, so put classes as e-mail text.

On Tue, Jul 28, 2015 at 5:19 PM, krishnangc <[hidden email]> wrote:
Hi Alexey,

Thanks for the reply. Once i am past that I am getting this exception. I am
pretty sure that i have the getter and setter for this. Still Ignite is
searching for the same.

lass org.apache.ignite.IgniteCheckedException: Failed to initialize property
'exceptionOid' for key class 'class
org.apache.ignite.examples.algofusion.ExceptionMasterKey' and value class
'class org.apache.ignite.examples.algofusion.ExceptionMaster'. Make sure
that one of these classes contains respective getter method or field.
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.buildClassProperty(GridQueryProcessor.java:1342)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.processClassMeta(GridQueryProcessor.java:1148)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.initializeCache(GridQueryProcessor.java:149)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.onCacheStart(GridQueryProcessor.java:249)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:922)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:779)
        at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:829)
        at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1538)
        at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1405)
        at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:931)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:477)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:458)
        at org.apache.ignite.Ignition.start(Ignition.java:321)
        at org.apache.ignite.examples.algofusion.AlgoDB.main(AlgoDB.java:89)
[15:45:29,007][ERROR][main][IgniteKernal] Failed to pre-stop processor:
GridProcessorAdapter []
java.lang.NullPointerException
        at
org.apache.ignite.internal.processors.cache.GridCacheEventManager.isRecordable(GridCacheEventManager.java:342)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStop(GridCacheProcessor.java:1089)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStop(GridCacheProcessor.java:896)
        at org.apache.ignite.internal.IgniteKernal.stop0(IgniteKernal.java:1706)
        at org.apache.ignite.internal.IgniteKernal.stop(IgniteKernal.java:1650)
        at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:852)
        at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1538)
        at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1405)
        at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:931)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:477)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:458)
        at org.apache.ignite.Ignition.start(Ignition.java:321)
        at org.apache.ignite.examples.algofusion.AlgoDB.main(AlgoDB.java:89)
[15:45:29] Ignite node stopped wih ERRORS [uptime=00:00:02:515]



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Failed-to-find-mapping-description-tp725p731.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.



--
Alexey Kuznetsov
GridGain Systems
www.gridgain.com
krishnangc krishnangc
Reply | Threaded
Open this post in threaded view
|

Re: Failed to find mapping description

Hi Alexey,

I have send  a mail to you with the class files and db schema.

Thanks and Regards

Krishna
Vasiliy Sisko Vasiliy Sisko
Reply | Threaded
Open this post in threaded view
|

Re: Failed to find mapping description

Hello Krishna.
I have investigated you problem. The next reasons have been found:

1). You have incorrect ExceptionMasterKey class. Class has violations to Java Beans field names (setexceptionId and getexceptionID).
2). Cache type metadata for key type is configured to use exceptionOid field, but it is using field exceptionId.
3). In class ExceptionMaster for columns with type NUMBER(30) correspond to fields with incompatible type java.lang.Long. This fields should have type java.math.BigDecimal. That type now used in configuration of cache type metadata.

To fix configuration you can fix types in cache type metadata (https://gist.github.com/vsisko/5ace39d3874ceac29b72/revisions) or change types in class ExceptionMaster.

On Tue, Jul 28, 2015 at 6:02 PM, krishnangc <[hidden email]> wrote:
Hi Alexey,

I have send  a mail to you with the class files and db schema.

Thanks and Regards

Krishna



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Failed-to-find-mapping-description-tp725p733.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.



--
Vasiliy Sisko
GridGain Systems
www.gridgain.com
krishnangc krishnangc
Reply | Threaded
Open this post in threaded view
|

Re: Failed to find mapping description

Thanks Vasiliy,

The code was generated by Ignite Schema Utility. It was generating duplicate entries. I tried to remove the duplicates and run. Then I got the error. Thanks for the reply. I will try to fix from my side.

Thanks

Krishna
yakov yakov
Reply | Threaded
Open this post in threaded view
|

Re: Failed to find mapping description

In reply to this post by krishnangc
Guys,

Has ticket for NPE been filed? I think it is possible only when start throws an exception, but still...

--Yakov

2015-07-28 13:19 GMT+03:00 krishnangc <[hidden email]>:
Hi Alexey,

Thanks for the reply. Once i am past that I am getting this exception. I am
pretty sure that i have the getter and setter for this. Still Ignite is
searching for the same.

lass org.apache.ignite.IgniteCheckedException: Failed to initialize property
'exceptionOid' for key class 'class
org.apache.ignite.examples.algofusion.ExceptionMasterKey' and value class
'class org.apache.ignite.examples.algofusion.ExceptionMaster'. Make sure
that one of these classes contains respective getter method or field.
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.buildClassProperty(GridQueryProcessor.java:1342)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.processClassMeta(GridQueryProcessor.java:1148)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.initializeCache(GridQueryProcessor.java:149)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.onCacheStart(GridQueryProcessor.java:249)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:922)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:779)
        at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:829)
        at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1538)
        at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1405)
        at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:931)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:477)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:458)
        at org.apache.ignite.Ignition.start(Ignition.java:321)
        at org.apache.ignite.examples.algofusion.AlgoDB.main(AlgoDB.java:89)
[15:45:29,007][ERROR][main][IgniteKernal] Failed to pre-stop processor:
GridProcessorAdapter []
java.lang.NullPointerException
        at
org.apache.ignite.internal.processors.cache.GridCacheEventManager.isRecordable(GridCacheEventManager.java:342)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStop(GridCacheProcessor.java:1089)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStop(GridCacheProcessor.java:896)
        at org.apache.ignite.internal.IgniteKernal.stop0(IgniteKernal.java:1706)
        at org.apache.ignite.internal.IgniteKernal.stop(IgniteKernal.java:1650)
        at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:852)
        at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1538)
        at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1405)
        at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:931)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:477)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:458)
        at org.apache.ignite.Ignition.start(Ignition.java:321)
        at org.apache.ignite.examples.algofusion.AlgoDB.main(AlgoDB.java:89)
[15:45:29] Ignite node stopped wih ERRORS [uptime=00:00:02:515]



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Failed-to-find-mapping-description-tp725p731.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Alexey Kuznetsov Alexey Kuznetsov
Reply | Threaded
Open this post in threaded view
|

Re: Failed to find mapping description

Yakov, issue was filled (IGNITE-1158 Duplicate Field when creating using Apache Ignite Schema Import utility).

Vasiliy reproduced and answered to Krishna. For a while Krishna could fix his code as Vasiliy pointed.

We will check schema import utility with Oracle shortly and share with our findings.


On Thu, Jul 30, 2015 at 5:31 PM, Yakov Zhdanov <[hidden email]> wrote:
Guys,

Has ticket for NPE been filed? I think it is possible only when start throws an exception, but still...

--Yakov

2015-07-28 13:19 GMT+03:00 krishnangc <[hidden email]>:
Hi Alexey,

Thanks for the reply. Once i am past that I am getting this exception. I am
pretty sure that i have the getter and setter for this. Still Ignite is
searching for the same.

lass org.apache.ignite.IgniteCheckedException: Failed to initialize property
'exceptionOid' for key class 'class
org.apache.ignite.examples.algofusion.ExceptionMasterKey' and value class
'class org.apache.ignite.examples.algofusion.ExceptionMaster'. Make sure
that one of these classes contains respective getter method or field.
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.buildClassProperty(GridQueryProcessor.java:1342)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.processClassMeta(GridQueryProcessor.java:1148)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.initializeCache(GridQueryProcessor.java:149)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.onCacheStart(GridQueryProcessor.java:249)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:922)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:779)
        at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:829)
        at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1538)
        at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1405)
        at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:931)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:477)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:458)
        at org.apache.ignite.Ignition.start(Ignition.java:321)
        at org.apache.ignite.examples.algofusion.AlgoDB.main(AlgoDB.java:89)
[15:45:29,007][ERROR][main][IgniteKernal] Failed to pre-stop processor:
GridProcessorAdapter []
java.lang.NullPointerException
        at
org.apache.ignite.internal.processors.cache.GridCacheEventManager.isRecordable(GridCacheEventManager.java:342)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStop(GridCacheProcessor.java:1089)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStop(GridCacheProcessor.java:896)
        at org.apache.ignite.internal.IgniteKernal.stop0(IgniteKernal.java:1706)
        at org.apache.ignite.internal.IgniteKernal.stop(IgniteKernal.java:1650)
        at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:852)
        at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1538)
        at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1405)
        at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:931)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:477)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:458)
        at org.apache.ignite.Ignition.start(Ignition.java:321)
        at org.apache.ignite.examples.algofusion.AlgoDB.main(AlgoDB.java:89)
[15:45:29] Ignite node stopped wih ERRORS [uptime=00:00:02:515]



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Failed-to-find-mapping-description-tp725p731.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.




--
Alexey Kuznetsov
GridGain Systems
www.gridgain.com
Alexey Kuznetsov Alexey Kuznetsov
Reply | Threaded
Open this post in threaded view
|

Re: Failed to find mapping description

In reply to this post by yakov
Yakov,

I created issue in JIRA:
 NPE in GridCacheProcessor.onKernalStop()