Hi,

As I know you can configure CacheJdbcPojoStore in order to pairs of various
object save to different tables. But in the case types of key must be
different.

All nodes of cluster need to have value classes on classpath or to configure

<bean class="org.apache.ignite.configuration.IgniteConfiguration">
  <property name="peerClassLoadingEnabled" value="true"/>

About loading data from persistent store you can look the article[1]

PS
Do not forget to subscribe on mailing list, as Val said.

[1]: http://apacheignite.gridgain.org/docs/data-loading


junyoung.kang wrote
> Wow Thank you for reply!!! also I subscribe mail. 
> 
> I respect you.
> 
> I have more question.(to much.. sorry)
> 
> First, you say a cache is a database schema. But Ignite cache have one
> table in one cache. This is why I think I push data to cache, "
> cacheConfiguration.setIndexedTypes(Integer.class, testTable.class) " . 
> Integer.class is table PK, testTable is JavaPoJo class(have table fields).
> So I insert another table..., I make more cache. isn't it ok?
> 
> Second, how to setting classpath?.. because "select * from TbCustomer" ->
> occur below error.
> 
> ERROR [2016-09-27 14:46:00,923] ({pool-2-thread-7}
> IgniteSqlInterpreter.java[interpret]:158) - Exception in
> IgniteSqlInterpreter while InterpreterResult interpret:
> java.sql.SQLException: Failed to query Ignite.
>         at
> org.apache.ignite.internal.jdbc2.JdbcStatement.executeQuery(JdbcStatement.java:115)
>         at
> org.apache.zeppelin.ignite.IgniteSqlInterpreter.interpret(IgniteSqlInterpreter.java:132)
>         at
> org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:94)
>         at
> org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:341)
>         at org.apache.zeppelin.scheduler.Job.run(Job.java:176)
>         at
> org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:139)
>         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: class org.apache.ignite.binary.BinaryInvalidTypeException:
> com.navercorp.searchad.model.TbCustomer
>         at
> org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:671)
>         at
> org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1474)
>         at
> org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:585)
>         at
> org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:142)
>         at
> org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinary(CacheObjectContext.java:272)
>         at
> org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinariesIfNeeded(CacheObjectContext.java:185)
>         at
> org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinariesIfNeeded(CacheObjectContext.java:169)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheContext.unwrapBinariesIfNeeded(GridCacheContext.java:1741)
>         at
> org.apache.ignite.internal.processors.query.GridQueryCacheObjectsIterator.next(GridQueryCacheObjectsIterator.java:64)
>         at
> org.apache.ignite.internal.processors.query.GridQueryCacheObjectsIterator.next(GridQueryCacheObjectsIterator.java:29)
>         at
> org.apache.ignite.internal.jdbc2.JdbcQueryTask.call(JdbcQueryTask.java:177)
>         at
> org.apache.ignite.internal.jdbc2.JdbcStatement.executeQuery(JdbcStatement.java:102)
>         ... 12 more
> Caused by: java.lang.ClassNotFoundException:
> com.navercorp.searchad.model.TbCustomer
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:348)
>         at
> org.apache.ignite.internal.util.IgniteUtils.forName(IgniteUtils.java:8350)
>         at
> org.apache.ignite.internal.MarshallerContextAdapter.getClass(MarshallerContextAdapter.java:185)
>         at
> org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:662)
>         ... 23 more
> 
> I know class file is in IGNITE_HOME/libs...?? 
> please example in detail.
> 
> 
> Finally, In client mode, how to connect to persistent store??
> I want to read-through, write-through data in persistent store.
> 
> 
> Thank you..
> 
> ps. sorry to many questions ... 
> I look forward to your reply. Thank you~!





--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Ignite-zeppelin-jdbc-connection-tp7898p7967.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to