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.

See as example:
http://apacheignite.readme.io/docs/automatic-persistence#section-generated-artifacts

Let me know if you have more questions.

On Tue, Jul 28, 2015 at 2:59 PM, krishnangc <
[email protected]> 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

Reply via email to