SonixLegend created IGNITE-3679:
-----------------------------------

             Summary: ClassNotFoundException
                 Key: IGNITE-3679
                 URL: https://issues.apache.org/jira/browse/IGNITE-3679
             Project: Ignite
          Issue Type: Bug
          Components: cache
    Affects Versions: 1.7
            Reporter: SonixLegend
             Fix For: 1.8


cache.savePairs(rdd, false) is work, but if change to "true", the program is 
failure.

case class Test(@(QuerySqlField @field)(index = true) id: Long, @(QuerySqlField 
@field)(index = true) test: String)
val cache: IgniteRDD[Long, Test] = igniteContext.fromCache("spark")
val rdd: RDD[(Long, Test)] = sparkContext.parallelize(1 to 10000, 10).map(i => 
(i, Test(i, "Test")))
cache.savePairs(rdd, true)
println(cache.count)

                <property name="peerClassLoadingEnabled" value="true" />
                <property name="cacheConfiguration">
                        <list>
                                <bean 
class="org.apache.ignite.configuration.CacheConfiguration">
                                        <property name="name" value="spark" />
                                        <property name="cacheMode" 
value="PARTITIONED" />
                                        <property name="backups" value="1" />
                                        <property name="swapEnabled" 
value="false" />
                                        <property name="memoryMode" 
value="ONHEAP_TIERED" />
                                        <property name="offHeapMaxMemory" 
value="#{10 * 1024L * 1024L * 1024L}" />
                                        <property name="evictionPolicy">
                                                <bean 
class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
                                                        <property 
name="maxSize" value="1000000" />
                                                </bean>
                                        </property>
                                        <property name="atomicityMode" 
value="TRANSACTIONAL" />
                                        <property name="sqlOnheapRowCacheSize" 
value="10000" />
                                        <property name="cacheStoreFactory">
                                                <bean
                                                        
class="org.apache.ignite.cache.store.jdbc.CacheJdbcBlobStoreFactory">
                                                        <property 
name="connectionUrl"
                                                                
value="jdbc:h2:tcp://localhost:9092//mnt/data/data/ignite/spark;AUTO_RECONNECT=TRUE"
 />
                                                        <property name="user" 
value="sa" />
                                                </bean>
                                        </property>
                                        <property name="readThrough" 
value="true" />
                                        <property name="writeThrough" 
value="true" />
                                        <property name="writeBehindEnabled" 
value="true" />
                                </bean>
                        </list>
                </property>

Caused by: java.lang.ClassNotFoundException: com.newtouch.sample.Test
        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)
        ... 75 more



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to